mesa: don't update the fixed-func frag prog on irrelevant _NEW_COLOR changes
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com> Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850>
This commit is contained in:
@@ -417,7 +417,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
|
||||
if (ctx->Color.AlphaEnabled == state)
|
||||
return;
|
||||
/* AlphaEnabled is used by the fixed-func fragment program */
|
||||
FLUSH_VERTICES(ctx, _NEW_COLOR, GL_COLOR_BUFFER_BIT | GL_ENABLE_BIT);
|
||||
FLUSH_VERTICES(ctx, _NEW_COLOR | _NEW_FF_FRAG_PROGRAM,
|
||||
GL_COLOR_BUFFER_BIT | GL_ENABLE_BIT);
|
||||
ctx->NewDriverState |= ctx->DriverFlags.NewAlphaTest;
|
||||
ctx->Color.AlphaEnabled = state;
|
||||
break;
|
||||
|
||||
@@ -487,7 +487,7 @@ _mesa_update_state_locked( struct gl_context *ctx )
|
||||
GLbitfield prog_flags = _NEW_PROGRAM;
|
||||
|
||||
if (ctx->FragmentProgram._UsesTexEnvProgram) {
|
||||
prog_flags |= _NEW_BUFFERS | _NEW_TEXTURE_OBJECT | _NEW_COLOR |
|
||||
prog_flags |= _NEW_BUFFERS | _NEW_TEXTURE_OBJECT |
|
||||
_NEW_FF_FRAG_PROGRAM | _NEW_TEXTURE_STATE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user