spirv: add SpvCapabilityInt64Atomics
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 5 Dec 2018 13:28:28 +0000 (14:28 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 5 Dec 2018 13:39:55 +0000 (14:39 +0100)
Required for VK_KHR_shader_atomic_int64.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/shader_info.h
src/compiler/spirv/spirv_to_nir.c

index 65bc0588d67b4a797ae7e6925b919f18ee15bbea..b95cc310fd61ffea0177763b555ca56949f0da5a 100644 (file)
@@ -62,6 +62,7 @@ struct spirv_supported_capabilities {
    bool post_depth_coverage;
    bool transform_feedback;
    bool geometry_streams;
+   bool int64_atomics;
 };
 
 typedef struct shader_info {
index a05c4d236cad935d675ece3ccc27478d72b14105..22efaa276d94d0c7df2d8f9e97b716d8c48d093e 100644 (file)
@@ -3416,7 +3416,6 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
       case SpvCapabilityVector16:
       case SpvCapabilityFloat16Buffer:
       case SpvCapabilityFloat16:
-      case SpvCapabilityInt64Atomics:
       case SpvCapabilityStorageImageMultisample:
       case SpvCapabilityInt8:
       case SpvCapabilitySparseResidency:
@@ -3447,6 +3446,10 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
          spv_check_supported(geometry_streams, cap);
          break;
 
+      case SpvCapabilityInt64Atomics:
+         spv_check_supported(int64_atomics, cap);
+         break;
+
       case SpvCapabilityAddresses:
       case SpvCapabilityKernel:
       case SpvCapabilityImageBasic: