From 855fa788663b205d77cc54b6eeff6289d5aa869e Mon Sep 17 00:00:00 2001 From: Danylo Piliaiev Date: Mon, 6 Feb 2023 20:38:41 +0100 Subject: [PATCH] turnip: Ensure that there is no renderpass rotation in binning It appears that A6XX_GRAS_SC_CNTL::rotation applies to the binning, so we should ensure there is no unexpected rotations and apply with A6XX_GRAS_SC_CNTL during the binning pass. Signed-off-by: Danylo Piliaiev Part-of: --- src/freedreno/vulkan/tu_cmd_buffer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c index 6a551abd017..b35c6902e06 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.c +++ b/src/freedreno/vulkan/tu_cmd_buffer.c @@ -555,9 +555,15 @@ tu_cs_emit_draw_state(struct tu_cs *cs, uint32_t id, struct tu_draw_state state) enable_mask = CP_SET_DRAW_STATE__0_GMEM; break; case TU_DRAW_STATE_INPUT_ATTACHMENTS_SYSMEM: - case TU_DRAW_STATE_PRIM_MODE_SYSMEM: enable_mask = CP_SET_DRAW_STATE__0_SYSMEM; break; + case TU_DRAW_STATE_PRIM_MODE_SYSMEM: + /* By also applying the state during binning we ensure that there + * is no rotation applied, by previous A6XX_GRAS_SC_CNTL::rotation. + */ + enable_mask = + CP_SET_DRAW_STATE__0_SYSMEM | CP_SET_DRAW_STATE__0_BINNING; + break; default: enable_mask = CP_SET_DRAW_STATE__0_GMEM | CP_SET_DRAW_STATE__0_SYSMEM |