From 84779e5822d8b63038f65640ca32ad0dce3161b7 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 9 Jun 2020 10:41:58 +1000 Subject: [PATCH] llvmpipe/setup: add planes for draw regions if no scissor. 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 Part-of: --- .gitlab-ci/deqp-virgl-fails.txt | 4 ---- src/gallium/drivers/llvmpipe/lp_setup_line.c | 4 ++++ src/gallium/drivers/llvmpipe/lp_setup_tri.c | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci/deqp-virgl-fails.txt b/.gitlab-ci/deqp-virgl-fails.txt index 94d2cf4d4b1..f8663945a20 100644 --- a/.gitlab-ci/deqp-virgl-fails.txt +++ b/.gitlab-ci/deqp-virgl-fails.txt @@ -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 diff --git a/src/gallium/drivers/llvmpipe/lp_setup_line.c b/src/gallium/drivers/llvmpipe/lp_setup_line.c index 1357d026dfe..cc44b20c86c 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_line.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_line.c @@ -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, diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c index cc44f847d53..90a4ee3b364 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c @@ -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, -- 2.30.2