summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2009-05-08 18:58:41 -0400
committerAlex Deucher <alexdeucher@gmail.com>2009-05-13 18:57:47 -0400
commit038f0bf5916df5bae1145d234589e5fd528bb7fa (patch)
treef6ad896185b4b55787c40997eb57482aaf1475b7 /src/mesa/drivers/dri/r300
parentc514c1f99493147bbba7a1dbe157c0492f4cf2eb (diff)
Remove subpixel offset from viewport
Remove an eigth-pixel offset of the viewport inherited from R100 code. This seems not to be necessary and causes blurring when sampling textures 1:1. https://bugs.freedesktop.org/show_bug.cgi?id=20340
Diffstat (limited to 'src/mesa/drivers/dri/r300')
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index 301ede3aed..b82399574a 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -923,12 +923,6 @@ static void r300StencilOpSeparate(GLcontext * ctx, GLenum face,
* Window position and viewport transformation
*/
-/*
- * To correctly position primitives:
- */
-#define SUBPIXEL_X 0.125
-#define SUBPIXEL_Y 0.125
-
static void r300UpdateWindow(GLcontext * ctx)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
@@ -949,9 +943,9 @@ static void r300UpdateWindow(GLcontext * ctx)
}
GLfloat sx = v[MAT_SX];
- GLfloat tx = v[MAT_TX] + xoffset + SUBPIXEL_X;
+ GLfloat tx = v[MAT_TX] + xoffset;
GLfloat sy = v[MAT_SY] * y_scale;
- GLfloat ty = (v[MAT_TY] * y_scale) + y_bias + SUBPIXEL_Y;
+ GLfloat ty = (v[MAT_TY] * y_scale) + y_bias;
GLfloat sz = v[MAT_SZ] * depthScale;
GLfloat tz = v[MAT_TZ] * depthScale;
@@ -990,8 +984,8 @@ void r300UpdateViewportOffset(GLcontext * ctx)
GLfloat yoffset = (GLfloat) dPriv->y + dPriv->h;
const GLfloat *v = ctx->Viewport._WindowMap.m;
- GLfloat tx = v[MAT_TX] + xoffset + SUBPIXEL_X;
- GLfloat ty = (-v[MAT_TY]) + yoffset + SUBPIXEL_Y;
+ GLfloat tx = v[MAT_TX] + xoffset;
+ GLfloat ty = (-v[MAT_TY]) + yoffset;
if (rmesa->hw.vpt.cmd[R300_VPT_XOFFSET] != r300PackFloat32(tx) ||
rmesa->hw.vpt.cmd[R300_VPT_YOFFSET] != r300PackFloat32(ty)) {