The glPopAttrib optimizations incorrectly removed it.
Use GL_ALL_ATTRIB_BITS to mean "all texture parameters have changed" to
make it more efficient.
Fixes:
d0e18550e26 - mesa: optimize saving/restoring bound textures for glPush/PopAttrib
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8046>
case GL_TEXTURE_MIN_FILTER:
case GL_TEXTURE_BASE_LEVEL:
case GL_TEXTURE_MAX_LEVEL:
+ case GL_ALL_ATTRIB_BITS: /* meaning is all pnames, internal */
nouveau_texture_reallocate(ctx, t);
context_dirty_i(ctx, TEX_OBJ, ctx->Texture.CurrentUnit);
break;
_mesa_enum_to_string( pname ) );
switch ( pname ) {
+ case GL_ALL_ATTRIB_BITS: /* meaning is all pnames, internal */
case GL_TEXTURE_MIN_FILTER:
case GL_TEXTURE_MAG_FILTER:
case GL_TEXTURE_MAX_ANISOTROPY_EXT:
_mesa_enum_to_string( pname ) );
switch ( pname ) {
+ case GL_ALL_ATTRIB_BITS: /* meaning is all pnames, internal */
case GL_TEXTURE_BASE_LEVEL:
case GL_TEXTURE_MAX_LEVEL:
case GL_TEXTURE_MIN_LOD:
memcpy(&texObj->Sampler.Attrib, &savedObj->Sampler.Attrib,
sizeof(savedObj->Sampler.Attrib));
memcpy(&texObj->Attrib, &savedObj->Attrib, sizeof(savedObj->Attrib));
+
+ /* GL_ALL_ATTRIB_BITS means all pnames. (internal) */
+ if (texObj->Name != 0 && ctx->Driver.TexParameter)
+ ctx->Driver.TexParameter(ctx, texObj, GL_ALL_ATTRIB_BITS);
}
}
struct st_texture_object *stObj = st_texture_object(texObj);
switch (pname) {
+ case GL_ALL_ATTRIB_BITS: /* meaning is all pnames, internal */
case GL_TEXTURE_BASE_LEVEL:
case GL_TEXTURE_MAX_LEVEL:
case GL_DEPTH_TEXTURE_MODE: