aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_setup_line.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2020-06-09 10:41:58 +1000
committerDave Airlie <[email protected]>2020-06-16 06:14:44 +1000
commit84779e5822d8b63038f65640ca32ad0dce3161b7 (patch)
tree8ab41b180b43e48c5e79136dae254c0be89a40ec /src/gallium/drivers/llvmpipe/lp_setup_line.c
parentc1e1b13bfe8233748aa04f67fb69bff7e51bf744 (diff)
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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5394>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_setup_line.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_line.c4
1 files changed, 4 insertions, 0 deletions
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,