spirv: add SpvCapabilityImageGatherBiasLodAMD
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 19 May 2020 12:50:57 +0000 (14:50 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 25 May 2020 06:51:10 +0000 (08:51 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5147>

src/compiler/shader_info.h
src/compiler/spirv/spirv_to_nir.c

index 2e22614b75bdc82ab1f5112ca7883c73a03f8ad0..d7577472578958cc54fa9b7a72f1f2cd6a2b7b01 100644 (file)
@@ -85,6 +85,7 @@ struct spirv_supported_capabilities {
    bool amd_trinary_minmax;
    bool amd_image_read_write_lod;
    bool amd_shader_explicit_vertex_parameter;
+   bool amd_image_gather_bias_lod;
 };
 
 typedef struct shader_info {
index fd3f4d011049817761efb03b5ac8c5ab34ac1a3f..590f325a4b95db799dbff67ab0695730aa4059c6 100644 (file)
@@ -4061,6 +4061,10 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
          spv_check_supported(amd_fragment_mask, cap);
          break;
 
+      case SpvCapabilityImageGatherBiasLodAMD:
+         spv_check_supported(amd_image_gather_bias_lod, cap);
+         break;
+
       default:
          vtn_fail("Unhandled capability: %s (%u)",
                   spirv_capability_to_string(cap), cap);