Mesa (main): draw/llvmpipe: multiply polygon offset units by 2

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jul 23 01:19:40 UTC 2021


Module: Mesa
Branch: main
Commit: 1e5a470b43fd1d72c3841a8759a4db38f366358a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1e5a470b43fd1d72c3841a8759a4db38f366358a

Author: Dave Airlie <airlied at redhat.com>
Date:   Tue Jul 21 07:05:17 2020 +1000

draw/llvmpipe: multiply polygon offset units by 2

I was trying to fix this test, but noticed brw_clip.c in i965
does a * 2 here, and it seems to fix this test as well.

Fixes:
dEQP-GLES2.functional.polygon_offset.default_displacement_with_units

Fixes: f9e2c2432686 ("draw,llvmpipe,util: add depth bias calculation for arb_depth_buffer_float")

Reviewed-by: Roland Scheidegger <sroland at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12029>

---

 src/gallium/auxiliary/draw/draw_pipe_offset.c           | 2 +-
 src/gallium/drivers/llvmpipe/ci/deqp-llvmpipe-fails.txt | 5 -----
 src/gallium/drivers/llvmpipe/ci/llvmpipe-quick_gl.txt   | 5 -----
 src/gallium/drivers/llvmpipe/lp_state_setup.c           | 2 +-
 src/gallium/drivers/softpipe/ci/softpipe-quick.txt      | 1 -
 src/gallium/drivers/virgl/ci/deqp-virgl-gl-fails.txt    | 5 -----
 src/gallium/drivers/virgl/ci/deqp-virgl-gles-fails.txt  | 5 -----
 src/gallium/drivers/virgl/ci/traces-virgl.yml           | 2 +-
 src/gallium/drivers/zink/ci/deqp-zink-lvp-fails.txt     | 3 ---
 src/gallium/drivers/zink/ci/piglit-zink-lvp-fails.txt   | 4 ++--
 10 files changed, 5 insertions(+), 29 deletions(-)

