summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-10-10 13:39:14 -0600
committerBrian Paul <[email protected]>2008-10-10 13:39:14 -0600
commit6d4d51d647c27288aa625560bc080231099c0b01 (patch)
treec14500fe4d13c124cbae39dfa02e6d188d2e6543 /src/mesa/state_tracker
parentf7556fdd40ed2719beaba271eee4a7551e212ad1 (diff)
mesa: new _mesa_set_vp_override() function for driver-override of vertex program
Patch provide by Keith. Used in state tracker by DrawPixels to indicate that the state tracker (driver) is using its own vertex program. This prevents the texenvprogram code from replacing conventional shader inputs with state vars. Fixes glDraw/CopyPixels regressions.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 00bbcae32ae..5b24b9f0687 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -35,6 +35,7 @@
#include "main/bufferobj.h"
#include "main/macros.h"
#include "main/texformat.h"
+#include "main/state.h"
#include "shader/program.h"
#include "shader/prog_parameter.h"
#include "shader/prog_print.h"
@@ -835,6 +836,9 @@ st_DrawPixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
return;
}
+ _mesa_set_vp_override( ctx, TRUE );
+ _mesa_update_state( ctx );
+
st_validate_state(st);
if (format == GL_DEPTH_COMPONENT) {
@@ -874,6 +878,8 @@ st_DrawPixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
/* blit */
draw_blit(st, width, height, format, type, pixels);
}
+
+ _mesa_set_vp_override( ctx, FALSE );
}