turnip: fix srgb MRT
authorJonathan Marek <jonathan@marek.ca>
Thu, 27 Feb 2020 15:22:02 +0000 (10:22 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 28 Feb 2020 14:04:20 +0000 (14:04 +0000)
Register packing macros makes this only set the first bit. Set to whole
dword to fix srgb for color attachments >0.

Fixes: 59f29fc8 ("turnip: Convert the rest of tu_cmd_buffer.c over to the new pack macros.")
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3979>

src/freedreno/vulkan/tu_cmd_buffer.c

index 5de52bb472187b976239d1bc3f67bb209254dcac..d24e869daf2b7a88dfdf8bc1038ccf3900ee1316 100644 (file)
@@ -522,10 +522,10 @@ tu6_emit_mrt(struct tu_cmd_buffer *cmd,
    }
 
    tu_cs_emit_regs(cs,
-                   A6XX_RB_SRGB_CNTL(srgb_cntl));
+                   A6XX_RB_SRGB_CNTL(.dword = srgb_cntl));
 
    tu_cs_emit_regs(cs,
-                   A6XX_SP_SRGB_CNTL(srgb_cntl));
+                   A6XX_SP_SRGB_CNTL(.dword = srgb_cntl));
 
    tu_cs_emit_regs(cs,
                    A6XX_RB_RENDER_COMPONENTS(