pvr: Transfer PBE source snorm format should be signed
authorOskar Rundgren <oskar.rundgren@imgtec.com>
Wed, 3 May 2023 16:56:13 +0000 (17:56 +0100)
committerMarge Bot <emma+marge@anholt.net>
Tue, 16 May 2023 18:09:03 +0000 (18:09 +0000)
Wrong shader was picked because snorm formats were treated as unsigned.

Signed-off-by: Oskar Rundgren <oskar.rundgren@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22918>

src/imagination/vulkan/pvr_job_transfer.c

index 49bdd50..cbe3f7d 100644 (file)
@@ -325,7 +325,8 @@ pvr_pbe_src_format_normal(VkFormat src_format,
                           bool dont_force_pbe,
                           enum pvr_transfer_pbe_pixel_src *src_format_out)
 {
-   bool dst_signed = vk_format_is_sint(dst_format);
+   bool dst_signed = vk_format_is_sint(dst_format) ||
+                     vk_format_is_snorm(dst_format);
 
    if (vk_format_is_int(dst_format)) {
       uint32_t red_width;