projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bcfc97d
)
mesa: fix/add error check in _mesa_ColorMaterial()
author
Brian Paul
<brianp@vmware.com>
Tue, 8 May 2012 16:22:20 +0000
(10:22 -0600)
committer
Brian Paul
<brianp@vmware.com>
Fri, 11 May 2012 22:13:14 +0000
(16:13 -0600)
_mesa_material_bitmask() will record a GL error and return 0 if
face or mode are illegal. Return early in that case.
NOTE: This is a candidate for the 8.0 branch.
src/mesa/main/light.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/light.c
b/src/mesa/main/light.c
index 7bc22e2fa5463da1a2df5eb8987782b0ab21269e..38ec1b6e801ee48b29262425feb9525d653e45ef 100644
(file)
--- a/
src/mesa/main/light.c
+++ b/
src/mesa/main/light.c
@@
-728,6
+728,8
@@
_mesa_ColorMaterial( GLenum face, GLenum mode )
_mesa_lookup_enum_by_nr(mode));
bitmask = _mesa_material_bitmask(ctx, face, mode, legal, "glColorMaterial");
+ if (bitmask == 0)
+ return; /* error was recorded */
if (ctx->Light.ColorMaterialBitmask == bitmask &&
ctx->Light.ColorMaterialFace == face &&