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

View File

@@ -1281,18 +1281,18 @@ nir_assign_linked_io_var_locations(nir_shader *producer, nir_shader *consumer)
uint64_t loc = get_linked_variable_location(variable->data.location, variable->data.patch);
if (variable->data.patch)
variable->data.driver_location = util_bitcount64(patch_io_mask & u_bit_consecutive64(0, loc)) * 4;
variable->data.driver_location = util_bitcount64(patch_io_mask & u_bit_consecutive64(0, loc));
else
variable->data.driver_location = util_bitcount64(io_mask & u_bit_consecutive64(0, loc)) * 4;
variable->data.driver_location = util_bitcount64(io_mask & u_bit_consecutive64(0, loc));
}
nir_foreach_shader_in_variable(variable, consumer) {
uint64_t loc = get_linked_variable_location(variable->data.location, variable->data.patch);
if (variable->data.patch)
variable->data.driver_location = util_bitcount64(patch_io_mask & u_bit_consecutive64(0, loc)) * 4;
variable->data.driver_location = util_bitcount64(patch_io_mask & u_bit_consecutive64(0, loc));
else
variable->data.driver_location = util_bitcount64(io_mask & u_bit_consecutive64(0, loc)) * 4;
variable->data.driver_location = util_bitcount64(io_mask & u_bit_consecutive64(0, loc));
}
nir_linked_io_var_info result = {