Module: Mesa Branch: master Commit: 8305766e0e8d7b2b9b7db86472c213ff4307a3c7 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8305766e0e8d7b2b9b7db86472c213ff4307a3c7
Author: Alyssa Rosenzweig <[email protected]> Date: Thu Jul 11 07:02:26 2019 -0700 panfrost: Wire up GLES2-class polygon offset Signed-off-by: Alyssa Rosenzweig <[email protected]> --- src/gallium/drivers/panfrost/pan_context.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index b3545e1748a..17752c98602 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -1805,6 +1805,17 @@ 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_factor = ctx->rasterizer->base.offset_scale; + + /* Gauranteed with the core GL call, so don't expose ARB_polygon_offset */ + assert(ctx->rasterizer->base.offset_clamp == 0.0); + + /* XXX: Which bit is which? Does this maybe allow offseting not-tri? */ + + SET_BIT(ctx->fragment_shader_core.unknown2_4, MALI_DEPTH_RANGE_A, ctx->rasterizer->base.offset_tri); + SET_BIT(ctx->fragment_shader_core.unknown2_4, MALI_DEPTH_RANGE_B, ctx->rasterizer->base.offset_tri); + /* Point sprites are emulated */ struct panfrost_shader_state *variant = _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
