glsl/fp/vp: Avoid shader clutter

- Do not add unused subroutines in shaders unless necessary
-- makes shaders easier to read and disassembled spir-v has less clutter
- glsl: Replace switch block with lookup table
This commit is contained in:
kd-11 2018-01-25 00:09:27 +03:00
parent 2e04dceaf0
commit 33bcdd476c
9 changed files with 192 additions and 123 deletions

View file

@ -185,7 +185,7 @@ void VKVertexDecompilerThread::insertOutputs(std::stringstream & OS, const std::
void VKVertexDecompilerThread::insertMainStart(std::stringstream & OS)
{
glsl::insert_glsl_legacy_function(OS, glsl::glsl_vertex_program);
glsl::insert_glsl_legacy_function(OS, glsl::glsl_vertex_program, properties.has_lit_op);
glsl::insert_vertex_input_fetch(OS, glsl::glsl_rules_rpirv);
std::string parameters = "";