aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/i915simple/i915_state.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-10-15 11:47:53 -0600
committerBrian <[email protected]>2007-10-15 11:47:53 -0600
commit369eefc34c8d7acdb881ea5b0516406d71344fc4 (patch)
tree323628a281f794df317aa89577266ac4bfc8649e /src/mesa/pipe/i915simple/i915_state.c
parentc8bf63e992f902f1bef0c20e5b50f397c4d219a7 (diff)
add 'normalized_coords' field to pipe_sampler_state
This controls whether texcoords are interpreted as-is or scaled up from [0,1]. Fixes glDrawPixels/glBitmap problems on i915 when image is non power-of-two. Also, cleans up the CSO sampler state for i915 a bit.
Diffstat (limited to 'src/mesa/pipe/i915simple/i915_state.c')
-rw-r--r--src/mesa/pipe/i915simple/i915_state.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/pipe/i915simple/i915_state.c b/src/mesa/pipe/i915simple/i915_state.c
index 4a31747fe85..8da5662e3fe 100644
--- a/src/mesa/pipe/i915simple/i915_state.c
+++ b/src/mesa/pipe/i915simple/i915_state.c
@@ -262,6 +262,9 @@ i915_create_sampler_state(struct pipe_context *pipe,
(translate_wrap_mode(wt) << SS3_TCY_ADDR_MODE_SHIFT) |
(translate_wrap_mode(wr) << SS3_TCZ_ADDR_MODE_SHIFT));
+ if (sampler->normalized_coords)
+ cso->state[1] |= SS3_NORMALIZED_COORDS;
+
{
ubyte r = float_to_ubyte(sampler->border_color[0]);
ubyte g = float_to_ubyte(sampler->border_color[1]);