diff options
author | Roland Scheidegger <sroland@vmware.com> | 2016-01-03 01:13:45 +0100 |
---|---|---|
committer | Roland Scheidegger <sroland@vmware.com> | 2016-01-13 03:34:59 +0100 |
commit | 16530fdc82cde61495c66abe704e88d7752dfdbf (patch) | |
tree | 41651962511c1c338736a0c98267a209bf582a34 /src/gallium/drivers/llvmpipe/lp_setup_point.c | |
parent | 0298f5aca761da1fdb7ded4d8943b2a7f9f4b36f (diff) | |
download | external_mesa3d-16530fdc82cde61495c66abe704e88d7752dfdbf.zip external_mesa3d-16530fdc82cde61495c66abe704e88d7752dfdbf.tar.gz external_mesa3d-16530fdc82cde61495c66abe704e88d7752dfdbf.tar.bz2 |
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 <brianp@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_setup_point.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup_point.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_point.c b/src/gallium/drivers/llvmpipe/lp_setup_point.c index 14c389f..ddb6f0e 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_point.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_point.c @@ -492,24 +492,24 @@ try_setup_point( struct lp_setup_context *setup, { struct lp_rast_plane *plane = GET_PLANES(point); - plane[0].dcdx = -1; + plane[0].dcdx = -1 << 8; plane[0].dcdy = 0; - plane[0].c = 1-bbox.x0; - plane[0].eo = 1; + plane[0].c = (1-bbox.x0) << 8; + plane[0].eo = 1 << 8; - plane[1].dcdx = 1; + plane[1].dcdx = 1 << 8; plane[1].dcdy = 0; - plane[1].c = bbox.x1+1; + plane[1].c = (bbox.x1+1) << 8; plane[1].eo = 0; plane[2].dcdx = 0; - plane[2].dcdy = 1; - plane[2].c = 1-bbox.y0; - plane[2].eo = 1; + plane[2].dcdy = 1 << 8; + plane[2].c = (1-bbox.y0) << 8; + plane[2].eo = 1 << 8; plane[3].dcdx = 0; - plane[3].dcdy = -1; - plane[3].c = bbox.y1+1; + plane[3].dcdy = -1 << 8; + plane[3].c = (bbox.y1+1) << 8; plane[3].eo = 0; } |