Better driver notification on changes.
This commit is contained in:
@@ -37,7 +37,7 @@
|
|||||||
#include "shader/arbfragparse.h"
|
#include "shader/arbfragparse.h"
|
||||||
|
|
||||||
|
|
||||||
#define DISASSEM 1
|
#define DISASSEM 0
|
||||||
|
|
||||||
/* Use uregs to represent registers internally, translate to Mesa's
|
/* Use uregs to represent registers internally, translate to Mesa's
|
||||||
* expected formats on emit.
|
* expected formats on emit.
|
||||||
@@ -691,9 +691,7 @@ void _mesa_UpdateTexEnvProgram( GLcontext *ctx )
|
|||||||
if (ctx->FragmentProgram._Enabled)
|
if (ctx->FragmentProgram._Enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (ctx->_TexEnvProgram)
|
if (!ctx->_TexEnvProgram)
|
||||||
ctx->Driver.DeleteProgram(ctx, ctx->_TexEnvProgram);
|
|
||||||
|
|
||||||
ctx->FragmentProgram._Current = ctx->_TexEnvProgram =
|
ctx->FragmentProgram._Current = ctx->_TexEnvProgram =
|
||||||
(struct fragment_program *)
|
(struct fragment_program *)
|
||||||
ctx->Driver.NewProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, 0);
|
ctx->Driver.NewProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, 0);
|
||||||
@@ -779,6 +777,11 @@ void _mesa_UpdateTexEnvProgram( GLcontext *ctx )
|
|||||||
p.program->Instructions);
|
p.program->Instructions);
|
||||||
_mesa_printf("\n");
|
_mesa_printf("\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Notify driver the fragment program has (potentially) changed.
|
||||||
|
*/
|
||||||
|
ctx->Driver.ProgramStringNotify( ctx, GL_FRAGMENT_PROGRAM_ARB,
|
||||||
|
p.program );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user