You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Place an enum in a struct and attempt a templated load out of a ByteAddressBuffer, you're presented with the following error. Converting your enum to a uint works though.
error: Explicit template arguments on intrinsic Load must be a single numeric type
MyStruct myStruct = inBuff.Load<MyStruct>(0);
Steps to Reproduce
// The entry point and target profile are needed to compile this example:
// -T cs_6_6 -E CSMain -HV 2021
enum MyEnum : uint
{
Foo,
Bar,
Why
};
struct MyStruct
{
MyEnum myEnum; // << Enum BAD :()
// uint myEnum; // << Uint GOOD :)
};
ByteAddressBuffer inBuff;
RWStructuredBuffer<MyStruct> outBuff;
[numthreads(64,1,1)]
void CSMain(uint3 group_thread_id : SV_GroupThreadID)
{
MyStruct myStruct = inBuff.Load<MyStruct>(0);
outBuff[group_thread_id.x] = myStruct;
}
Actual Behavior
error: Explicit template arguments on intrinsic Load must be a single numeric type
MyStruct myStruct = inBuff.Load<MyStruct>(0);
Environment
DXC version 1.8.2407
Host Operating System Win10
The text was updated successfully, but these errors were encountered:
Description
Place an enum in a struct and attempt a templated load out of a ByteAddressBuffer, you're presented with the following error. Converting your enum to a uint works though.
Steps to Reproduce
Actual Behavior
Environment
The text was updated successfully, but these errors were encountered: