Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Cross.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Kristian Arntzen <post@arntzen-software.no>2020-07-03 14:12:05 +0300
committerHans-Kristian Arntzen <post@arntzen-software.no>2020-07-03 15:38:51 +0300
commit2d43103a55233bd8e205075e47008bf5a731ab68 (patch)
tree3fe59feb4c51000167341313f726bc22bb40c160 /spirv_hlsl.cpp
parentd573a95a9c65cf0ab76c0c206e3b01fa47235836 (diff)
GLSL: Support multi-level struct flattening for I/O.
Diffstat (limited to 'spirv_hlsl.cpp')
-rw-r--r--spirv_hlsl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/spirv_hlsl.cpp b/spirv_hlsl.cpp
index d278179c..70896945 100644
--- a/spirv_hlsl.cpp
+++ b/spirv_hlsl.cpp
@@ -2005,7 +2005,7 @@ void CompilerHLSL::emit_buffer_block(const SPIRVariable &var)
{
// Flatten the top-level struct so we can use packoffset,
// this restriction is similar to GLSL where layout(offset) is not possible on sub-structs.
- flattened_structs.insert(var.self);
+ flattened_structs[var.self] = false;
// Prefer the block name if possible.
auto buffer_name = to_name(type.self, false);
@@ -2110,7 +2110,7 @@ void CompilerHLSL::emit_push_constant_block(const SPIRVariable &var)
") cannot be expressed with either HLSL packing layout or packoffset."));
}
- flattened_structs.insert(var.self);
+ flattened_structs[var.self] = false;
type.member_name_cache.clear();
add_resource_name(var.self);
auto &memb = ir.meta[type.self].members;