radv: Set uses_sample_shading for copy shaders
authorJason Ekstrand <jason.ekstrand@collabora.com>
Wed, 13 Jul 2022 18:04:46 +0000 (13:04 -0500)
committerMarge Bot <emma+marge@anholt.net>
Wed, 13 Jul 2022 20:28:42 +0000 (20:28 +0000)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14020>

src/amd/vulkan/radv_meta_blit2d.c

index cee0b79..4c640ac 100644 (file)
@@ -537,6 +537,8 @@ build_nir_copy_fragment_shader(struct radv_device *device, texel_fetch_build_fun
    nir_ssa_def *color = txf_func(&b, device, tex_pos, is_3d, is_multisampled);
    nir_store_var(&b, color_out, color, 0xf);
 
+   b.shader->info.fs.uses_sample_shading = is_multisampled;
+
    return b.shader;
 }
 
@@ -560,6 +562,8 @@ build_nir_copy_fragment_shader_depth(struct radv_device *device, texel_fetch_bui
    nir_ssa_def *color = txf_func(&b, device, tex_pos, is_3d, is_multisampled);
    nir_store_var(&b, color_out, color, 0x1);
 
+   b.shader->info.fs.uses_sample_shading = is_multisampled;
+
    return b.shader;
 }
 
@@ -583,6 +587,8 @@ build_nir_copy_fragment_shader_stencil(struct radv_device *device, texel_fetch_b
    nir_ssa_def *color = txf_func(&b, device, tex_pos, is_3d, is_multisampled);
    nir_store_var(&b, color_out, color, 0x1);
 
+   b.shader->info.fs.uses_sample_shading = is_multisampled;
+
    return b.shader;
 }