From d68150f15d41756fa7153cd6b597ff52ec85a933 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Thu, 23 Mar 2017 22:42:56 +0100 Subject: mesa: split _NEW_TEXTURE into _NEW_TEXTURE_OBJECT & _NEW_TEXTURE_STATE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No performance testing has been done, because it makes sense to make this change regardless of that. Also, _NEW_TEXTURE is still used in many places, but the obvious occurences are replaced here. It's now possible to split _NEW_TEXTURE_OBJECT further. Reviewed-by: Edward O'Callaghan Reviewed-by: Timothy Arceri Reviewed-by: Nicolai Hähnle --- src/mesa/main/texobj.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/mesa/main/texobj.c') diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 25b959d1814..a5e64c3e57b 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -932,7 +932,7 @@ _mesa_dirty_texobj(struct gl_context *ctx, struct gl_texture_object *texObj) { texObj->_BaseComplete = GL_FALSE; texObj->_MipmapComplete = GL_FALSE; - ctx->NewState |= _NEW_TEXTURE; + ctx->NewState |= _NEW_TEXTURE_OBJECT; } @@ -1412,7 +1412,7 @@ unbind_textures_from_unit(struct gl_context *ctx, GLuint unit) ctx->Driver.BindTexture(ctx, unit, 0, texObj); texUnit->_BoundTextures &= ~(1 << index); - ctx->NewState |= _NEW_TEXTURE; + ctx->NewState |= _NEW_TEXTURE_OBJECT; } } @@ -1482,7 +1482,7 @@ _mesa_DeleteTextures( GLsizei n, const GLuint *textures) _mesa_unlock_texture(ctx, delObj); - ctx->NewState |= _NEW_TEXTURE; + ctx->NewState |= _NEW_TEXTURE_OBJECT; /* The texture _name_ is now free for re-use. * Remove it from the hash table now. @@ -1531,7 +1531,7 @@ _mesa_delete_nameless_texture(struct gl_context *ctx, } _mesa_unlock_texture(ctx, texObj); - ctx->NewState |= _NEW_TEXTURE; + ctx->NewState |= _NEW_TEXTURE_OBJECT; /* Unreference the texobj. If refcount hits zero, the texture * will be deleted. @@ -1634,7 +1634,7 @@ bind_texture(struct gl_context *ctx, } /* flush before changing binding */ - FLUSH_VERTICES(ctx, _NEW_TEXTURE); + FLUSH_VERTICES(ctx, _NEW_TEXTURE_OBJECT); /* If the refcount on the previously bound texture is decremented to * zero, it'll be deleted here. @@ -1915,7 +1915,7 @@ _mesa_PrioritizeTextures( GLsizei n, const GLuint *texName, } } - ctx->NewState |= _NEW_TEXTURE; + ctx->NewState |= _NEW_TEXTURE_OBJECT; } @@ -2019,7 +2019,7 @@ _mesa_lock_context_textures( struct gl_context *ctx ) mtx_lock(&ctx->Shared->TexMutex); if (ctx->Shared->TextureStateStamp != ctx->TextureStateTimestamp) { - ctx->NewState |= _NEW_TEXTURE; + ctx->NewState |= _NEW_TEXTURE_OBJECT; ctx->TextureStateTimestamp = ctx->Shared->TextureStateStamp; } } -- cgit v1.2.3