summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/a2xx
diff options
context:
space:
mode:
authorJonathan Marek <[email protected]>2018-12-09 23:14:41 -0500
committerRob Clark <[email protected]>2019-01-21 09:22:16 -0500
commit0286a11b7e5ecb7f428a0eaab014a33bd444ea0d (patch)
tree66d37f1a289faa8501223a3ba50f401cf511eaf8 /src/gallium/drivers/freedreno/a2xx
parent64b12520a2848913fa78c12f48eaca39f42584c9 (diff)
freedreno: a2xx: fix gmem2mem viewport
Fixes cases where previous viewport values might case gmem2mem to fail. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a2xx')
-rw-r--r--src/gallium/drivers/freedreno/a2xx/fd2_gmem.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c b/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c
index 199bf948b92..6ffeefb3784 100644
--- a/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c
+++ b/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c
@@ -160,6 +160,13 @@ fd2_emit_tile_gmem2mem(struct fd_batch *batch, struct fd_tile *tile)
OUT_RING(ring, CP_REG(REG_A2XX_PA_CL_CLIP_CNTL));
OUT_RING(ring, 0x00000000);
+ OUT_PKT3(ring, CP_SET_CONSTANT, 5);
+ OUT_RING(ring, CP_REG(REG_A2XX_PA_CL_VPORT_XSCALE));
+ OUT_RING(ring, fui((float) tile->bin_w / 2.0)); /* XSCALE */
+ OUT_RING(ring, fui((float) tile->bin_w / 2.0)); /* XOFFSET */
+ OUT_RING(ring, fui((float) tile->bin_h / 2.0)); /* YSCALE */
+ OUT_RING(ring, fui((float) tile->bin_h / 2.0)); /* YOFFSET */
+
OUT_PKT3(ring, CP_SET_CONSTANT, 2);
OUT_RING(ring, CP_REG(REG_A2XX_RB_MODECONTROL));
OUT_RING(ring, A2XX_RB_MODECONTROL_EDRAM_MODE(EDRAM_COPY));