diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-09-23 22:19:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-11 12:02:06 +0100 |
commit | e3b76fd040cc8cb1114feaaf41d0f264bab7c10d (patch) | |
tree | f48afb3a75e1cce147a1178949e66ecf170d831a /servers/visual/rasterizer_rd/shader_compiler_rd.cpp | |
parent | d08bf966ebb315d5b6624cebe7a7247934df325a (diff) | |
parent | bfa834a78ab32b967beb5c22c84425da513d7e19 (diff) |
Merge pull request #32281 from Chaosus/vk_shader_array_varying2
[Vulkan] Implement shader array support for varyings
Diffstat (limited to 'servers/visual/rasterizer_rd/shader_compiler_rd.cpp')
-rw-r--r-- | servers/visual/rasterizer_rd/shader_compiler_rd.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/servers/visual/rasterizer_rd/shader_compiler_rd.cpp b/servers/visual/rasterizer_rd/shader_compiler_rd.cpp index d67a8f0622..8052fba656 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; |