spirv: Silence unsupported tessellation capability warnings.
authorKenneth Graunke <kenneth@whitecape.org>
Sun, 25 Sep 2016 21:23:55 +0000 (14:23 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 10 Jan 2017 21:21:38 +0000 (13:21 -0800)
...when the capability bit is set.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> [v1]
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/spirv/nir_spirv.h
src/compiler/spirv/spirv_to_nir.c

index 2850e91e8b85c958377c3d070f832b416bb294ba..e3f4ee85cc92166f0da25e508836dabe51e4200a 100644 (file)
@@ -47,6 +47,7 @@ struct nir_spirv_specialization {
 struct nir_spirv_supported_extensions {
    bool float64;
    bool image_ms_array;
+   bool tessellation;
 };
 
 nir_function *spirv_to_nir(const uint32_t *words, size_t word_count,
index 841f8fdc84e88b765e935e418b72a2d51eba4d2b..917072392c5de746a1182257a699cf73b883b003 100644 (file)
@@ -2602,8 +2602,6 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
          break;
 
       case SpvCapabilityGeometryStreams:
-      case SpvCapabilityTessellation:
-      case SpvCapabilityTessellationPointSize:
       case SpvCapabilityLinkage:
       case SpvCapabilityVector16:
       case SpvCapabilityFloat16Buffer:
@@ -2645,6 +2643,11 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
       case SpvCapabilityImageMSArray:
          spv_check_supported(image_ms_array, cap);
          break;
+
+      case SpvCapabilityTessellation:
+      case SpvCapabilityTessellationPointSize:
+         spv_check_supported(tessellation, cap);
+         break;
       }
       break;
    }