Mesa (nvfx-next-2): u_blitter: add missing sampler_state-> normalized_coords = 1 (?!?)
Luca Barbieri
lb at kemper.freedesktop.org
Wed Apr 14 04:16:42 UTC 2010
Module: Mesa
Branch: nvfx-next-2
Commit: f231566375bd3fc5ec9b6f66fc770bddc0b03acf
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f231566375bd3fc5ec9b6f66fc770bddc0b03acf
Author: Luca Barbieri <luca at luca-barbieri.com>
Date: Wed Apr 14 06:14:13 2010 +0200
u_blitter: add missing sampler_state->normalized_coords = 1 (?!?)
It's using normalized texcoords, but not setting it in the sampler state.
How can this possibly work with r300g?!?
---
src/gallium/auxiliary/util/u_blitter.c | 1 +
src/gallium/drivers/nvfx/nv40_fragtex.c | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index 104cbf7..ba599e1 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -168,6 +168,7 @@ struct blitter_context *util_blitter_create(struct pipe_context *pipe)
sampler_state->wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE;
sampler_state->wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE;
sampler_state->wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE;
+ sampler_state->normalized_coords = 1;
/* The sampler state objects which sample from a specified mipmap level
* are created on-demand. */
diff --git a/src/gallium/drivers/nvfx/nv40_fragtex.c b/src/gallium/drivers/nvfx/nv40_fragtex.c
index 289070e..69bc00b 100644
--- a/src/gallium/drivers/nvfx/nv40_fragtex.c
+++ b/src/gallium/drivers/nvfx/nv40_fragtex.c
@@ -125,7 +125,7 @@ nv40_fragtex_set(struct nvfx_context *nvfx, int unit)
txf = ps->fmt;
txf |= tf->format | 0x8000;
- txf |= ((pt->last_level + 1) << NV40TCL_TEX_FORMAT_MIPMAP_COUNT_SHIFT);
+ txf |= ((pt->last_level + 1) << NV40TCL_TEX_FORMAT_MIPMAP_COUNT_SHIFT);
if (1) /* XXX */
txf |= NV34TCL_TX_FORMAT_NO_BORDER;
More information about the mesa-commit
mailing list