aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nv50/nv50_state_validate.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/nouveau/nv50/nv50_state_validate.c')
-rw-r--r--src/gallium/drivers/nouveau/nv50/nv50_state_validate.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_state_validate.c b/src/gallium/drivers/nouveau/nv50/nv50_state_validate.c
index 1df6bd943de..d14d603adc9 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_state_validate.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_state_validate.c
@@ -508,7 +508,6 @@ static struct state_validate {
{ nv50_vertex_arrays_validate, NV50_NEW_VERTEX | NV50_NEW_ARRAYS },
{ nv50_validate_min_samples, NV50_NEW_MIN_SAMPLES },
};
-#define validate_list_len (sizeof(validate_list) / sizeof(validate_list[0]))
bool
nv50_state_validate(struct nv50_context *nv50, uint32_t mask, unsigned words)
@@ -523,7 +522,7 @@ nv50_state_validate(struct nv50_context *nv50, uint32_t mask, unsigned words)
state_mask = nv50->dirty & mask;
if (state_mask) {
- for (i = 0; i < validate_list_len; ++i) {
+ for (i = 0; i < ARRAY_SIZE(validate_list); ++i) {
struct state_validate *validate = &validate_list[i];
if (state_mask & validate->states)