compiler/spirv: add XFB and GeometryStreams capability check support
authorAlejandro Piñeiro <apinheiro@igalia.com>
Fri, 13 Jul 2018 11:34:08 +0000 (13:34 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Tue, 31 Jul 2018 11:33:28 +0000 (13:33 +0200)
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/shader_info.h
src/compiler/spirv/spirv_to_nir.c

index e9ca222dea860ffa091657fe8d30e57a37cbc4b9..dab15b58894f6e796183c5d22cf77e66ca07934b 100644 (file)
@@ -60,6 +60,8 @@ struct spirv_supported_capabilities {
    bool atomic_storage;
    bool storage_8bit;
    bool post_depth_coverage;
+   bool transform_feedback;
+   bool geometry_streams;
 };
 
 typedef struct shader_info {
index f0a5fae4a645108804f1f8484dc56964268034eb..32ebdd78a1f42305bb277b3617fded82bdbe366f 100644 (file)
@@ -3417,7 +3417,6 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
       case SpvCapabilityStorageImageExtendedFormats:
          break;
 
-      case SpvCapabilityGeometryStreams:
       case SpvCapabilityLinkage:
       case SpvCapabilityVector16:
       case SpvCapabilityFloat16Buffer:
@@ -3427,7 +3426,6 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
       case SpvCapabilityInt8:
       case SpvCapabilitySparseResidency:
       case SpvCapabilityMinLod:
-      case SpvCapabilityTransformFeedback:
          vtn_warn("Unsupported SPIR-V capability: %s",
                   spirv_capability_to_string(cap));
          break;
@@ -3446,6 +3444,14 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
          spv_check_supported(int16, cap);
          break;
 
+      case SpvCapabilityTransformFeedback:
+         spv_check_supported(transform_feedback, cap);
+         break;
+
+      case SpvCapabilityGeometryStreams:
+         spv_check_supported(geometry_streams, cap);
+         break;
+
       case SpvCapabilityAddresses:
       case SpvCapabilityKernel:
       case SpvCapabilityImageBasic: