mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-12-04 05:33:41 +00:00
mesa: Call _mesa_test_texobj_completeness() before using _MaxLevel in image validation.
gl_texture_object::_MaxLevel doesn't have any meaningful value until _mesa_test_texobj_completeness() has been run. Fixes the "level" ARB_shader_image_load_store piglit test. Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
parent
f74ba58f84
commit
4e4855f1de
@ -337,13 +337,14 @@ validate_image_unit(struct gl_context *ctx, struct gl_image_unit *u)
|
||||
struct gl_texture_object *t = u->TexObj;
|
||||
mesa_format tex_format;
|
||||
|
||||
if (!t || u->Level < t->BaseLevel ||
|
||||
u->Level > t->_MaxLevel)
|
||||
if (!t)
|
||||
return GL_FALSE;
|
||||
|
||||
_mesa_test_texobj_completeness(ctx, t);
|
||||
|
||||
if ((u->Level == t->BaseLevel && !t->_BaseComplete) ||
|
||||
if (u->Level < t->BaseLevel ||
|
||||
u->Level > t->_MaxLevel ||
|
||||
(u->Level == t->BaseLevel && !t->_BaseComplete) ||
|
||||
(u->Level != t->BaseLevel && !t->_MipmapComplete))
|
||||
return GL_FALSE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user