summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_atom.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker/st_atom.c')
-rw-r--r--src/mesa/state_tracker/st_atom.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index abbbd4d45a3..b40ce1e3399 100644
--- a/src/mesa/state_tracker/st_atom.c
+++ b/src/mesa/state_tracker/st_atom.c
@@ -36,11 +36,12 @@
#include "st_program.h"
#include "st_manager.h"
+typedef void (*update_func_t)(struct st_context *st);
/* The list state update functions. */
-static const struct st_tracked_state *atoms[] =
+static const update_func_t update_functions[] =
{
-#define ST_STATE(FLAG, st_update) &st_update,
+#define ST_STATE(FLAG, st_update) st_update,
#include "st_atom_list.h"
#undef ST_STATE
};
@@ -48,7 +49,7 @@ static const struct st_tracked_state *atoms[] =
void st_init_atoms( struct st_context *st )
{
- STATIC_ASSERT(ARRAY_SIZE(atoms) <= 64);
+ STATIC_ASSERT(ARRAY_SIZE(update_functions) <= 64);
}
@@ -226,9 +227,9 @@ void st_validate_state( struct st_context *st, enum st_pipeline pipeline )
* Don't use u_bit_scan64, it may be slower on 32-bit.
*/
while (dirty_lo)
- atoms[u_bit_scan(&dirty_lo)]->update(st);
+ update_functions[u_bit_scan(&dirty_lo)](st);
while (dirty_hi)
- atoms[32 + u_bit_scan(&dirty_hi)]->update(st);
+ update_functions[32 + u_bit_scan(&dirty_hi)](st);
/* Clear the render or compute state bits. */
st->dirty &= ~pipeline_mask;