diff options
author | Brian Paul <[email protected]> | 2013-09-30 09:47:31 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2013-09-30 18:50:37 -0600 |
commit | 1d05caf9f2b27b1af4424ebd66584ab2b25025a5 (patch) | |
tree | 41860c3ab52d4e1b41d3c6e420bb798d1b97d164 | |
parent | 360610c89efa62c869ffbe32c050b0fb86525ffe (diff) |
svga: fix pixel center integer
The svga/d3d9 convention is that pixel centers are at integer coordinates.
Fixes piglit glsl-arb-fragment-coord-conventions test.
Reviewed-by: José Fonseca <[email protected]>
-rw-r--r-- | src/gallium/drivers/svga/svga_screen.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index d0e242ab447..a1108c62837 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -207,11 +207,13 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param) return 1; case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT: - case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER: return 1; + case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER: + return 0; case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT: - case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER: return 0; + case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER: + return 1; case PIPE_CAP_VERTEX_COLOR_UNCLAMPED: return 1; /* The color outputs of vertex shaders are not clamped */ |