spirv: fix retrieving dest type for OpFragmentMaskFetchAMD
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 1 Sep 2020 07:43:03 +0000 (09:43 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 2 Sep 2020 06:54:22 +0000 (08:54 +0200)
Since the dest type is retrieved from the SPIR-V return type now,
we have to set it manually for OpFragmentMaskFetchAMD. The result
type must be a 32-bit unsigned integer type scalar.

Fix dEQP-VK.pipeline.multisample.shader_fragment_mask.* with RADV.

Fixes: a196f05fc22 ("nir/vtn: Use return type rather than image type for tex ops")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6533>

src/compiler/spirv/spirv_to_nir.c

index 399e5ea3edea8f9b9494b227c40ed9d8daaa22a7..d39f2a0d4f1ad8a8ae1d068fd4ee82bfb2e73457 100644 (file)
@@ -2569,6 +2569,7 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode,
 
    case SpvOpFragmentMaskFetchAMD:
       texop = nir_texop_fragment_mask_fetch;
+      dest_type = nir_type_uint;
       break;
 
    default: