Commit 8c5c1337 authored by Marek Olšák's avatar Marek Olšák Committed by Marge Bot

mesa: call Driver.TexParameter in glPopAttrib to fix r100, r200, old nouveau

The glPopAttrib optimizations incorrectly removed it.

Use GL_ALL_ATTRIB_BITS to mean "all texture parameters have changed" to
make it more efficient.

Fixes: d0e18550 - mesa: optimize saving/restoring bound textures for glPush/PopAttrib
Reviewed-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
Part-of: <mesa/mesa!8046>
parent a6164ab4
Pipeline #245971 waiting for manual action with stages
......@@ -413,6 +413,7 @@ nouveau_tex_parameter(struct gl_context *ctx,
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;
......
......@@ -387,6 +387,7 @@ static void r200TexParameter(struct gl_context *ctx,
_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:
......
......@@ -337,6 +337,7 @@ static void radeonTexParameter( struct gl_context *ctx,
_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:
......
......@@ -604,6 +604,10 @@ pop_texture_group(struct gl_context *ctx, struct gl_texture_attrib_node *texstat
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);
}
}
......
......@@ -3262,6 +3262,7 @@ st_TexParameter(struct gl_context *ctx,
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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment