summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_emit.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-09-24 13:59:53 -0700
committerEric Anholt <[email protected]>2014-09-24 15:56:39 -0700
commit7fa399f93af288bc0b9764819d4e5b6184e75d78 (patch)
tree98394c211268435336e2204a91e1610e11eaea99 /src/gallium/drivers/vc4/vc4_emit.c
parent6abbdfe3dbe7d4372b30461e97b4ad557ff4e5d2 (diff)
vc4: Actually add support for polygon offset.
Setting the bit without setting the offset values is kind of useless. Fixes piglit polygon-offset (but not polygon-mode-offset).
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_emit.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_emit.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_emit.c b/src/gallium/drivers/vc4/vc4_emit.c
index 2a25ca08b9d..49f0010e20c 100644
--- a/src/gallium/drivers/vc4/vc4_emit.c
+++ b/src/gallium/drivers/vc4/vc4_emit.c
@@ -49,6 +49,12 @@ vc4_emit_state(struct pipe_context *pctx)
vc4->zsa->config_bits[2]);
}
+ if (vc4->dirty & VC4_DIRTY_RASTERIZER) {
+ cl_u8(&vc4->bcl, VC4_PACKET_DEPTH_OFFSET);
+ cl_u16(&vc4->bcl, vc4->rasterizer->offset_factor);
+ cl_u16(&vc4->bcl, vc4->rasterizer->offset_units);
+ }
+
if (vc4->dirty & VC4_DIRTY_VIEWPORT) {
cl_u8(&vc4->bcl, VC4_PACKET_CLIPPER_XY_SCALING);
cl_f(&vc4->bcl, vc4->viewport.scale[0] * 16.0f);