diff --git a/spirv_hlsl.cpp b/spirv_hlsl.cpp index c7b0fda2..57f350a8 100644 --- a/spirv_hlsl.cpp +++ b/spirv_hlsl.cpp @@ -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);