From: Brian Paul Date: Mon, 30 Sep 2013 15:47:31 +0000 (-0600) Subject: svga: fix pixel center integer X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1d05caf9f2b27b1af4424ebd66584ab2b25025a5;p=mesa.git 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 --- 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 */