diff options
author | Connor Abbott <[email protected]> | 2019-05-29 17:09:45 +0200 |
---|---|---|
committer | Connor Abbott <[email protected]> | 2019-05-31 11:02:57 +0200 |
commit | fca1a35163769f0476d559660a8f2c40054e9fd7 (patch) | |
tree | 700bcc0d733a54c51d5783b7ba05cd747d210a18 /src/gallium/drivers | |
parent | 6571032af1d2c00150c4a6699a5fc385dd174ab9 (diff) |
radeonsi/nir: Use correct location for uniform access bound
location is the API-level location, but driver_location is the actual
location the uniform gets passed to the driver. This apparently only
caused failures with builtins, where the location is 0 because it's
represented via the state tokens instead.
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader_nir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c index 10e72fd9f4d..3a5e17c6b29 100644 --- a/src/gallium/drivers/radeonsi/si_shader_nir.c +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c @@ -709,7 +709,7 @@ void si_nir_scan_shader(const struct nir_shader *nir, enum glsl_base_type base_type = glsl_get_base_type(glsl_without_array(type)); unsigned aoa_size = MAX2(1, glsl_get_aoa_size(type)); - unsigned loc = variable->data.location; + unsigned loc = variable->data.driver_location / 4; int slot_count = glsl_count_attribute_slots(type, false); int max_slot = MAX2(info->const_file_max[0], (int) loc) + slot_count; |