summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2013-12-13 14:12:09 -0800
committerIan Romanick <[email protected]>2014-02-02 16:49:09 +0100
commiteb65d4b84d4c514bfa9114a56a08513efabbe030 (patch)
tree2f206f8bda8aed38fcf738abface4f22f1856c95 /src/mesa
parentabfa65ca811099332c8683dada9a2ee44cc01dc9 (diff)
meta: Use NDC in decompress_texture_image
There is no need to use pixel coordinates, and using NDC directly will simplify the GLSL paths. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/common/meta.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 3479eb16d6f..1d870d2980f 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -4108,18 +4108,17 @@ decompress_texture_image(struct gl_context *ctx,
verts[3].tex);
/* setup vertex positions */
- verts[0].x = 0.0F;
- verts[0].y = 0.0F;
- verts[1].x = width;
- verts[1].y = 0.0F;
- verts[2].x = width;
- verts[2].y = height;
- verts[3].x = 0.0F;
- verts[3].y = height;
+ verts[0].x = -1.0F;
+ verts[0].y = -1.0F;
+ verts[1].x = 1.0F;
+ verts[1].y = -1.0F;
+ verts[2].x = 1.0F;
+ verts[2].y = 1.0F;
+ verts[3].x = -1.0F;
+ verts[3].y = 1.0F;
_mesa_MatrixMode(GL_PROJECTION);
_mesa_LoadIdentity();
- _mesa_Ortho(0.0, width, 0.0, height, -1.0, 1.0);
_mesa_set_viewport(ctx, 0, 0, 0, width, height);
/* upload new vertex data */