mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-01 13:20:25 +01:00
swrast: use STATIC_ASSERT to make sure texfetch table isn't missing entries
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.
This commit is contained in:
parent
15be8b4bf0
commit
ea472ffe67
1 changed files with 2 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue