mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 12:30:09 +01:00
mesa: fix using texture id 0 with glTextureSubImage*()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
parent
45eb87e5e5
commit
a285caaf25
1 changed files with 2 additions and 5 deletions
|
|
@ -3336,12 +3336,9 @@ texturesubimage(struct gl_context *ctx, GLuint dims,
|
|||
_mesa_enum_to_string(type), pixels);
|
||||
|
||||
/* Get the texture object by Name. */
|
||||
texObj = _mesa_lookup_texture(ctx, texture);
|
||||
if (!texObj) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glTextureSubImage%uD(texture)",
|
||||
dims);
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture, callerName);
|
||||
if (!texObj)
|
||||
return;
|
||||
}
|
||||
|
||||
/* check target (proxies not allowed) */
|
||||
if (!legal_texsubimage_target(ctx, dims, texObj->Target, true)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue