Not sure if this is by design or not, but ByteAddressBuffer typed loads currently fail when the type being loaded contains an enum class field, even when said enum class has a specified integer underlying type.
Minimal repro here: http://shader-playground.timjones.io/d722f459ff15eae92df7c752a52b9bdb
enum class EnumClassType : uint
{
ValueA,
ValueB,
ValueC
};
struct TypeWithEnumClassMember
{
EnumClassType enumValue;
uint uintValue;
};
ByteAddressBuffer buffer : register(t0);
[numthreads(1,1,1)]
void CSMain()
{
TypeWithEnumClassMember value = buffer.Load<TypeWithEnumClassMember>(0);
}
This fails with the following error:
error: Explicit template arguments on intrinsic Load must be a single numeric type
TypeWithEnumClassMember value = buffer.Load<TypeWithEnumClassMember>(0);
I was experimenting with using enum class types as strongly typed handles to use with bindless resource indexing (not using SM6.6 descriptor heap indexing).
Not a huge deal, but thought I'd flag it.
Not sure if this is by design or not, but
ByteAddressBuffertyped loads currently fail when the type being loaded contains an enum class field, even when said enum class has a specified integer underlying type.Minimal repro here: http://shader-playground.timjones.io/d722f459ff15eae92df7c752a52b9bdb
This fails with the following error:
I was experimenting with using enum class types as strongly typed handles to use with bindless resource indexing (not using SM6.6 descriptor heap indexing).
Not a huge deal, but thought I'd flag it.