diff options
author | Roland Scheidegger <[email protected]> | 2016-01-03 01:13:45 +0100 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2016-01-13 03:34:59 +0100 |
commit | 16530fdc82cde61495c66abe704e88d7752dfdbf (patch) | |
tree | 41651962511c1c338736a0c98267a209bf582a34 /src/gallium/drivers/llvmpipe/lp_setup_tri.c | |
parent | 0298f5aca761da1fdb7ded4d8943b2a7f9f4b36f (diff) |
llvmpipe: scale up bounding box planes to subpixel precision
Otherwise some planes we get in rasterization have subpixel precision, others
not. Doesn't matter so far, but will soon. (OpenGL actually supports viewports
with subpixel accuracy, so could even do bounding box calcs with that).
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_setup_tri.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup_tri.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c index 6914882e637..4925da98bdb 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c @@ -676,24 +676,24 @@ do_triangle_ccw(struct lp_setup_context *setup, if (nr_planes == 7) { const struct u_rect *scissor = &setup->scissors[viewport_index]; - plane[3].dcdx = -1; + plane[3].dcdx = -1 << 8; plane[3].dcdy = 0; - plane[3].c = 1-scissor->x0; - plane[3].eo = 1; + plane[3].c = (1-scissor->x0) << 8; + plane[3].eo = 1 << 8; - plane[4].dcdx = 1; + plane[4].dcdx = 1 << 8; plane[4].dcdy = 0; - plane[4].c = scissor->x1+1; + plane[4].c = (scissor->x1+1) << 8; plane[4].eo = 0; plane[5].dcdx = 0; - plane[5].dcdy = 1; - plane[5].c = 1-scissor->y0; - plane[5].eo = 1; + plane[5].dcdy = 1 << 8; + plane[5].c = (1-scissor->y0) << 8; + plane[5].eo = 1 << 8; plane[6].dcdx = 0; - plane[6].dcdy = -1; - plane[6].c = scissor->y1+1; + plane[6].dcdy = -1 << 8; + plane[6].c = (scissor->y1+1) << 8; plane[6].eo = 0; } |