mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
mesa: don't signal _NEW_TEXTURE in TexSubImage() functions
glTexSubImage(), glCopyTexSubImage() and glCompressedTexSubImage() only change the texel data, not other state like texture size or format. If a driver really needs do something special it can hook into the corresponding driver functions or Map/UnmapTextureImage(). This should avoid some needless state validation effort. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
c55e3e6811
commit
20fedfd80a
1 changed files with 9 additions and 3 deletions
|
|
@ -3442,7 +3442,9 @@ texsubimage(struct gl_context *ctx, GLuint dims, GLenum target, GLint level,
|
|||
|
||||
check_gen_mipmap(ctx, target, texObj, level);
|
||||
|
||||
ctx->NewState |= _NEW_TEXTURE;
|
||||
/* NOTE: Don't signal _NEW_TEXTURE since we've only changed
|
||||
* the texel data, not the texture format, size, etc.
|
||||
*/
|
||||
}
|
||||
}
|
||||
_mesa_unlock_texture(ctx, texObj);
|
||||
|
|
@ -3729,7 +3731,9 @@ copytexsubimage(struct gl_context *ctx, GLuint dims, GLenum target, GLint level,
|
|||
|
||||
check_gen_mipmap(ctx, target, texObj, level);
|
||||
|
||||
ctx->NewState |= _NEW_TEXTURE;
|
||||
/* NOTE: Don't signal _NEW_TEXTURE since we've only changed
|
||||
* the texel data, not the texture format, size, etc.
|
||||
*/
|
||||
}
|
||||
}
|
||||
_mesa_unlock_texture(ctx, texObj);
|
||||
|
|
@ -3954,7 +3958,9 @@ compressed_tex_sub_image(GLuint dims, GLenum target, GLint level,
|
|||
|
||||
check_gen_mipmap(ctx, target, texObj, level);
|
||||
|
||||
ctx->NewState |= _NEW_TEXTURE;
|
||||
/* NOTE: Don't signal _NEW_TEXTURE since we've only changed
|
||||
* the texel data, not the texture format, size, etc.
|
||||
*/
|
||||
}
|
||||
}
|
||||
_mesa_unlock_texture(ctx, texObj);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue