diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-06-22 23:07:20 +0200 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-07-13 13:27:42 +0200 |
commit | 7117ff053c33de9d35523039dad9a08c33002075 (patch) | |
tree | e72b82c3af1c7778ca852d01d8146b779da29a47 | |
parent | 009ade10ae1c37f8ff781cffeaf6f5ab8cf5e60f (diff) |
glsl/linker: don't run deadcode elimination for SPIR-V shaders
It can only incorrectly remove IR shadow variables.
-rw-r--r-- | src/compiler/glsl/link_varyings.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp index de3754c423..767672b200 100644 --- a/src/compiler/glsl/link_varyings.cpp +++ b/src/compiler/glsl/link_varyings.cpp @@ -584,8 +584,10 @@ remove_unused_shader_inputs_and_outputs(bool is_separate_shader_object, /* Eliminate code that is now dead due to unused inputs/outputs being * demoted. */ - while (do_dead_code(sh->ir, false)) - ; + if (!sh->nir) { + while (do_dead_code(sh->ir, false)) + ; + } } |