zink: track which stages in gfx programs are using inlined uniforms

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18135>
This commit is contained in:
Mike Blumenkrantz
2022-08-11 15:48:11 -04:00
committed by Marge Bot
parent 8a5b3658df
commit 6a836eaff5
2 changed files with 7 additions and 0 deletions

View File

@@ -257,6 +257,12 @@ update_gfx_shader_modules(struct zink_context *ctx,
hash_changed = true;
default_variants &= zm->default_variant;
prog->modules[i] = zm;
if (has_inline) {
if (zm->num_uniforms)
prog->inline_variants |= BITFIELD_BIT(i);
else
prog->inline_variants &= ~BITFIELD_BIT(i);
}
variant_hash ^= prog->modules[i]->hash;
}