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: f9e2c24326 ("draw,llvmpipe,util: add depth bias calculation for arb_depth_buffer_float")

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12029>
This commit is contained in:
Dave Airlie 2020-07-21 07:05:17 +10:00 committed by Marge Bot
parent ef29bb6bc5
commit 1e5a470b43
10 changed files with 5 additions and 29 deletions

View File

@ -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 {

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -40,6 +40,7 @@ spec@!opengl 1.1@linestipple@Factor 2x,Fail
spec@!opengl 1.1@linestipple@Factor 3x,Fail
spec@!opengl 1.1@linestipple@Line loop,Fail
spec@!opengl 1.1@linestipple@Line strip,Fail
spec@!opengl 1.1@polygon-offset,Fail
spec@!opengl 1.1@polygon-mode,Fail
spec@!opengl 1.1@polygon-mode-facing,Fail
spec@!opengl 1.1@polygon-mode-offset,Fail
@ -47,6 +48,7 @@ spec@!opengl 1.1@polygon-mode-offset@config 0: Expected white pixel on bottom ed
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 0: Expected blue pixel in center,Fail
spec@!opengl 1.1@polygon-mode-offset@config 1: Expected blue pixel in center,Fail
spec@!opengl 1.1@polygon-mode-offset@config 2: Expected blue pixel in center,Fail
spec@!opengl 1.1@polygon-mode-offset@config 2: Expected white pixel on right edge,Fail
@ -55,7 +57,6 @@ spec@!opengl 1.1@polygon-mode-offset@config 5: Expected blue pixel in center,Fai
spec@!opengl 1.1@polygon-mode-offset@config 6: Expected blue pixel in center,Fail
spec@!opengl 1.1@polygon-mode-offset@config 6: Expected white pixel on right edge,Fail
spec@!opengl 1.1@polygon-mode-offset@config 6: Expected white pixel on top edge,Fail
spec@!opengl 1.1@polygon-offset,Fail
spec@!opengl 1.1@read-front,Fail
spec@!opengl 1.1@read-front clear-front-first,Fail
spec@!opengl 1.1@read-front clear-front-first samples=2,Fail
@ -63,7 +64,6 @@ spec@!opengl 1.1@read-front clear-front-first samples=4,Fail
spec@!opengl 1.1@read-front samples=2,Fail
spec@!opengl 1.1@read-front samples=4,Fail
spec@!opengl 1.2@copyteximage 3d,Fail
spec@!opengl 1.4@gl-1.4-polygon-offset,Fail
spec@!opengl 2.0@depth-tex-modes-glsl,Fail
spec@!opengl 2.0@gl-2.0-edgeflag,Fail
spec@!opengl 2.0@gl-2.0-edgeflag-immediate,Fail