diff --git a/src/gallium/auxiliary/draw/draw_pipe_offset.c b/src/gallium/auxiliary/draw/draw_pipe_offset.c
index 08d47f005fd..769e7ca372d 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_offset.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_offset.c
@@ -187,7 +187,7 @@ static void offset_first_tri( struct draw_stage *stage,
       if (stage->draw->floating_point_depth) {
          offset->units = (float) rast->offset_units;
       } else {
-         offset->units = (float) (rast->offset_units * stage->draw->mrd);
+         offset->units = (float) (rast->offset_units * stage->draw->mrd * 2);
       }
    }
    else {
diff --git a/src/gallium/drivers/llvmpipe/ci/deqp-llvmpipe-fails.txt b/src/gallium/drivers/llvmpipe/ci/deqp-llvmpipe-fails.txt
index 952e45dbd21..7299b31eed3 100644
--- a/src/gallium/drivers/llvmpipe/ci/deqp-llvmpipe-fails.txt
+++ b/src/gallium/drivers/llvmpipe/ci/deqp-llvmpipe-fails.txt
@@ -16,7 +16,6 @@ dEQP-GLES2.functional.clipping.point.wide_point_clip_viewport_corner,Fail
 dEQP-GLES2.functional.clipping.triangle_vertex.clip_two.clip_neg_y_neg_z_and_neg_x_neg_y_pos_z,Fail
 dEQP-GLES2.functional.clipping.triangle_vertex.clip_two.clip_pos_y_pos_z_and_neg_x_neg_y_neg_z,Fail
 dEQP-GLES2.functional.polygon_offset.default_displacement_with_units,Fail
-dEQP-GLES2.functional.polygon_offset.fixed16_displacement_with_units,Fail
 dEQP-GLES2.functional.rasterization.interpolation.basic.line_loop_wide,Fail
 dEQP-GLES2.functional.rasterization.interpolation.basic.line_strip_wide,Fail
 dEQP-GLES2.functional.rasterization.interpolation.basic.lines_wide,Fail
@@ -41,11 +40,7 @@ dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_dst_x,Fa
 dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_dst_y,Fail
 dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_x,Fail
 dEQP-GLES3.functional.polygon_offset.default_displacement_with_units,Fail
-dEQP-GLES3.functional.polygon_offset.default_render_with_units,Fail
-dEQP-GLES3.functional.polygon_offset.fixed16_displacement_with_units,Fail
-dEQP-GLES3.functional.polygon_offset.fixed16_render_with_units,Fail
 dEQP-GLES3.functional.polygon_offset.fixed24_displacement_with_units,Fail
-dEQP-GLES3.functional.polygon_offset.fixed24_render_with_units,Fail
 dEQP-GLES3.functional.polygon_offset.float32_displacement_with_units,Fail
 dEQP-GLES3.functional.rasterization.fbo.rbo_singlesample.interpolation.lines_wide,Fail
 dEQP-GLES3.functional.rasterization.fbo.texture_2d.interpolation.lines_wide,Fail
diff --git a/src/gallium/drivers/llvmpipe/ci/llvmpipe-quick_gl.txt b/src/gallium/drivers/llvmpipe/ci/llvmpipe-quick_gl.txt
index 84d1f4a622e..4611beba090 100644
--- a/src/gallium/drivers/llvmpipe/ci/llvmpipe-quick_gl.txt
+++ b/src/gallium/drivers/llvmpipe/ci/llvmpipe-quick_gl.txt
@@ -140,10 +140,6 @@ spec/!opengl 1.1/draw-pixels samples=6: skip
 spec/!opengl 1.1/draw-pixels samples=8: skip
 spec/!opengl 1.1/linestipple/line strip: fail
 spec/!opengl 1.1/polygon-mode-facing: fail
-spec/!opengl 1.1/polygon-mode-offset/config 0: expected white pixel on bottom edge: fail
-spec/!opengl 1.1/polygon-mode-offset/config 0: expected white pixel on left edge: fail
-spec/!opengl 1.1/polygon-mode-offset/config 0: expected white pixel on right edge: fail
-spec/!opengl 1.1/polygon-mode-offset/config 0: expected white pixel on top edge: fail
 spec/!opengl 1.1/polygon-mode-offset/config 3: expected white pixel on bottom edge: fail
 spec/!opengl 1.1/polygon-mode-offset/config 3: expected white pixel on left edge: fail
 spec/!opengl 1.1/polygon-mode-offset/config 3: expected white pixel on right edge: fail
@@ -205,7 +201,6 @@ spec/!opengl 1.4/copy-pixels samples=32: skip
 spec/!opengl 1.4/copy-pixels samples=4: skip
 spec/!opengl 1.4/copy-pixels samples=6: skip
 spec/!opengl 1.4/copy-pixels samples=8: skip
-spec/!opengl 1.4/gl-1.4-polygon-offset: fail
 spec/!opengl 1.4/gl-1.4-rgba-mipmap-texture-with-rgb-visual: skip
 spec/!opengl 2.0/vertex-program-two-side back back2/gs-out and fs: skip
 spec/!opengl 2.0/vertex-program-two-side back back2/tcs-out, tes and fs: skip
diff --git a/src/gallium/drivers/llvmpipe/lp_state_setup.c b/src/gallium/drivers/llvmpipe/lp_state_setup.c
index e092179cf80..e214d6e48c1 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_setup.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_setup.c
@@ -863,7 +863,7 @@ lp_make_setup_variant_key(struct llvmpipe_context *lp,
       key->pgon_offset_units = (float) lp->rasterizer->offset_units;
    } else {
       key->pgon_offset_units =
-         (float) (lp->rasterizer->offset_units * lp->mrd);
+         (float) (lp->rasterizer->offset_units * lp->mrd * 2);
    }
 
    key->pgon_offset_scale = lp->rasterizer->offset_scale;
diff --git a/src/gallium/drivers/softpipe/ci/softpipe-quick.txt b/src/gallium/drivers/softpipe/ci/softpipe-quick.txt
index 44a32da903d..958eaaee2bd 100644
--- a/src/gallium/drivers/softpipe/ci/softpipe-quick.txt
+++ b/src/gallium/drivers/softpipe/ci/softpipe-quick.txt
@@ -257,7 +257,6 @@ spec/!opengl 1.4/copy-pixels samples=32: skip
 spec/!opengl 1.4/copy-pixels samples=4: skip
 spec/!opengl 1.4/copy-pixels samples=6: skip
 spec/!opengl 1.4/copy-pixels samples=8: skip
-spec/!opengl 1.4/gl-1.4-polygon-offset: fail
 spec/!opengl 1.4/gl-1.4-rgba-mipmap-texture-with-rgb-visual: skip
 spec/!opengl 2.0/vertex-program-two-side back back2/tcs-out, tes and fs: skip
 spec/!opengl 2.0/vertex-program-two-side back back2/tes-out and fs: skip
diff --git a/src/gallium/drivers/virgl/ci/deqp-virgl-gl-fails.txt b/src/gallium/drivers/virgl/ci/deqp-virgl-gl-fails.txt
index 8bff224724c..7884dff1fae 100644
--- a/src/gallium/drivers/virgl/ci/deqp-virgl-gl-fails.txt
+++ b/src/gallium/drivers/virgl/ci/deqp-virgl-gl-fails.txt
@@ -6,7 +6,6 @@ dEQP-GLES2.functional.clipping.point.wide_point_clip_viewport_corner,Fail
 dEQP-GLES2.functional.clipping.triangle_vertex.clip_two.clip_neg_y_neg_z_and_neg_x_neg_y_pos_z,Fail
 dEQP-GLES2.functional.clipping.triangle_vertex.clip_two.clip_pos_y_pos_z_and_neg_x_neg_y_neg_z,Fail
 dEQP-GLES2.functional.polygon_offset.default_displacement_with_units,Fail
-dEQP-GLES2.functional.polygon_offset.fixed16_displacement_with_units,Fail
 dEQP-GLES2.functional.rasterization.interpolation.basic.line_loop_wide,Fail
 dEQP-GLES2.functional.rasterization.interpolation.basic.line_strip_wide,Fail
 dEQP-GLES2.functional.rasterization.interpolation.basic.lines_wide,Fail
@@ -31,11 +30,7 @@ dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_dst_x,Fa
 dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_dst_y,Fail
 dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_x,Fail
 dEQP-GLES3.functional.polygon_offset.default_displacement_with_units,Fail
-dEQP-GLES3.functional.polygon_offset.default_render_with_units,Fail
-dEQP-GLES3.functional.polygon_offset.fixed16_displacement_with_units,Fail
-dEQP-GLES3.functional.polygon_offset.fixed16_render_with_units,Fail
 dEQP-GLES3.functional.polygon_offset.fixed24_displacement_with_units,Fail
-dEQP-GLES3.functional.polygon_offset.fixed24_render_with_units,Fail
 dEQP-GLES3.functional.polygon_offset.float32_displacement_with_units,Fail
 dEQP-GLES3.functional.rasterization.fbo.rbo_singlesample.interpolation.lines_wide,Fail
 dEQP-GLES3.functional.rasterization.fbo.texture_2d.interpolation.lines_wide,Fail
diff --git a/src/gallium/drivers/virgl/ci/deqp-virgl-gles-fails.txt b/src/gallium/drivers/virgl/ci/deqp-virgl-gles-fails.txt
index 8799d4a4a25..84f95386d0b 100644
--- a/src/gallium/drivers/virgl/ci/deqp-virgl-gles-fails.txt
+++ b/src/gallium/drivers/virgl/ci/deqp-virgl-gles-fails.txt
@@ -6,7 +6,6 @@ dEQP-GLES2.functional.clipping.point.wide_point_clip_viewport_corner,Fail
 dEQP-GLES2.functional.clipping.triangle_vertex.clip_two.clip_neg_y_neg_z_and_neg_x_neg_y_pos_z,Fail
 dEQP-GLES2.functional.clipping.triangle_vertex.clip_two.clip_pos_y_pos_z_and_neg_x_neg_y_neg_z,Fail
 dEQP-GLES2.functional.polygon_offset.default_displacement_with_units,Fail
-dEQP-GLES2.functional.polygon_offset.fixed16_displacement_with_units,Fail
 dEQP-GLES2.functional.rasterization.interpolation.basic.line_loop_wide,Fail
 dEQP-GLES2.functional.rasterization.interpolation.basic.line_strip_wide,Fail
 dEQP-GLES2.functional.rasterization.interpolation.basic.lines_wide,Fail
@@ -31,11 +30,7 @@ dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_dst_x,Fa
 dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_dst_y,Fail
 dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_x,Fail
 dEQP-GLES3.functional.polygon_offset.default_displacement_with_units,Fail
-dEQP-GLES3.functional.polygon_offset.default_render_with_units,Fail
-dEQP-GLES3.functional.polygon_offset.fixed16_displacement_with_units,Fail
-dEQP-GLES3.functional.polygon_offset.fixed16_render_with_units,Fail
 dEQP-GLES3.functional.polygon_offset.fixed24_displacement_with_units,Fail
-dEQP-GLES3.functional.polygon_offset.fixed24_render_with_units,Fail
 dEQP-GLES3.functional.polygon_offset.float32_displacement_with_units,Fail
 dEQP-GLES3.functional.rasterization.fbo.rbo_singlesample.interpolation.lines_wide,Fail
 dEQP-GLES3.functional.rasterization.fbo.texture_2d.interpolation.lines_wide,Fail
diff --git a/src/gallium/drivers/virgl/ci/traces-virgl.yml b/src/gallium/drivers/virgl/ci/traces-virgl.yml
index 0b5029d3979..7e964579482 100644
--- a/src/gallium/drivers/virgl/ci/traces-virgl.yml
+++ b/src/gallium/drivers/virgl/ci/traces-virgl.yml
@@ -193,7 +193,7 @@ traces:
   - path: humus/CelShading.trace
     expectations:
       - device: gl-virgl
-        checksum: da817304110f4fb7fdbcdf3f83fe184d
+        checksum: 7145da554bbfe55f83ed43e7c58d854c
   - path: humus/DynamicBranching3.trace
     expectations:
       - device: gl-virgl
diff --git a/src/gallium/drivers/zink/ci/deqp-zink-lvp-fails.txt b/src/gallium/drivers/zink/ci/deqp-zink-lvp-fails.txt
index 794d5cb07f7..a58313840f5 100644
--- a/src/gallium/drivers/zink/ci/deqp-zink-lvp-fails.txt
+++ b/src/gallium/drivers/zink/ci/deqp-zink-lvp-fails.txt
@@ -5,14 +5,11 @@ dEQP-GLES2.functional.clipping.triangle_vertex.clip_three.clip_pos_x_and_neg_y_n
 dEQP-GLES2.functional.clipping.triangle_vertex.clip_two.clip_neg_y_neg_z_and_neg_x_neg_y_pos_z,Fail
 dEQP-GLES2.functional.clipping.triangle_vertex.clip_two.clip_pos_y_pos_z_and_neg_x_neg_y_neg_z,Fail
 dEQP-GLES2.functional.polygon_offset.default_displacement_with_units,Fail
-dEQP-GLES2.functional.polygon_offset.fixed16_displacement_with_units,Fail
 dEQP-GLES3.functional.clipping.point.wide_point_clip_viewport_center,Fail
 dEQP-GLES3.functional.clipping.triangle_vertex.clip_two.clip_neg_y_neg_z_and_neg_x_neg_y_pos_z,Fail
 dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag,Fail
 dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_dst_x,Fail
 dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_x,Fail
-dEQP-GLES3.functional.polygon_offset.fixed16_render_with_units,Fail
-dEQP-GLES3.functional.polygon_offset.fixed24_displacement_with_units,Fail
 KHR-GL32.transform_feedback.capture_geometry_separate_test,Fail
 KHR-GL32.transform_feedback.capture_vertex_interleaved_test,Fail
 KHR-GL32.transform_feedback.capture_vertex_separate_test,Fail
diff --git a/src/gallium/drivers/zink/ci/piglit-zink-lvp-fails.txt b/src/gallium/drivers/zink/ci/piglit-zink-lvp-fails.txt
index a949f695e88..d9e805966cf 100644
--- a/src/gallium/drivers/zink/ci/piglit-zink-lvp-fails.txt
+++ b/src/gallium/drivers/zink/ci/piglit-zink-lvp-fails.txt
@@ -40,6 +40,7 @@ spec@!opengl 1.1 at linestipple@Factor 2x,Fail
 spec@!opengl 1.1 at linestipple@Factor 3x,Fail
 spec@!opengl 1.1 at linestipple@Line loop,Fail
 spec@!opengl 1.1 at linestipple@Line strip,Fail
+spec@!opengl 1.1 at polygon-offset,Fail
 spec@!opengl 1.1 at polygon-mode,Fail
 spec@!opengl 1.1 at polygon-mode-facing,Fail
 spec@!opengl 1.1 at polygon-mode-offset,Fail
@@ -47,6 +48,7 @@ spec@!opengl 1.1 at polygon-mode-offset@config 0: Expected white pixel on bottom ed
 spec@!opengl 1.1 at polygon-mode-offset@config 0: Expected white pixel on left edge,Fail
 spec@!opengl 1.1 at polygon-mode-offset@config 0: Expected white pixel on right edge,Fail
 spec@!opengl 1.1 at polygon-mode-offset@config 0: Expected white pixel on top edge,Fail
+spec@!opengl 1.1 at polygon-mode-offset@config 0: Expected blue pixel in center,Fail
 spec@!opengl 1.1 at polygon-mode-offset@config 1: Expected blue pixel in center,Fail
 spec@!opengl 1.1 at polygon-mode-offset@config 2: Expected blue pixel in center,Fail
 spec@!opengl 1.1 at polygon-mode-offset@config 2: Expected white pixel on right edge,Fail
@@ -55,7 +57,6 @@ spec@!opengl 1.1 at polygon-mode-offset@config 5: Expected blue pixel in center,Fai
 spec@!opengl 1.1 at polygon-mode-offset@config 6: Expected blue pixel in center,Fail
 spec@!opengl 1.1 at polygon-mode-offset@config 6: Expected white pixel on right edge,Fail
 spec@!opengl 1.1 at polygon-mode-offset@config 6: Expected white pixel on top edge,Fail
-spec@!opengl 1.1 at polygon-offset,Fail
 spec@!opengl 1.1 at read-front,Fail
 spec@!opengl 1.1 at read-front clear-front-first,Fail
 spec@!opengl 1.1 at read-front clear-front-first samples=2,Fail
@@ -63,7 +64,6 @@ spec@!opengl 1.1 at read-front clear-front-first samples=4,Fail
 spec@!opengl 1.1 at read-front samples=2,Fail
 spec@!opengl 1.1 at read-front samples=4,Fail
 spec@!opengl 1.2 at copyteximage 3d,Fail
-spec@!opengl 1.4 at gl-1.4-polygon-offset,Fail
 spec@!opengl 2.0 at depth-tex-modes-glsl,Fail
 spec@!opengl 2.0 at gl-2.0-edgeflag,Fail
 spec@!opengl 2.0 at gl-2.0-edgeflag-immediate,Fail



More information about the mesa-commit mailing list