diff options
author | Tomeu Vizoso <[email protected]> | 2019-11-13 08:42:34 +0100 |
---|---|---|
committer | Tomeu Vizoso <[email protected]> | 2019-11-15 14:45:29 +0100 |
commit | 7d24cef20025d7d58a4e9ceac321e5a82c732ee2 (patch) | |
tree | b625f81275659b837bb6275ca2acaba49a24c870 /src/gallium | |
parent | c061185e17aabd0e6802bde12eb8428f6b263922 (diff) |
panfrost: Multiply offset_units by 2
Per the spec, the units passed to glPolygonOffset are to be multiplied
by an implementation-defined constant.
On Midgard, this constant seems to be 2.
Signed-off-by: Tomeu Vizoso <[email protected]>
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_context.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index dba2517c92a..556909613cb 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -1706,7 +1706,7 @@ panfrost_bind_rasterizer_state( ctx->rasterizer = hwcso; ctx->dirty |= PAN_DIRTY_RASTERIZER; - ctx->fragment_shader_core.depth_units = ctx->rasterizer->base.offset_units; + ctx->fragment_shader_core.depth_units = ctx->rasterizer->base.offset_units * 2.0f; ctx->fragment_shader_core.depth_factor = ctx->rasterizer->base.offset_scale; /* Gauranteed with the core GL call, so don't expose ARB_polygon_offset */ |