summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_hw_context.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-03-07 17:15:23 +0100
committerMarek Olšák <[email protected]>2012-03-08 11:23:24 +0100
commitf6546535c9c8ce001e081487b8cd30b6703c0f4d (patch)
tree1ef2bd6ff2ac77a9902e4120bfc6e519b2769659 /src/gallium/drivers/r600/r600_hw_context.c
parentc7eaf274a9b7e3e5f4b060be2320eb605464ba5c (diff)
r600g: use SX_MISC to implement rasterizer discard
Yeah I am reworking it again. This is way simpler than the other methods.
Diffstat (limited to 'src/gallium/drivers/r600/r600_hw_context.c')
-rw-r--r--src/gallium/drivers/r600/r600_hw_context.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c
index 285ecde5dd6..1d272e93e9c 100644
--- a/src/gallium/drivers/r600/r600_hw_context.c
+++ b/src/gallium/drivers/r600/r600_hw_context.c
@@ -423,6 +423,7 @@ static const struct r600_reg r600_context_reg_list[] = {
{R_028E74_PA_CL_UCP5_Y, 0, 0},
{R_028E78_PA_CL_UCP5_Z, 0, 0},
{R_028E7C_PA_CL_UCP5_W, 0, 0},
+ {R_028350_SX_MISC, 0, 0},
{R_028380_SQ_VTX_SEMANTIC_0, 0, 0},
{R_028384_SQ_VTX_SEMANTIC_1, 0, 0},
{R_028388_SQ_VTX_SEMANTIC_2, 0, 0},
@@ -1237,6 +1238,11 @@ void r600_context_flush(struct r600_context *ctx, unsigned flags)
cs->buf[cs->cdw++] = PKT3(PKT3_EVENT_WRITE, 0, 0);
cs->buf[cs->cdw++] = EVENT_TYPE(EVENT_TYPE_PS_PARTIAL_FLUSH) | EVENT_INDEX(4);
+ /* old kernels and userspace don't set SX_MISC, so we must reset it to 0 here */
+ if (ctx->chip_class <= R700) {
+ r600_write_context_reg(cs, R_028350_SX_MISC, 0);
+ }
+
/* force to keep tiling flags */
flags |= RADEON_FLUSH_KEEP_TILING_FLAGS;