mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 20:18:12 +02:00
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 <yex.tian@intel.com>
CC: "11.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 25d3338be3)
This commit is contained in:
parent
7259f17eca
commit
df361e2311
1 changed files with 2 additions and 1 deletions
|
|
@ -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 ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue