X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fvc4%2Fvc4_qir_lower_uniforms.c;h=d7c22e75c2938fc52513fb64c8deb9a7627d7a60;hb=1a99fc0fd022018ed056cd42f299d5ad1a02c264;hp=1884cfa5b784c1f015c35d1b3953be5e06d5954c;hpb=314f0c57e4c00b0a5cb544fa43e356c1069acd8f;p=mesa.git diff --git a/src/gallium/drivers/vc4/vc4_qir_lower_uniforms.c b/src/gallium/drivers/vc4/vc4_qir_lower_uniforms.c index 1884cfa5b78..d7c22e75c29 100644 --- a/src/gallium/drivers/vc4/vc4_qir_lower_uniforms.c +++ b/src/gallium/drivers/vc4/vc4_qir_lower_uniforms.c @@ -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); } @@ -77,7 +77,7 @@ is_lowerable_uniform(struct qinst *inst, int i) if (inst->src[i].file != QFILE_UNIF) return false; if (qir_is_tex(inst)) - return i != 1; + return i != qir_get_tex_uniform_src(inst); return true; } @@ -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;