[Mesa-dev] [PATCH v2 3/5] spirv: Add flag for SpvCapabilityShaderViewportIndexLayerEXT.
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Tue Aug 15 00:49:31 UTC 2017
---
src/compiler/spirv/nir_spirv.h | 1 +
src/compiler/spirv/spirv.h | 1 +
src/compiler/spirv/spirv_to_nir.c | 4 ++++
3 files changed, 6 insertions(+)
diff --git a/src/compiler/spirv/nir_spirv.h b/src/compiler/spirv/nir_spirv.h
index 83577fb5d23..67fe149ea3f 100644
--- a/src/compiler/spirv/nir_spirv.h
+++ b/src/compiler/spirv/nir_spirv.h
@@ -52,6 +52,7 @@ struct nir_spirv_supported_extensions {
bool int64;
bool multiview;
bool variable_pointers;
+ bool vs_tes_viewport_layer;
};
nir_function *spirv_to_nir(const uint32_t *words, size_t word_count,
diff --git a/src/compiler/spirv/spirv.h b/src/compiler/spirv/spirv.h
index 61559a1c9ca..cc9e872a8c4 100644
--- a/src/compiler/spirv/spirv.h
+++ b/src/compiler/spirv/spirv.h
@@ -663,6 +663,7 @@ typedef enum SpvCapability_ {
SpvCapabilityImageGatherBiasLodAMD = 5009,
SpvCapabilitySampleMaskOverrideCoverageNV = 5249,
SpvCapabilityGeometryShaderPassthroughNV = 5251,
+ SpvCapabilityShaderViewportIndexLayerEXT = 5254,
SpvCapabilityShaderViewportIndexLayerNV = 5254,
SpvCapabilityShaderViewportMaskNV = 5255,
SpvCapabilityShaderStereoViewNV = 5259,
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index 7b34dad30cd..8b31685b9e4 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -2759,6 +2759,10 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
spirv_capability_to_string(cap));
break;
+ case SpvCapabilityShaderViewportIndexLayerEXT:
+ spv_check_supported(vs_tes_viewport_layer, cap);
+ break;
+
case SpvCapabilityImageMSArray:
spv_check_supported(image_ms_array, cap);
break;
--
2.14.1
More information about the mesa-dev
mailing list