- Notifications
You must be signed in to change notification settings - Fork 805
Closed
Description
Hi, I ran into an issue with templated loads from ByteAddressBuffer using the latest official release (July 2022). Basically the following works as expected:
struct MyStructA { float m_0; }; struct MyStructB { MyStructA m_a; float m_1; float m_2; float m_3; }; ByteAddressBuffer g_bab; RWBuffer<float> result; [numthreads(1,1,1)] void CSMain() { MyStructB b = g_bab.Load<MyStructB>(0); result[0] = b.m_a.m_0; } But if MyStructA is a templated struct it fails to compile:
template<typename T> struct MyStructA { float m_0; }; struct MyStructB { MyStructA<float> m_a; float m_1; float m_2; float m_3; }; ByteAddressBuffer g_bab; RWBuffer<float> result; [numthreads(1,1,1)] void CSMain() { MyStructB b = g_bab.Load<MyStructB>(0); result[0] = b.m_a.m_0; } This will raise the following error: "Explicit template arguments on intrinsic Load must be a single numeric type"
Is this expected and not supported or is this a bug that can be fixed?
Metadata
Metadata
Assignees
Labels
No labels