OSDN Git Service
(root)
/
android-x86
/
external-mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1828b6d
)
egl: bump up MAX_ATTRIBS, added assertion
author
Brian Paul
<brian.paul@tungstengraphics.com>
Mon, 7 Jul 2008 20:34:30 +0000
(14:34 -0600)
committer
Brian Paul
<brian.paul@tungstengraphics.com>
Mon, 7 Jul 2008 20:34:30 +0000
(14:34 -0600)
src/egl/main/eglconfig.h
patch
|
blob
|
history
diff --git
a/src/egl/main/eglconfig.h
b/src/egl/main/eglconfig.h
index
d12f662
..
db1c4c1
100644
(file)
--- a/
src/egl/main/eglconfig.h
+++ b/
src/egl/main/eglconfig.h
@@
-6,7
+6,7
@@
#include <GLES/gl.h>
-#define MAX_ATTRIBS 1
00
+#define MAX_ATTRIBS 1
28
#define FIRST_ATTRIB EGL_BUFFER_SIZE
@@
-17,7
+17,11
@@
struct _egl_config
};
-#define SET_CONFIG_ATTRIB(CONF, ATTR, VAL) ((CONF)->Attrib[(ATTR) - FIRST_ATTRIB] = VAL)
+#define SET_CONFIG_ATTRIB(CONF, ATTR, VAL) \
+ assert((ATTR) - FIRST_ATTRIB < MAX_ATTRIBS); \
+ ((CONF)->Attrib[(ATTR) - FIRST_ATTRIB] = VAL)
+
+
#define GET_CONFIG_ATTRIB(CONF, ATTR) ((CONF)->Attrib[(ATTR) - FIRST_ATTRIB])