diff options
author | Timothy Arceri <[email protected]> | 2018-12-11 15:06:37 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2019-01-02 12:19:17 +1100 |
commit | 0a4378ce562dbf68b7b58165f2dcfc94f831559f (patch) | |
tree | 29f962c5a0aea31b51a9defbb96da8c76be669f6 /src/mesa | |
parent | 2ef0f944f55ed5ba993b033d7ce54f531688b858 (diff) |
st/glsl_to_nir: call nir_lower_load_const_to_scalar() in the st
This will help the new opt introduced in the following patches
allowing us to remove extra duplicate varyings.
Tested-by: Dieter Nützel <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_nir.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index 14927c8a4a9..dce96ab58b6 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -702,8 +702,10 @@ st_link_nir(struct gl_context *ctx, nir_shader *nir = shader->Program->nir; - if (is_scalar[i]) + if (is_scalar[i]) { NIR_PASS_V(nir, nir_lower_io_to_scalar_early, mask); + NIR_PASS_V(nir, nir_lower_load_const_to_scalar); + } st_nir_opts(nir, is_scalar[i]); } |