From 2812f030f19fc2e0cdaa423b0cc2a04db984ac27 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 8 Jun 2021 13:20:59 +0200 Subject: [PATCH] llvmpipe: fix edge-rule logic for lines In 2737abb44ef, the handling of pixel-offsets and edge rules were untangled, but one case was missed. This fixes the following dEQP test-cases on VirGL + LLVMpipe - dEQP-GLES2.functional.draw.random.10 - dEQP-GLES2.functional.draw.random.42 - dEQP-GLES3.functional.draw.random.105 - dEQP-GLES3.functional.draw.random.114 - dEQP-GLES3.functional.draw.random.135 - dEQP-GLES3.functional.draw.random.144 - dEQP-GLES3.functional.draw.random.155 - dEQP-GLES3.functional.draw.random.174 - dEQP-GLES3.functional.draw.random.206 - dEQP-GLES3.functional.draw.random.31 - dEQP-GLES3.functional.draw.random.43 - dEQP-GLES3.functional.draw.random.84 - dEQP-GLES31.functional.draw_indirect.random.20 ...as well as these on Zink + Lavapipe: - spec@nv_primitive_restart@primitive-restart-disable_vbo - spec@nv_primitive_restart@primitive-restart-vbo_combined_vertex_and_index - spec@nv_primitive_restart@primitive-restart-vbo_index_only - spec@nv_primitive_restart@primitive-restart-vbo_separate_vertex_and_index - spec@nv_primitive_restart@primitive-restart-vbo_vertex_only Fixes: 2737abb44ef ("gallium: Replace gl_rasterization_rules with lower_left_origin and half_pixel_center.") Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/drivers/llvmpipe/lp_setup_line.c | 2 +- .../drivers/virgl/ci/deqp-virgl-gl-fails.txt | 13 ------------- .../drivers/virgl/ci/deqp-virgl-gles-fails.txt | 13 ------------- src/gallium/drivers/zink/ci/deqp-zink-lvp-fails.txt | 4 ---- .../drivers/zink/ci/piglit-zink-lvp-fails.txt | 5 ----- 5 files changed, 1 insertion(+), 36 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_setup_line.c b/src/gallium/drivers/llvmpipe/lp_setup_line.c index 62efa63bb57..0535138df25 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_line.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_line.c @@ -671,7 +671,7 @@ try_setup_line( struct lp_setup_context *setup, plane[i].c++; } else if (plane[i].dcdx == 0) { - if (pixel_offset == 0) { + if (setup->bottom_edge_rule == 0) { /* correct for top-left fill convention: */ if (plane[i].dcdy > 0) plane[i].c++; 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 ada53e6e00a..aa9a5487803 100644 --- a/src/gallium/drivers/virgl/ci/deqp-virgl-gl-fails.txt +++ b/src/gallium/drivers/virgl/ci/deqp-virgl-gl-fails.txt @@ -5,8 +5,6 @@ dEQP-GLES2.functional.clipping.point.wide_point_clip_viewport_center,Fail 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.draw.random.10,Fail -dEQP-GLES2.functional.draw.random.42,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 @@ -22,16 +20,6 @@ dEQP-GLES3.functional.clipping.point.wide_point_clip_viewport_center,Fail dEQP-GLES3.functional.clipping.point.wide_point_clip_viewport_corner,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.clipping.triangle_vertex.clip_two.clip_pos_y_pos_z_and_neg_x_neg_y_neg_z,Fail -dEQP-GLES3.functional.draw.random.105,Fail -dEQP-GLES3.functional.draw.random.114,Fail -dEQP-GLES3.functional.draw.random.135,Fail -dEQP-GLES3.functional.draw.random.144,Fail -dEQP-GLES3.functional.draw.random.155,Fail -dEQP-GLES3.functional.draw.random.174,Fail -dEQP-GLES3.functional.draw.random.206,Fail -dEQP-GLES3.functional.draw.random.31,Fail -dEQP-GLES3.functional.draw.random.43,Fail -dEQP-GLES3.functional.draw.random.84,Fail dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgb8_linear_scale_blit_from_default,Fail dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag,Fail dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag_reverse_dst_x,Fail @@ -522,7 +510,6 @@ dEQP-GLES31.functional.draw_indirect.compute_interop.separate.drawelements_compu dEQP-GLES31.functional.draw_indirect.compute_interop.separate.drawelements_compute_data_and_indices,Fail dEQP-GLES31.functional.draw_indirect.compute_interop.separate.drawelements_compute_data,Fail dEQP-GLES31.functional.draw_indirect.compute_interop.separate.drawelements_compute_indices,Fail -dEQP-GLES31.functional.draw_indirect.random.20,Fail dEQP-GLES31.functional.image_load_store.2d_array.atomic.exchange_r32f_result,Crash dEQP-GLES31.functional.image_load_store.2d_array.atomic.exchange_r32f_return_value,Crash dEQP-GLES31.functional.image_load_store.2d_array.format_reinterpret.r32f_r32i,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 524de99bc33..af1e745a464 100644 --- a/src/gallium/drivers/virgl/ci/deqp-virgl-gles-fails.txt +++ b/src/gallium/drivers/virgl/ci/deqp-virgl-gles-fails.txt @@ -5,8 +5,6 @@ dEQP-GLES2.functional.clipping.point.wide_point_clip_viewport_center,Fail 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.draw.random.10,Fail -dEQP-GLES2.functional.draw.random.42,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 @@ -22,16 +20,6 @@ dEQP-GLES3.functional.clipping.point.wide_point_clip_viewport_center,Fail dEQP-GLES3.functional.clipping.point.wide_point_clip_viewport_corner,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.clipping.triangle_vertex.clip_two.clip_pos_y_pos_z_and_neg_x_neg_y_neg_z,Fail -dEQP-GLES3.functional.draw.random.105,Fail -dEQP-GLES3.functional.draw.random.114,Fail -dEQP-GLES3.functional.draw.random.135,Fail -dEQP-GLES3.functional.draw.random.144,Fail -dEQP-GLES3.functional.draw.random.155,Fail -dEQP-GLES3.functional.draw.random.174,Fail -dEQP-GLES3.functional.draw.random.206,Fail -dEQP-GLES3.functional.draw.random.31,Fail -dEQP-GLES3.functional.draw.random.43,Fail -dEQP-GLES3.functional.draw.random.84,Fail dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag,Fail dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag_reverse_dst_x,Fail dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag_reverse_src_dst_x,Fail @@ -64,7 +52,6 @@ dEQP-GLES3.functional.rasterization.interpolation.projected.lines_wide,Fail dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.8,Fail dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.4,Fail dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.9,Fail -dEQP-GLES31.functional.draw_indirect.random.20,Fail KHR-GL30.transform_feedback.api_errors_test,Fail KHR-GL30.transform_feedback.capture_vertex_interleaved_test,Fail KHR-GL30.transform_feedback.capture_vertex_separate_test,Fail 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 80cdbdd2258..b753fe96081 100644 --- a/src/gallium/drivers/zink/ci/deqp-zink-lvp-fails.txt +++ b/src/gallium/drivers/zink/ci/deqp-zink-lvp-fails.txt @@ -4,14 +4,10 @@ dEQP-GLES2.functional.clipping.point.wide_point_clip_viewport_corner,Fail dEQP-GLES2.functional.clipping.triangle_vertex.clip_three.clip_pos_x_and_neg_y_neg_z_and_pos_y_pos_z,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.draw.random.10,Fail -dEQP-GLES2.functional.draw.random.42,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.draw.random.135,Fail -dEQP-GLES3.functional.draw.random.31,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 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 4ffeee6467a..7506733d72d 100644 --- a/src/gallium/drivers/zink/ci/piglit-zink-lvp-fails.txt +++ b/src/gallium/drivers/zink/ci/piglit-zink-lvp-fails.txt @@ -557,8 +557,3 @@ spec@khr_texture_compression_astc@sliced-3d-miptree-gles srgb,Fail spec@khr_texture_compression_astc@sliced-3d-miptree-gles srgb@sRGB decode,Fail spec@khr_texture_compression_astc@sliced-3d-miptree-gles srgb-fp,Fail spec@khr_texture_compression_astc@sliced-3d-miptree-gles srgb-fp@sRGB decode full precision,Fail -spec@nv_primitive_restart@primitive-restart-disable_vbo,Fail -spec@nv_primitive_restart@primitive-restart-vbo_combined_vertex_and_index,Fail -spec@nv_primitive_restart@primitive-restart-vbo_index_only,Fail -spec@nv_primitive_restart@primitive-restart-vbo_separate_vertex_and_index,Fail -spec@nv_primitive_restart@primitive-restart-vbo_vertex_only,Fail