diff options
author | Francisco Jerez <[email protected]> | 2015-09-03 16:12:59 +0300 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-10-21 14:23:20 +0100 |
commit | df361e2311b61f215b01a98452ffb448015f896a (patch) | |
tree | 786430afc9824bbd03f037250a2f8c76fb866800 /src | |
parent | 7259f17eca89060c9367c4e859d5a4ba43d010c1 (diff) |
mesa: Skip redundant texture completeness checking during image validation.
The call to _mesa_test_texobj_completeness() is unnecessary if the
texture is already known to be complete. If the texture object is
dirtied in the meantime _BaseComplete and _MipmapComplete will be
reset to false. _mesa_is_image_unit_valid() will start to be called
more frequently in a future commit, so it seems desirable to avoid the
unnecessary work.
Tested-by: Ye Tian <[email protected]>
CC: "11.0" <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
(cherry picked from commit 25d3338be37ddbfe676716034ec5f29e27323704)
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/shaderimage.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/shaderimage.c b/src/mesa/main/shaderimage.c index a0a3b7b8fc2..e686cad0542 100644 --- a/src/mesa/main/shaderimage.c +++ b/src/mesa/main/shaderimage.c @@ -424,7 +424,8 @@ _mesa_is_image_unit_valid(struct gl_context *ctx, struct gl_image_unit *u) if (!t) return GL_FALSE; - _mesa_test_texobj_completeness(ctx, t); + if (!t->_BaseComplete && !t->_MipmapComplete) + _mesa_test_texobj_completeness(ctx, t); if (u->Level < t->BaseLevel || u->Level > t->_MaxLevel || |