From 6355693a021ce9473196b685cc9f8c2cbb0899a8 Mon Sep 17 00:00:00 2001 From: marha Date: Thu, 12 May 2011 10:54:06 +0000 Subject: libxcb mesa xcb-proto git update 12 May 2011 --- mesalib/src/mesa/main/dlist.c | 6 +++--- mesalib/src/mesa/program/programopt.c | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'mesalib') diff --git a/mesalib/src/mesa/main/dlist.c b/mesalib/src/mesa/main/dlist.c index 63653df45..930236c01 100644 --- a/mesalib/src/mesa/main/dlist.c +++ b/mesalib/src/mesa/main/dlist.c @@ -9784,9 +9784,9 @@ _mesa_create_save_table(void) SET_DeleteProgramsNV(table, _mesa_DeletePrograms); SET_GenProgramsNV(table, _mesa_GenPrograms); SET_IsProgramNV(table, _mesa_IsProgramARB); - SET_GetVertexAttribdvNV(table, _mesa_GetVertexAttribdvNV); - SET_GetVertexAttribfvNV(table, _mesa_GetVertexAttribfvNV); - SET_GetVertexAttribivNV(table, _mesa_GetVertexAttribivNV); + SET_GetVertexAttribdvARB(table, _mesa_GetVertexAttribdvARB); + SET_GetVertexAttribfvARB(table, _mesa_GetVertexAttribfvARB); + SET_GetVertexAttribivARB(table, _mesa_GetVertexAttribivARB); SET_GetVertexAttribPointervNV(table, _mesa_GetVertexAttribPointervNV); SET_ProgramEnvParameter4dARB(table, save_ProgramEnvParameter4dARB); SET_ProgramEnvParameter4dvARB(table, save_ProgramEnvParameter4dvARB); diff --git a/mesalib/src/mesa/program/programopt.c b/mesalib/src/mesa/program/programopt.c index a239da2c6..c72dfb23b 100644 --- a/mesalib/src/mesa/program/programopt.c +++ b/mesalib/src/mesa/program/programopt.c @@ -267,6 +267,11 @@ _mesa_append_fog_code(struct gl_context *ctx, return; } + if (!(fprog->Base.OutputsWritten & (1 << FRAG_RESULT_COLOR))) { + /* program doesn't output color, so nothing to do */ + return; + } + /* Alloc storage for new instructions */ newInst = _mesa_alloc_instructions(newLen); if (!newInst) { @@ -407,6 +412,7 @@ _mesa_append_fog_code(struct gl_context *ctx, fprog->Base.Instructions = newInst; fprog->Base.NumInstructions = inst - newInst; fprog->Base.InputsRead |= FRAG_BIT_FOGC; + assert(fprog->Base.OutputsWritten & (1 << FRAG_RESULT_COLOR)); } -- cgit v1.2.3