mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
tgsi_to_nir: Set correct location for uniforms.
Previously, only the driver_location was set for all variables, but constants need to use the location field instead. This change is necessary because the nine state tracker can produce non-packed constants whose location needs to be explicitly set. Signed-Off-By: Timur Kristóf <timur.kristof@gmail.com> Tested-by: Andre Heider <a.heider@gmail.com> Tested-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
parent
770faf546d
commit
45809bcb33
1 changed files with 1 additions and 0 deletions
|
|
@ -414,6 +414,7 @@ ttn_emit_declaration(struct ttn_compile *c)
|
|||
case TGSI_FILE_CONSTANT:
|
||||
var->data.mode = nir_var_uniform;
|
||||
var->name = ralloc_asprintf(var, "uniform_%d", idx);
|
||||
var->data.location = idx;
|
||||
|
||||
exec_list_push_tail(&b->shader->uniforms, &var->node);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue