From 2be37d1c9659bb13285925b1ced7f1c8c68c95cc Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sat, 25 Nov 2023 14:18:02 -0400 Subject: [PATCH] asahi: double depth bias fixes gl-1.4-polygon-offset, other drivers do this too. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/asahi/agx_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/asahi/agx_state.c b/src/gallium/drivers/asahi/agx_state.c index 8c2ce7d250e..66fd983a33a 100644 --- a/src/gallium/drivers/asahi/agx_state.c +++ b/src/gallium/drivers/asahi/agx_state.c @@ -1073,7 +1073,7 @@ agx_upload_depth_bias(struct agx_batch *batch, util_dynarray_grow_bytes(&batch->depth_bias, 1, AGX_DEPTH_BIAS_LENGTH); agx_pack(ptr, DEPTH_BIAS, cfg) { - cfg.depth_bias = rast->offset_units; + cfg.depth_bias = rast->offset_units * 2.0f; cfg.slope_scale = rast->offset_scale; cfg.clamp = rast->offset_clamp; }