mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 17:10:11 +01:00
mesa: fix _mesa_update_texture_matrices()
_math_matrix_is_dirty() should only be used to decide if we need to
run _math_matrix_analyse(). We already decided that we had a new
texture matrix when we called _mesa_update_texture_matrices() so
we need to set _TexMatEnabled correctly otherwise we might
incorrectly return _NEW_FF_VERT_PROGRAM | _NEW_FF_FRAG_PROGRAM in
the following if-statement.
Fixes: ec978e002f ("mesa: only update fixed-func programs on texture matrix enablement changes")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14286
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38473>
This commit is contained in:
parent
ad25196d35
commit
b0047be0c2
1 changed files with 5 additions and 5 deletions
|
|
@ -401,12 +401,12 @@ _mesa_update_texture_matrices(struct gl_context *ctx)
|
|||
for (u = 0; u < ctx->Const.MaxTextureCoordUnits; u++) {
|
||||
assert(u < ARRAY_SIZE(ctx->TextureMatrixStack));
|
||||
if (_math_matrix_is_dirty(ctx->TextureMatrixStack[u].Top)) {
|
||||
_math_matrix_analyse( ctx->TextureMatrixStack[u].Top );
|
||||
|
||||
if (ctx->Texture.Unit[u]._Current &&
|
||||
ctx->TextureMatrixStack[u].Top->type != MATRIX_IDENTITY)
|
||||
ctx->Texture._TexMatEnabled |= ENABLE_TEXMAT(u);
|
||||
_math_matrix_analyse(ctx->TextureMatrixStack[u].Top);
|
||||
}
|
||||
|
||||
if (ctx->Texture.Unit[u]._Current &&
|
||||
ctx->TextureMatrixStack[u].Top->type != MATRIX_IDENTITY)
|
||||
ctx->Texture._TexMatEnabled |= ENABLE_TEXMAT(u);
|
||||
}
|
||||
|
||||
if (old_texmat_enabled != ctx->Texture._TexMatEnabled)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue