summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/freedreno
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2018-12-11 12:36:52 -0500
committerRob Clark <robdclark@gmail.com>2018-12-13 15:51:01 -0500
commit57b76ee2a877057e1d32f9719cada69cc17562e2 (patch)
tree6050f0b50592569b430b71786eebb1dca5004099 /src/gallium/drivers/freedreno
parentd15fc787bc71f40a0bd82babcee5cb6589399f25 (diff)
freedreno/a6xx: more blitter fixes
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_blitter.c32
1 files changed, 22 insertions, 10 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c
index 456aedd29d3..4be57c0f75a 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c
@@ -296,13 +296,13 @@ emit_blit_buffer(struct fd_ringbuffer *ring, const struct pipe_blit_info *info)
OUT_RING(ring, 0x3f);
OUT_WFI5(ring);
- OUT_PKT4(ring, 0x8c01, 1);
+ OUT_PKT4(ring, REG_A6XX_RB_UNKNOWN_8C01, 1);
OUT_RING(ring, 0);
- OUT_PKT4(ring, 0xacc0, 1);
+ OUT_PKT4(ring, REG_A6XX_SP_2D_SRC_FORMAT, 1);
OUT_RING(ring, 0xf180);
- OUT_PKT4(ring, 0x8e04, 1);
+ OUT_PKT4(ring, REG_A6XX_RB_UNKNOWN_8E04, 1);
OUT_RING(ring, 0x01000000);
OUT_PKT7(ring, CP_BLIT, 1);
@@ -310,7 +310,7 @@ emit_blit_buffer(struct fd_ringbuffer *ring, const struct pipe_blit_info *info)
OUT_WFI5(ring);
- OUT_PKT4(ring, 0x8e04, 1);
+ OUT_PKT4(ring, REG_A6XX_RB_UNKNOWN_8E04, 1);
OUT_RING(ring, 0);
}
}
@@ -480,13 +480,25 @@ emit_blit_texture(struct fd_ringbuffer *ring, const struct pipe_blit_info *info)
OUT_RING(ring, 0x3f);
OUT_WFI5(ring);
- OUT_PKT4(ring, 0x8c01, 1);
+ OUT_PKT4(ring, REG_A6XX_RB_UNKNOWN_8C01, 1);
OUT_RING(ring, 0);
- OUT_PKT4(ring, 0xacc0, 1);
- OUT_RING(ring, 0xf180);
-
- OUT_PKT4(ring, 0x8e04, 1);
+ OUT_PKT4(ring, REG_A6XX_SP_2D_SRC_FORMAT, 1);
+ OUT_RING(ring, A6XX_SP_2D_SRC_FORMAT_COLOR_FORMAT(sfmt) |
+ COND(util_format_is_pure_sint(info->src.format),
+ A6XX_SP_2D_SRC_FORMAT_SINT) |
+ COND(util_format_is_pure_uint(info->src.format),
+ A6XX_SP_2D_SRC_FORMAT_UINT) |
+ COND(util_format_is_snorm(info->src.format),
+ A6XX_SP_2D_SRC_FORMAT_SINT |
+ A6XX_SP_2D_SRC_FORMAT_NORM) |
+ COND(util_format_is_unorm(info->src.format),
+// TODO sometimes blob uses UINT+NORM but dEQP seems unhappy about that
+// A6XX_SP_2D_SRC_FORMAT_UINT |
+ A6XX_SP_2D_SRC_FORMAT_NORM) |
+ 0xf000);
+
+ OUT_PKT4(ring, REG_A6XX_RB_UNKNOWN_8E04, 1);
OUT_RING(ring, 0x01000000);
OUT_PKT7(ring, CP_BLIT, 1);
@@ -494,7 +506,7 @@ emit_blit_texture(struct fd_ringbuffer *ring, const struct pipe_blit_info *info)
OUT_WFI5(ring);
- OUT_PKT4(ring, 0x8e04, 1);
+ OUT_PKT4(ring, REG_A6XX_RB_UNKNOWN_8E04, 1);
OUT_RING(ring, 0);
}
}