summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/v3d/v3d_context.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-06-13 13:44:01 -0700
committerEric Anholt <[email protected]>2018-06-14 17:03:16 -0700
commitcd2e673abc436d71e304fd5ad577054197041c7f (patch)
treebde441620854c98c91cff193dfaa23d7c49fc7a0 /src/gallium/drivers/v3d/v3d_context.h
parentd91e06a06572a4c4772b02dfc39dcbd283b490f9 (diff)
v3d: Fix polygon offset for Z16 buffers.
Fixes: dEQP-GLES3.functional.polygon_offset.fixed16_displacement_with_units dEQP-GLES3.functional.polygon_offset.fixed16_render_with_units
Diffstat (limited to 'src/gallium/drivers/v3d/v3d_context.h')
-rw-r--r--src/gallium/drivers/v3d/v3d_context.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/v3d/v3d_context.h b/src/gallium/drivers/v3d/v3d_context.h
index f74541fae33..c0de05d3630 100644
--- a/src/gallium/drivers/v3d/v3d_context.h
+++ b/src/gallium/drivers/v3d/v3d_context.h
@@ -432,6 +432,11 @@ struct v3d_rasterizer_state {
*/
uint16_t offset_units;
/**
+ * The HW treats polygon offset units based on a Z24 buffer, so we
+ * need to scale up offset_units if we're only Z16.
+ */
+ uint16_t z16_offset_units;
+ /**
* Half-float (1/8/7 bits) value of polygon offset scale for
* VC5_PACKET_DEPTH_OFFSET
*/