mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
main: Use _mesa_lookup_bufferobj_err to simplify Tex[ture]Buffer[Range].
v2: Review from Anuj Phogat - Split rebase of Tex[ture]Buffer[Range] - Closing curly brace on the same line as else Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
This commit is contained in:
parent
768ca8b83e
commit
d03337306a
1 changed files with 12 additions and 11 deletions
|
|
@ -5303,11 +5303,12 @@ _mesa_TexBuffer(GLenum target, GLenum internalFormat, GLuint buffer)
|
|||
return;
|
||||
}
|
||||
|
||||
bufObj = _mesa_lookup_bufferobj(ctx, buffer);
|
||||
if (!bufObj && buffer) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glTexBuffer(buffer %u)", buffer);
|
||||
return;
|
||||
}
|
||||
if (buffer) {
|
||||
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glTexBuffer");
|
||||
if (!bufObj)
|
||||
return;
|
||||
} else
|
||||
bufObj = NULL;
|
||||
|
||||
texObj = _mesa_get_current_tex_object(ctx, target);
|
||||
if (!texObj)
|
||||
|
|
@ -5387,12 +5388,12 @@ _mesa_TextureBuffer(GLuint texture, GLenum internalFormat, GLuint buffer)
|
|||
return;
|
||||
}
|
||||
|
||||
bufObj = _mesa_lookup_bufferobj(ctx, buffer);
|
||||
if (!bufObj && buffer) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glTextureBuffer(buffer %u)",
|
||||
buffer);
|
||||
return;
|
||||
}
|
||||
if (buffer) {
|
||||
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glTextureBuffer");
|
||||
if (!bufObj)
|
||||
return;
|
||||
} else
|
||||
bufObj = NULL;
|
||||
|
||||
/* Get the texture object by Name. */
|
||||
texObj = _mesa_lookup_texture_err(ctx, texture,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue