summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_drawpixels.c
diff options
context:
space:
mode:
authorStephane Marchesin <marchesin@icps.u-strasbg.fr>2008-04-02 05:10:52 +0200
committerStephane Marchesin <marchesin@icps.u-strasbg.fr>2008-04-02 05:10:52 +0200
commit901700888e5b4ec4dbec6ac924b542c780edaf52 (patch)
tree7050fa76b0b30b68a1170ed590d59011fd6d2d3c /src/mesa/state_tracker/st_cb_drawpixels.c
parentb1a361ba7a565063200c033e4939e6b28c006b13 (diff)
parentae87909d0d261d0f4e888f6a167e6329eb129a87 (diff)
Merge branch 'gallium-0.1' of git+ssh://marcheu@git.freedesktop.org/git/nouveau/mesa into gallium-0.1
Diffstat (limited to 'src/mesa/state_tracker/st_cb_drawpixels.c')
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 43cc21d1fb..c181575f15 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -530,14 +530,13 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
cso_save_rasterizer(cso);
cso_save_viewport(cso);
cso_save_samplers(cso);
+ cso_save_sampler_textures(cso);
/* rasterizer state: just scissor */
{
struct pipe_rasterizer_state rasterizer;
memset(&rasterizer, 0, sizeof(rasterizer));
- if (ctx->Scissor.Enabled)
- rasterizer.scissor = 1;
-
+ rasterizer.scissor = ctx->Scissor.Enabled;
cso_set_rasterizer(cso, &rasterizer);
}
@@ -581,9 +580,7 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
}
/* texture state: */
- {
- pipe->set_sampler_textures(pipe, 1, &pt);
- }
+ 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
@@ -604,12 +601,11 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
cso_restore_rasterizer(cso);
cso_restore_viewport(cso);
cso_restore_samplers(cso);
+ cso_restore_sampler_textures(cso);
+
/* shaders don't go through cso yet */
pipe->bind_fs_state(pipe, st->fp->driver_shader);
pipe->bind_vs_state(pipe, st->vp->driver_shader);
-
- pipe->set_sampler_textures(pipe, ctx->st->state.num_textures,
- ctx->st->state.sampler_texture);
}