llvmpipe/setup: add planes for draw regions if no scissor.
authorDave Airlie <airlied@redhat.com>
Tue, 9 Jun 2020 00:41:58 +0000 (10:41 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 15 Jun 2020 20:14:44 +0000 (06:14 +1000)
Some tests were using a 1x1 fb bound, with a 2x2 viewport,
and all 4 pixels were getting rendered. Test if the fb bounds
need planes added or not.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3101
v2: add lines support

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

.gitlab-ci/deqp-virgl-fails.txt
src/gallium/drivers/llvmpipe/lp_setup_line.c
src/gallium/drivers/llvmpipe/lp_setup_tri.c

index 94d2cf4d4b193a9d00c34ef0288d44304e4d4546..f8663945a2074f7371719209a537b8c425470acb 100644 (file)
@@ -50,10 +50,6 @@ dEQP-GLES3.functional.rasterization.fbo.texture_2d.interpolation.lines_wide
 dEQP-GLES3.functional.rasterization.interpolation.basic.line_loop_wide
 dEQP-GLES3.functional.rasterization.interpolation.projected.line_loop_wide
 dEQP-GLES3.functional.vertex_arrays.single_attribute.normalize.int2_10_10_10.components4_quads1
-dEQP-GLES31.functional.fbo.no_attachments.interaction.127x127ms0_default_129x129ms0
-dEQP-GLES31.functional.fbo.no_attachments.npot_size.15x511
-dEQP-GLES31.functional.fbo.no_attachments.npot_size.65x65
-dEQP-GLES31.functional.fbo.no_attachments.random.0
 dEQP-GLES31.functional.shaders.builtin_constants.tessellation_shader.max_tess_control_total_output_components
 dEQP-GLES31.functional.shaders.builtin_constants.tessellation_shader.max_tess_evaluation_uniform_components
 dEQP-GLES31.functional.shaders.builtin_functions.common.abs.int_highp_tess_eval
index 1357d026dfeaa9a0983e4d153857d31884c06d36..cc44b20c86c8782f9131ff129880f9caa6e0f672 100644 (file)
@@ -602,6 +602,10 @@ try_setup_line( struct lp_setup_context *setup,
       scissor = &setup->scissors[viewport_index];
       scissor_planes_needed(s_planes, &bboxpos, scissor);
       nr_planes += s_planes[0] + s_planes[1] + s_planes[2] + s_planes[3];
+   } else {
+      scissor = &setup->draw_regions[viewport_index];
+      scissor_planes_needed(s_planes, &bboxpos, scissor);
+      nr_planes += s_planes[0] + s_planes[1] + s_planes[2] + s_planes[3];
    }
 
    line = lp_setup_alloc_triangle(scene,
index cc44f847d530801cb658698e6f4d6456178e41a9..90a4ee3b364144bb027b5422e77cc60b759ac714 100644 (file)
@@ -364,6 +364,10 @@ do_triangle_ccw(struct lp_setup_context *setup,
       scissor = &setup->scissors[viewport_index];
       scissor_planes_needed(s_planes, &bboxpos, scissor);
       nr_planes += s_planes[0] + s_planes[1] + s_planes[2] + s_planes[3];
+   } else {
+      scissor = &setup->draw_regions[viewport_index];
+      scissor_planes_needed(s_planes, &bboxpos, scissor);
+      nr_planes += s_planes[0] + s_planes[1] + s_planes[2] + s_planes[3];
    }
 
    tri = lp_setup_alloc_triangle(scene,