mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-17 14:40:43 +01:00
ac/nir: Sanitize location_frac for local variables.
If they were promoted from inputs/outputs, they could have a
non-zero value left over, which messed with our store handling.
Fixes: 06f05040eb "radv: Link shaders."
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
parent
af8fd38996
commit
67e09c8b45
1 changed files with 1 additions and 0 deletions
|
|
@ -5556,6 +5556,7 @@ setup_locals(struct ac_nir_context *ctx,
|
|||
nir_foreach_variable(variable, &func->impl->locals) {
|
||||
unsigned attrib_count = glsl_count_attribute_slots(variable->type, false);
|
||||
variable->data.driver_location = ctx->num_locals * 4;
|
||||
variable->data.location_frac = 0;
|
||||
ctx->num_locals += attrib_count;
|
||||
}
|
||||
ctx->locals = malloc(4 * ctx->num_locals * sizeof(LLVMValueRef));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue