From bfa834a78ab32b967beb5c22c84425da513d7e19 Mon Sep 17 00:00:00 2001 From: Yuri Roubinsky Date: Mon, 23 Sep 2019 17:22:55 +0300 Subject: [PATCH] [Vulkan] Implement shader array support for varyings Remake of #32175 --- servers/visual/rasterizer_rd/shader_compiler_rd.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/servers/visual/rasterizer_rd/shader_compiler_rd.cpp b/servers/visual/rasterizer_rd/shader_compiler_rd.cpp index 4572345334a..27d6261c40f 100644 --- a/servers/visual/rasterizer_rd/shader_compiler_rd.cpp +++ b/servers/visual/rasterizer_rd/shader_compiler_rd.cpp @@ -461,6 +461,11 @@ String ShaderCompilerRD::_dump_node_code(const SL::Node *p_node, int p_level, Ge vcode += _prestr(E->get().precision); vcode += _typestr(E->get().type); vcode += " " + _mkid(E->key()); + if (E->get().array_size > 0) { + vcode += "["; + vcode += itos(E->get().array_size); + vcode += "]"; + } vcode += ";\n"; r_gen_code.vertex_global += "layout(location=" + itos(index) + ") " + interp_mode + "out " + vcode; r_gen_code.fragment_global += "layout(location=" + itos(index) + ") " + interp_mode + "in " + vcode;