diff options
author | Zack Rusin <[email protected]> | 2013-09-19 14:10:08 -0400 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2013-09-23 14:53:07 -0400 |
commit | 755c11dc5e94f17097c186edaaa39d818396f14c (patch) | |
tree | 7b84e6163cf9970cd3e91b28080c534c45921f64 /src/gallium/drivers/llvmpipe/lp_rast.h | |
parent | 6d29db715b8d60718ada1ab8ad19d969cac43caf (diff) |
llvmpipe: increase number of subpixel bits to eight
Unfortunately d3d10 requires a lot higher precision (e.g.
wgf11clipping tests for it). The smallest number of precision
bits with which it passes is 8. That means that we need to
decrease the maximum length of an edge that we can handle without
subdivision by 4 bits. Abstracted the code a bit to make it easier
to change once to switch to 64bit rasterization.
Signed-off-by: Zack Rusin <[email protected]>
Reviewed-by: José Fonseca <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_rast.h')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_rast.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.h b/src/gallium/drivers/llvmpipe/lp_rast.h index c57f2ea11de..39ff6af327f 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.h +++ b/src/gallium/drivers/llvmpipe/lp_rast.h @@ -46,10 +46,20 @@ struct lp_scene; struct lp_fence; struct cmd_bin; +#define FIXED_TYPE_WIDTH 32 /** For sub-pixel positioning */ -#define FIXED_ORDER 4 +#define FIXED_ORDER 8 #define FIXED_ONE (1<<FIXED_ORDER) +/** Maximum length of an edge in a primitive in pixels. + * If the framebuffer is large we have to think about fixed-point + * integer overflow. Coordinates need ((FIXED_TYPE_WIDTH/2) - 1) bits + * to be able to fit product of two such coordinates inside + * FIXED_TYPE_WIDTH, any larger and we could overflow a + * FIXED_TYPE_WIDTH_-bit int. + */ +#define MAX_FIXED_LENGTH (1 << (((FIXED_TYPE_WIDTH/2) - 1) - FIXED_ORDER)) + /* Rasterizer output size going to jit fs, width/height */ #define LP_RASTER_BLOCK_SIZE 4 |