mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 16:28:08 +02:00
mesa: fix using texture id 0 with glTextureStorage*()
This fixes an assertion in debug build, and probably a crash in release build. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
parent
1f38363e68
commit
51a7e0d14f
1 changed files with 2 additions and 6 deletions
|
|
@ -539,13 +539,9 @@ texturestorage(GLuint dims, GLuint texture, GLsizei levels,
|
|||
return;
|
||||
}
|
||||
|
||||
/* Get the texture object by Name. */
|
||||
texObj = _mesa_lookup_texture(ctx, texture);
|
||||
if (!texObj) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"%s(texture = %d)", caller, texture);
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture, caller);
|
||||
if (!texObj)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check target. This is done here so that _mesa_texture_storage
|
||||
* can receive unsized formats.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue