mesa/src/amd/vulkan/nir
Autumn Ashton 3d75082c02 radv: Fix compute resolve rounding
When we are using compute resolve, we can get
values the CTS does not expect due to the value
we end up writing for UNORM in
`nir_image_deref_store`.

Make the compute resolve rounding path match with
the output of the fragment shader resolve path,
by going through the same FP16 RTZ conversion as
we do for UNORM/SNORM formats.

This is why VK_EXT_sample_locations CTS was
failing on > GFX9.
On <= GFX9, I am assuming we are falling back to
RESOLVE_FRAGMENT, due to DCC stuff, which is why
it works there.

I tested a handful of images from the Vulkan CTS
for the sample locations and resolve tests for
diff UNORM formats from the qpa file forcing
FRAGMENT and with this change.
With this change, we now match on the compute
resolve path the same sha for the ones I compared
with ImageMagick `identify`.

CTS passes for: *resolve*, *image_clearing* and
*sample_locations* on RX 7900XTX.

Signed-off-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28237>
2025-04-01 21:15:24 +01:00
..
radv_meta_nir.c radv: Fix compute resolve rounding 2025-04-01 21:15:24 +01:00
radv_meta_nir.h radv: Fix compute resolve rounding 2025-04-01 21:15:24 +01:00
radv_nir.h radv: Add bool return value to radv_nir_apply_pipeline_layout. 2025-02-22 08:54:16 +01:00
radv_nir_apply_pipeline_layout.c radv/nir_apply_pipeline_layout: clean up progress handling 2025-02-28 14:38:14 +00:00
radv_nir_export_multiview.c treewide: Switch to nir_progress 2025-02-26 15:19:53 +00:00
radv_nir_lower_abi.c treewide: Switch to nir_progress 2025-02-26 15:19:53 +00:00
radv_nir_lower_cooperative_matrix.c treewide: Switch to nir_progress 2025-02-26 15:19:53 +00:00
radv_nir_lower_fs_barycentric.c radv/nir_lower_fs_barycentric: intrinsic pass 2025-02-24 20:19:10 +00:00
radv_nir_lower_fs_intrinsics.c radv/nir_lower_fs_intrinsics: intrinsic pass 2025-02-24 20:19:10 +00:00
radv_nir_lower_hit_attrib_derefs.c radv/rt: don't split array/struct payload variables 2024-09-24 15:41:04 +00:00
radv_nir_lower_intrinsics_early.c radv/nir_lower_intrinsics_early: intrinsic pass 2025-02-24 20:19:10 +00:00
radv_nir_lower_io.c radv: Don't use deprecated NIR_PASS_V macro for AMD common NIR passes. 2025-02-22 08:54:17 +01:00
radv_nir_lower_primitive_shading_rate.c treewide: Switch to nir_progress 2025-02-26 15:19:53 +00:00
radv_nir_lower_ray_queries.c radv: Implement multidimensional ray query arrays 2025-03-03 12:07:47 +00:00
radv_nir_lower_view_index.c radv/nir_lower_view_index: intrinsic pass 2025-02-24 20:19:10 +00:00
radv_nir_lower_viewport_to_zero.c radv/nir_lower_viewport_to_zero: intrinsic pass 2025-02-24 20:19:10 +00:00
radv_nir_lower_vs_inputs.c nir,aco,radv: add align_mul/offset to buffer_amd intrinsics 2025-02-07 13:52:57 +00:00
radv_nir_opt_fs_builtins.c radv: Optimize fs builtins using static gfx state 2025-02-17 09:45:15 +00:00
radv_nir_opt_tid_function.c radv/nir: update radv_nir_opt_tid for derivative group quads 2025-02-04 08:11:16 +00:00
radv_nir_remap_color_attachment.c radv: implement VK_KHR_dynamic_rendering_local_read 2024-05-07 10:35:04 +00:00
radv_nir_rt_common.c radv: Add missing includes and remove unnecessary NIR includes. 2025-02-12 22:33:07 +01:00
radv_nir_rt_common.h radv: Add missing includes and remove unnecessary NIR includes. 2025-02-12 22:33:07 +01:00
radv_nir_rt_shader.c treewide: Switch to nir_progress 2025-02-26 15:19:53 +00:00