summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2014-01-31 17:38:35 -0700
committerBrian Paul <[email protected]>2014-02-02 06:52:37 -0700
commit20fedfd80aa2402d2033215c538894c9f81e422a (patch)
treed13c8b13aedb11044d09b66b2abcfce96e9c10b0 /src/mesa/main/teximage.c
parentc55e3e6811413ce5c3aabfcf8dfcf5eb8a53499e (diff)
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 <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r--src/mesa/main/teximage.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 6f84b382a25..4d635fe7f47 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -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);