projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15be8b4
)
swrast: use STATIC_ASSERT to make sure texfetch table isn't missing entries
author
Brian Paul
<brianp@vmware.com>
Tue, 29 Nov 2011 01:13:44 +0000
(18:13 -0700)
committer
Brian Paul
<brianp@vmware.com>
Wed, 30 Nov 2011 13:57:36 +0000
(06:57 -0700)
When new MESA_FORMAT_x enums are added we need to add a new entry in
the table of texture fetch functions. In the past this has been
missed if swrast isn't actually tested. Using a static assertion
should help with that.
src/mesa/swrast/s_texfetch.c
patch
|
blob
|
history
diff --git
a/src/mesa/swrast/s_texfetch.c
b/src/mesa/swrast/s_texfetch.c
index bcd63b602739c99ed3f164d7771e3c5c0c9ab917..ab7cfb50f946990bc3380c57b7b351998a5b3b2a 100644
(file)
--- a/
src/mesa/swrast/s_texfetch.c
+++ b/
src/mesa/swrast/s_texfetch.c
@@
-1282,7
+1282,8
@@
_mesa_get_texel_fetch_func(gl_format format, GLuint dims)
}
#endif
- assert(Elements(texfetch_funcs) == MESA_FORMAT_COUNT);
+ STATIC_ASSERT(Elements(texfetch_funcs) == MESA_FORMAT_COUNT);
+
assert(format < MESA_FORMAT_COUNT);
switch (dims) {