aco: stop multiplying driver_location by 4

This didn't really serve any purpose, doesn't match how FS inputs are
currently done, and prevented us from using
nir_io_add_const_offset_to_base in the future.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6689>
This commit is contained in:
Rhys Perry
2020-09-18 13:31:43 +01:00
committed by Marge Bot
parent fd872c3cf7
commit f100cf0d30
3 changed files with 16 additions and 16 deletions
@@ -472,12 +472,12 @@ setup_vs_variables(isel_context *ctx, nir_shader *nir)
{
nir_foreach_shader_in_variable(variable, nir)
{
variable->data.driver_location = variable->data.location * 4;
variable->data.driver_location = variable->data.location;
}
nir_foreach_shader_out_variable(variable, nir)
{
if (ctx->stage == vertex_vs || ctx->stage == ngg_vertex_gs)
variable->data.driver_location = variable->data.location * 4;
variable->data.driver_location = variable->data.location;
}
if (ctx->stage == vertex_vs || ctx->stage == ngg_vertex_gs) {
@@ -502,7 +502,7 @@ void setup_gs_variables(isel_context *ctx, nir_shader *nir)
ctx->program->config->lds_size = ctx->program->info->gs_ring_info.lds_size; /* Already in units of the alloc granularity */
nir_foreach_shader_out_variable(variable, nir) {
variable->data.driver_location = variable->data.location * 4;
variable->data.driver_location = variable->data.location;
}
if (ctx->stage == vertex_geometry_gs)
@@ -570,7 +570,7 @@ setup_tes_variables(isel_context *ctx, nir_shader *nir)
nir_foreach_shader_out_variable(variable, nir) {
if (ctx->stage == tess_eval_vs || ctx->stage == ngg_tess_eval_gs)
variable->data.driver_location = variable->data.location * 4;
variable->data.driver_location = variable->data.location;
}
if (ctx->stage == tess_eval_vs || ctx->stage == ngg_tess_eval_gs) {
@@ -588,7 +588,7 @@ setup_variables(isel_context *ctx, nir_shader *nir)
nir_foreach_shader_out_variable(variable, nir)
{
int idx = variable->data.location + variable->data.index;
variable->data.driver_location = idx * 4;
variable->data.driver_location = idx;
}
break;
}