summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util/u_gen_mipmap.c
diff options
context:
space:
mode:
authorMichal Krol <michal@tungstengraphics.com>2008-03-24 08:09:34 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-03-24 08:09:34 -0600
commitc8c373514a18d31181cfaeefc23cd06eab3fddd0 (patch)
tree3e0fa4537c8454cba13ea0e788541045cedd55b2 /src/gallium/auxiliary/util/u_gen_mipmap.c
parente0a9ce10f4c30b1aec08c46b6a33885782d40dd0 (diff)
gallium: tweak coords in u_gen_mipmap code
Diffstat (limited to 'src/gallium/auxiliary/util/u_gen_mipmap.c')
-rw-r--r--src/gallium/auxiliary/util/u_gen_mipmap.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gallium/auxiliary/util/u_gen_mipmap.c b/src/gallium/auxiliary/util/u_gen_mipmap.c
index 9203a78191..13e4531d4a 100644
--- a/src/gallium/auxiliary/util/u_gen_mipmap.c
+++ b/src/gallium/auxiliary/util/u_gen_mipmap.c
@@ -773,23 +773,23 @@ set_vertex_data(struct gen_mipmap_state *ctx, float width, float height)
{
void *buf;
- ctx->vertices[0][0][0] = 0.0f; /*x*/
- ctx->vertices[0][0][1] = 0.0f; /*y*/
+ ctx->vertices[0][0][0] = -0.5f; /*x*/
+ ctx->vertices[0][0][1] = -0.5f; /*y*/
ctx->vertices[0][1][0] = 0.0f; /*s*/
ctx->vertices[0][1][1] = 0.0f; /*t*/
- ctx->vertices[1][0][0] = width; /*x*/
- ctx->vertices[1][0][1] = 0.0f; /*y*/
+ ctx->vertices[1][0][0] = width - 0.5f; /*x*/
+ ctx->vertices[1][0][1] = -0.5f; /*y*/
ctx->vertices[1][1][0] = 1.0f; /*s*/
ctx->vertices[1][1][1] = 0.0f; /*t*/
- ctx->vertices[2][0][0] = width;
- ctx->vertices[2][0][1] = height;
+ ctx->vertices[2][0][0] = width - 0.5f;
+ ctx->vertices[2][0][1] = height - 0.5f;
ctx->vertices[2][1][0] = 1.0f;
ctx->vertices[2][1][1] = 1.0f;
- ctx->vertices[3][0][0] = 0.0f;
- ctx->vertices[3][0][1] = height;
+ ctx->vertices[3][0][0] = -0.5f;
+ ctx->vertices[3][0][1] = height - 0.5f;
ctx->vertices[3][1][0] = 0.0f;
ctx->vertices[3][1][1] = 1.0f;