summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texenvprogram.c
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/main/texenvprogram.c
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/main/texenvprogram.c')
-rw-r--r--src/mesa/main/texenvprogram.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c
index 638d6be5ad6..f3bac86dfe0 100644
--- a/src/mesa/main/texenvprogram.c
+++ b/src/mesa/main/texenvprogram.c
@@ -205,8 +205,18 @@ static GLbitfield get_fp_input_mask( GLcontext *ctx )
{
GLbitfield fp_inputs = 0x0;
- if (!ctx->VertexProgram._Enabled ||
- !ctx->VertexProgram._Current) {
+ if (ctx->VertexProgram._Overriden) {
+ /* Somebody's messing with the vertex program and we don't have
+ * a clue what's happening. Assume that it could be producing
+ * all possible outputs.
+ */
+ fp_inputs = ~0;
+ }
+ else if (ctx->RenderMode == GL_FEEDBACK) {
+ fp_inputs = (FRAG_BIT_COL0 | FRAG_BIT_TEX0);
+ }
+ else if (!ctx->VertexProgram._Enabled ||
+ !ctx->VertexProgram._Current) {
/* Fixed function logic */
GLbitfield varying_inputs = ctx->varying_vp_inputs;