Mesa (master): panfrost: Multiply offset_units by 2

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 15 14:05:21 UTC 2019


Module: Mesa
Branch: master
Commit: 7d24cef20025d7d58a4e9ceac321e5a82c732ee2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7d24cef20025d7d58a4e9ceac321e5a82c732ee2

Author: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Date:   Wed Nov 13 08:42:34 2019 +0100

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 <tomeu.vizoso at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>

---

 .gitlab-ci/deqp-panfrost-t760-fails.txt    | 2 --
 .gitlab-ci/deqp-panfrost-t860-fails.txt    | 2 --
 src/gallium/drivers/panfrost/pan_context.c | 2 +-
 3 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/.gitlab-ci/deqp-panfrost-t760-fails.txt b/.gitlab-ci/deqp-panfrost-t760-fails.txt
index efade45201a..9b2ba77a800 100644
--- a/.gitlab-ci/deqp-panfrost-t760-fails.txt
+++ b/.gitlab-ci/deqp-panfrost-t760-fails.txt
@@ -26,7 +26,5 @@ dEQP-GLES2.functional.fbo.render.shared_depthbuffer.rbo_rgb565_depth_component16
 dEQP-GLES2.functional.fbo.render.shared_depthbuffer.tex2d_rgba_depth_component16 Fail
 dEQP-GLES2.functional.fbo.render.shared_depthbuffer.tex2d_rgb_depth_component16 Fail
 dEQP-GLES2.functional.fragment_ops.interaction.basic_shader.6  Fail
-dEQP-GLES2.functional.polygon_offset.default_render_with_units Fail
-dEQP-GLES2.functional.polygon_offset.fixed16_render_with_units Fail
 dEQP-GLES2.functional.shaders.scoping.valid.local_variable_hides_function_parameter_fragment Fail
 dEQP-GLES2.functional.shaders.scoping.valid.local_variable_hides_function_parameter_vertex Fail
diff --git a/.gitlab-ci/deqp-panfrost-t860-fails.txt b/.gitlab-ci/deqp-panfrost-t860-fails.txt
index a0cddcc8c86..cf49e8e73f0 100644
--- a/.gitlab-ci/deqp-panfrost-t860-fails.txt
+++ b/.gitlab-ci/deqp-panfrost-t860-fails.txt
@@ -25,7 +25,5 @@ dEQP-GLES2.functional.fbo.render.shared_colorbuffer.tex2d_rgb_depth_component16
 dEQP-GLES2.functional.fbo.render.shared_depthbuffer.rbo_rgb565_depth_component16 Fail
 dEQP-GLES2.functional.fbo.render.shared_depthbuffer.tex2d_rgba_depth_component16 Fail
 dEQP-GLES2.functional.fbo.render.shared_depthbuffer.tex2d_rgb_depth_component16 Fail
-dEQP-GLES2.functional.polygon_offset.default_render_with_units Fail
-dEQP-GLES2.functional.polygon_offset.fixed16_render_with_units Fail
 dEQP-GLES2.functional.shaders.scoping.valid.local_variable_hides_function_parameter_fragment Fail
 dEQP-GLES2.functional.shaders.scoping.valid.local_variable_hides_function_parameter_vertex Fail
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 */




More information about the mesa-commit mailing list