projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
048de9e
)
mesa: use _mesa_lookup_texture_err() in get_tex_obj_for_clear()
author
Samuel Pitoiset
<samuel.pitoiset@gmail.com>
Wed, 21 Jun 2017 08:09:47 +0000
(10:09 +0200)
committer
Samuel Pitoiset
<samuel.pitoiset@gmail.com>
Thu, 22 Jun 2017 08:41:15 +0000
(10:41 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mesa/main/teximage.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/teximage.c
b/src/mesa/main/teximage.c
index 54f7c08d50e6a73ce38f7c64565f6e4d8c82f8f2..346d505fcaa6283e56ae23c6534cba94d80c2c00 100644
(file)
--- a/
src/mesa/main/teximage.c
+++ b/
src/mesa/main/teximage.c
@@
-4143,17
+4143,9
@@
get_tex_obj_for_clear(struct gl_context *ctx,
{
struct gl_texture_object *texObj;
- if (texture == 0) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "%s(zero texture)", function);
- return NULL;
- }
-
- texObj = _mesa_lookup_texture(ctx, texture);
-
- if (texObj == NULL) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "%s(non-gen name)", function);
+ texObj = _mesa_lookup_texture_err(ctx, texture, function);
+ if (!texObj)
return NULL;
- }
if (texObj->Target == 0) {
_mesa_error(ctx, GL_INVALID_OPERATION, "%s(unbound tex)", function);