summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_drawpixels.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-10-15 11:47:53 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-10-15 11:47:53 -0600
commit369eefc34c8d7acdb881ea5b0516406d71344fc4 (patch)
tree323628a281f794df317aa89577266ac4bfc8649e /src/mesa/state_tracker/st_cb_drawpixels.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/state_tracker/st_cb_drawpixels.c')
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index e3479deb79..7d115209f4 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -558,6 +558,7 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
sampler.min_img_filter = PIPE_TEX_FILTER_NEAREST;
sampler.min_mip_filter = PIPE_TEX_MIPFILTER_NONE;
sampler.mag_img_filter = PIPE_TEX_FILTER_NEAREST;
+ sampler.normalized_coords = 1;
cso = st_cached_sampler_state(ctx->st, &sampler);
pipe->bind_sampler_state(pipe, unit, cso->data);
}