vc4: Fall back to renderonly if the vc4 driver doesn't have v3d.
[mesa.git] / src / gallium / drivers / vc4 / vc4_qir_lower_uniforms.c
index 9ecfe65211e981b44daa8f635451ab1ff1084bf3..d7c22e75c2938fc52513fb64c8deb9a7627d7a60 100644 (file)
@@ -66,7 +66,7 @@ remove_uniform(struct hash_table *ht, struct qreg reg)
 
         entry = _mesa_hash_table_search(ht, key);
         assert(entry);
-        entry->data--;
+        entry->data = (void *)(((uintptr_t) entry->data) - 1);
         if (entry->data == NULL)
                 _mesa_hash_table_remove(ht, entry);
 }
@@ -136,7 +136,6 @@ qir_lower_uniforms(struct vc4_compile *c)
                  */
                 uint32_t max_count = 0;
                 uint32_t max_index = 0;
-                struct hash_entry *entry;
                 hash_table_foreach(ht, entry) {
                         uint32_t count = (uintptr_t)entry->data;
                         uint32_t index = (uintptr_t)entry->key - 1;