mesa: don't update fixed-func programs on irrelevant _NEW_RENDER_MODE changes
The fixed-func vertex program uses it too, which was ignored. This commit fixes it. 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:
parent
6302ffeda4
commit
944e6274d6
|
@ -416,7 +416,8 @@ _mesa_RenderMode( GLenum mode )
|
|||
if (MESA_VERBOSE & VERBOSE_API)
|
||||
_mesa_debug(ctx, "glRenderMode %s\n", _mesa_enum_to_string(mode));
|
||||
|
||||
FLUSH_VERTICES(ctx, _NEW_RENDERMODE, 0);
|
||||
FLUSH_VERTICES(ctx, _NEW_RENDERMODE | _NEW_FF_VERT_PROGRAM |
|
||||
_NEW_FF_FRAG_PROGRAM, 0);
|
||||
|
||||
switch (ctx->RenderMode) {
|
||||
case GL_RENDER:
|
||||
|
|
|
@ -487,9 +487,8 @@ _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_FF_FRAG_PROGRAM | _NEW_RENDERMODE |
|
||||
_NEW_COLOR | _NEW_TEXTURE_STATE;
|
||||
prog_flags |= _NEW_BUFFERS | _NEW_TEXTURE_OBJECT | _NEW_COLOR |
|
||||
_NEW_FF_FRAG_PROGRAM | _NEW_TEXTURE_STATE;
|
||||
}
|
||||
|
||||
if (ctx->VertexProgram._UsesTnlProgram)
|
||||
|
|
Loading…
Reference in New Issue