diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-04-16 16:52:12 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-04-16 16:53:44 -0600 |
commit | 4b822a101680532ce6df52904af91194b78a16ba (patch) | |
tree | 8f4740365e3761f98c3cd215803d7e8caa44fa76 /src/mesa/state_tracker/st_cb_drawpixels.c | |
parent | 52544aa23bebe68d6fc9b13dc55f6bb8c03430ff (diff) |
gallium: implement RGBA pixel maps in the pixel transfer fragment program
Diffstat (limited to 'src/mesa/state_tracker/st_cb_drawpixels.c')
-rw-r--r-- | src/mesa/state_tracker/st_cb_drawpixels.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index 5f8c90cbba..67f468c689 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -562,6 +562,9 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z, sampler.normalized_coords = 1; cso_single_sampler(cso, 0, &sampler); + if (st->pixel_xfer.pixelmap_enabled) { + cso_single_sampler(cso, 1, &sampler); + } cso_single_sampler_done(cso); } @@ -582,7 +585,15 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z, } /* texture state: */ - pipe->set_sampler_textures(pipe, 1, &pt); + if (st->pixel_xfer.pixelmap_enabled) { + struct pipe_texture *textures[2]; + textures[0] = pt; + textures[1] = st->pixel_xfer.pixelmap_texture; + pipe->set_sampler_textures(pipe, 2, textures); + } + else { + pipe->set_sampler_textures(pipe, 1, &pt); + } /* Compute window coords (y=0=bottom) with pixel zoom. * Recall that these coords are transformed by the current |