From: Alyssa Rosenzweig Date: Thu, 11 Jul 2019 14:02:26 +0000 (-0700) Subject: panfrost: Wire up GLES2-class polygon offset X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8305766e0e8d7b2b9b7db86472c213ff4307a3c7;p=mesa.git panfrost: Wire up GLES2-class polygon offset Signed-off-by: Alyssa Rosenzweig --- 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 =