Merge pull request #528 from msiglreith/fix_root_constants_name

Fix naming of root constants
This commit is contained in:
Hans-Kristian Arntzen 2018-04-09 08:23:46 +02:00 committed by GitHub
commit edac731360
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1874,7 +1874,7 @@ void CompilerHLSL::emit_push_constant_block(const SPIRVariable &var)
auto backup_name = get_member_name(type.self, i);
auto member_name = to_member_name(type, i);
set_member_name(type.self, constant_index,
sanitize_underscores(join(to_name(type.self), "_", member_name)));
sanitize_underscores(join(to_name(var.self), "_", member_name)));
emit_struct_member(type, member, i, "", layout.start);
set_member_name(type.self, constant_index, backup_name);