SPIRV-Cross/reference/shaders-hlsl-no-opt/asm/comp/aliased-struct-divergent-member-name.asm.comp
Hans-Kristian Arntzen a0c13e4ee8 Do not consider aliased struct types if the master is not a block.
It is possible for a shader to declare two plain struct types which
simply share the same OpName without there being an implicit
value/buffer alias relationship.

For to_member_name(), make sure to use the type alias master when
resolving member names. The member name may be different in a type alias
master if the SPIR-V is being intentionally difficult.
2019-10-07 10:52:16 +02:00

28 lines
327 B
Plaintext

struct T
{
float c;
};
struct T_1
{
float b;
};
static const T _18 = { 40.0f };
RWByteAddressBuffer _7 : register(u0);
RWByteAddressBuffer _10 : register(u1);
void comp_main()
{
T v = _18;
_7.Store(40, asuint(v.c));
_10.Store(480, asuint(v.c));
}
[numthreads(1, 1, 1)]
void main()
{
comp_main();
}