radeonsi: fix SI_NUM_ATOMS
authorTimothy Arceri <tarceri@itsqueeze.com>
Tue, 7 Jul 2020 00:00:47 +0000 (10:00 +1000)
committerMarge Bot <eric+marge@anholt.net>
Wed, 8 Jul 2020 03:04:03 +0000 (03:04 +0000)
This is not used anywhere so maybe we should just drop it instead.

Fixes: 639b673fc3b8 ("radeonsi: don't use an indirect table for state atoms")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5766>

src/gallium/drivers/radeonsi/si_state.h

index ab655498a1d19c379797ea8ee8239bad1f0ab421..62202de2cdb7cddd59584df3ece4357e281a8110 100644 (file)
@@ -232,7 +232,7 @@ union si_state_atoms {
 };
 
 #define SI_ATOM_BIT(name) (1 << (offsetof(union si_state_atoms, s.name) / sizeof(struct si_atom)))
-#define SI_NUM_ATOMS      (sizeof(union si_state_atoms) / sizeof(struct si_atom *))
+#define SI_NUM_ATOMS      (sizeof(union si_state_atoms) / sizeof(struct si_atom))
 
 static inline unsigned si_atoms_that_always_roll_context(void)
 {