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 <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5394>
This commit is contained in:
Dave Airlie 2020-06-09 10:41:58 +10:00
parent c1e1b13bfe
commit 84779e5822
3 changed files with 8 additions and 4 deletions

View 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

View 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,

View 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,