From 45809bcb33f273ac0b5c2511e1f2711af2eb1bad Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timur=20Krist=C3=B3f?= Date: Mon, 4 Mar 2019 15:10:55 +0100 Subject: [PATCH] tgsi_to_nir: Set correct location for uniforms. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Tested-by: Andre Heider Tested-by: Rob Clark Reviewed-by: Timothy Arceri --- src/gallium/auxiliary/nir/tgsi_to_nir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c index 016e2b46f08..09e40977fd8 100644 --- a/src/gallium/auxiliary/nir/tgsi_to_nir.c +++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c @@ -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; -- 2.30.2