spirv: add SpvCapabilityImageReadWriteLodAMD
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 3 Jan 2020 10:49:24 +0000 (11:49 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 9 Jan 2020 06:58:33 +0000 (07:58 +0100)
New SPIR-V capability for SPV_AMD_shader_image_load_store_lod.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/compiler/shader_info.h
src/compiler/spirv/spirv_to_nir.c

index 8e7b81a13ab031915be50af6e64825afdd4f9152..7c12dadd1cecc2af02dded304f5ee5d5e472c908 100644 (file)
@@ -81,6 +81,7 @@ struct spirv_supported_capabilities {
    bool amd_gcn_shader;
    bool amd_shader_ballot;
    bool amd_trinary_minmax;
+   bool amd_image_read_write_lod;
 };
 
 typedef struct shader_info {
index 63a165d5b847e9763169387e4ea16243942f40bd..a4b09a404df13bdbb8576955829789a528ea60d1 100644 (file)
@@ -4048,6 +4048,10 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
          spv_check_supported(vk_memory_model_device_scope, cap);
          break;
 
+      case SpvCapabilityImageReadWriteLodAMD:
+         spv_check_supported(amd_image_read_write_lod, cap);
+         break;
+
       default:
          vtn_fail("Unhandled capability: %s (%u)",
                   spirv_capability_to_string(cap), cap);