nir: Add multiplier argument to nir_lower_uniforms_to_ubo.

Note that locations can be set in different units, and the multiplier
argument caters to supporting these different units. For example,
st_glsl_to_nir uses dwords (4 bytes) so the multiplier should be 4,
while tgsi_to_nir uses bytes, so the multiplier should be 16.

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>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Timur Kristóf
2019-02-28 10:53:11 +01:00
committed by Eric Anholt
parent 909d1f50f3
commit 6684e039eb
4 changed files with 18 additions and 11 deletions

View File

@@ -3036,7 +3036,7 @@ void nir_lower_io_arrays_to_elements_no_indirects(nir_shader *shader,
void nir_lower_io_to_scalar(nir_shader *shader, nir_variable_mode mask);
void nir_lower_io_to_scalar_early(nir_shader *shader, nir_variable_mode mask);
bool nir_lower_uniforms_to_ubo(nir_shader *shader);
bool nir_lower_uniforms_to_ubo(nir_shader *shader, int multiplier);
typedef struct nir_lower_subgroups_options {
uint8_t subgroup_size;