diff options
author | Timur Kristóf <[email protected]> | 2019-02-28 10:53:11 +0100 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2019-03-05 19:13:27 +0000 |
commit | 6684e039eba9c2e9602b1cc9d5177f69e478ff46 (patch) | |
tree | f2d93cf6d84b5a2c44d41e57980e22905c10a1fb /src/mesa/state_tracker | |
parent | 909d1f50f3ffc62d5a23669ad0bc8eedb9416af0 (diff) |
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 <[email protected]>
Tested-by: Andre Heider <[email protected]>
Tested-by: Rob Clark <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_nir.cpp | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_nir_builtins.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index 84638fd88a5..dab98f18604 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -991,7 +991,7 @@ st_finalize_nir(struct st_context *st, struct gl_program *prog, if (st->ctx->Const.PackedDriverUniformStorage) { NIR_PASS_V(nir, nir_lower_io, nir_var_uniform, st_glsl_type_dword_size, (nir_lower_io_options)0); - NIR_PASS_V(nir, nir_lower_uniforms_to_ubo); + NIR_PASS_V(nir, nir_lower_uniforms_to_ubo, 4); } st_nir_lower_samplers(screen, nir, shader_program, prog); diff --git a/src/mesa/state_tracker/st_nir_builtins.c b/src/mesa/state_tracker/st_nir_builtins.c index ce00b5e1671..8ec320cbb9c 100644 --- a/src/mesa/state_tracker/st_nir_builtins.c +++ b/src/mesa/state_tracker/st_nir_builtins.c @@ -66,7 +66,7 @@ st_nir_finish_builtin_shader(struct st_context *st, if (st->ctx->Const.PackedDriverUniformStorage) { NIR_PASS_V(nir, nir_lower_io, nir_var_uniform, st_glsl_type_dword_size, (nir_lower_io_options)0); - NIR_PASS_V(nir, nir_lower_uniforms_to_ubo); + NIR_PASS_V(nir, nir_lower_uniforms_to_ubo, 4); } struct pipe_shader_state state = { |