summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-05-02 14:00:35 -0600
committerBrian Paul <[email protected]>2008-05-02 14:00:35 -0600
commit6e004e973bcc5b789ee3f70b70f5d728c8b8ea71 (patch)
treed6311be302c22cddb2be3534b31fda6593dff802 /src/gallium
parent07aaf3a7a730d65052ec34a82cce9b373673b556 (diff)
gallium: remove 0.5 vertex biases in set_vertex_data()
These should not be needed and were causing garbage to appear along the edges of the mipmap images.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/util/u_gen_mipmap.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gallium/auxiliary/util/u_gen_mipmap.c b/src/gallium/auxiliary/util/u_gen_mipmap.c
index 2e8417ee134..c53c5122681 100644
--- a/src/gallium/auxiliary/util/u_gen_mipmap.c
+++ b/src/gallium/auxiliary/util/u_gen_mipmap.c
@@ -778,23 +778,23 @@ set_vertex_data(struct gen_mipmap_state *ctx, float width, float height)
{
void *buf;
- ctx->vertices[0][0][0] = -0.5f; /*x*/
- ctx->vertices[0][0][1] = -0.5f; /*y*/
+ ctx->vertices[0][0][0] = 0.0f; /*x*/
+ ctx->vertices[0][0][1] = 0.0f; /*y*/
ctx->vertices[0][1][0] = 0.0f; /*s*/
ctx->vertices[0][1][1] = 0.0f; /*t*/
- 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[1][0][0] = width;
+ ctx->vertices[1][0][1] = 0.0f;
+ ctx->vertices[1][1][0] = 1.0f;
+ ctx->vertices[1][1][1] = 0.0f;
- ctx->vertices[2][0][0] = width - 0.5f;
- ctx->vertices[2][0][1] = height - 0.5f;
+ ctx->vertices[2][0][0] = width;
+ ctx->vertices[2][0][1] = height;
ctx->vertices[2][1][0] = 1.0f;
ctx->vertices[2][1][1] = 1.0f;
- ctx->vertices[3][0][0] = -0.5f;
- ctx->vertices[3][0][1] = height - 0.5f;
+ ctx->vertices[3][0][0] = 0.0f;
+ ctx->vertices[3][0][1] = height;
ctx->vertices[3][1][0] = 0.0f;
ctx->vertices[3][1][1] = 1.0f;