Mesa (master): nir: add lower_all_io_to_elements
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Mar 30 17:07:16 UTC 2019
Module: Mesa
Branch: master
Commit: 1ae0c030cbbdcbeaaf82384ef69f4d610677172e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1ae0c030cbbdcbeaaf82384ef69f4d610677172e
Author: Rob Clark <robdclark at gmail.com>
Date: Thu Mar 28 10:57:31 2019 -0400
nir: add lower_all_io_to_elements
I need this part of lower_all_io_to_temps but without the actual
lowering to temps part.
Signed-off-by: Rob Clark <robdclark at gmail.com>
---
src/compiler/nir/nir.h | 1 +
src/mesa/state_tracker/st_glsl_to_nir.cpp | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 806e47dd7bb..bc72d8f83f5 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -2273,6 +2273,7 @@ typedef struct nir_shader_compiler_options {
bool lower_extract_word;
bool lower_all_io_to_temps;
+ bool lower_all_io_to_elements;
/**
* Does the driver support real 32-bit integers? (Otherwise, integers
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp
index 96fc257032e..8a58328ce48 100644
--- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
@@ -922,6 +922,7 @@ st_finalize_nir(struct st_context *st, struct gl_program *prog,
NIR_PASS_V(nir, nir_split_var_copies);
NIR_PASS_V(nir, nir_lower_var_copies);
if (options->lower_all_io_to_temps ||
+ options->lower_all_io_to_elements ||
nir->info.stage == MESA_SHADER_VERTEX ||
nir->info.stage == MESA_SHADER_GEOMETRY) {
NIR_PASS_V(nir, nir_lower_io_arrays_to_elements_no_indirects, false);
More information about the mesa-commit
mailing list