summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-02-12 17:22:10 -0700
committerBrian Paul <brianp@vmware.com>2010-02-12 17:22:10 -0700
commit282dafcdc7a809714f27fd609489b19d45360258 (patch)
tree258a72b81f0777402ba2abd47960cac0c2d7f55d /src/mesa/state_tracker
parenta4865e82ef0171a5280c98f1b0ae879cf013ad8b (diff)
st/mesa: restore draw rasterization stage after rasterpos
This fixes invalid calls to rastpos_point/line/tri() that can occur when glRasterPos() is called while in feedback or selection mode. (cherry picked from commit b3c7dc6ff232eb4c5ff6b0ddcfa90bcb56f78df1)
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_rasterpos.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_rasterpos.c b/src/mesa/state_tracker/st_cb_rasterpos.c
index 42a1377809..4692891c8a 100644
--- a/src/mesa/state_tracker/st_cb_rasterpos.c
+++ b/src/mesa/state_tracker/st_cb_rasterpos.c
@@ -251,6 +251,14 @@ st_RasterPos(GLcontext *ctx, const GLfloat v[4])
/* draw the point */
st_feedback_draw_vbo(ctx, rs->arrays, &rs->prim, 1, NULL, GL_TRUE, 0, 1);
+
+ /* restore draw's rasterization stage depending on rendermode */
+ if (ctx->RenderMode == GL_FEEDBACK) {
+ draw_set_rasterize_stage(draw, st->feedback_stage);
+ }
+ else if (ctx->RenderMode == GL_SELECT) {
+ draw_set_rasterize_stage(draw, st->selection_stage);
+ }
}