Consider the below shader:
RWByteAddressBuffer g0 : register(u0);
[numthreads(1,1,1)]
void main(uint3 tid : SV_DispatchThreadID)
{
RWByteAddressBuffer buf = g0;
auto fn = [=]() { buf.Store(0, 42); };
fn();
}
Should the compiler reject compiling this shader?
This issue tracks the decision of whether or not to include lambda captures in the HLSL language.
This work is part of the De C++-ification effort.
We need to decide whether or not to include this feature in the language to know how this feature interacts with local resources.
Consider the below shader:
Should the compiler reject compiling this shader?
This issue tracks the decision of whether or not to include lambda captures in the HLSL language.
This work is part of the De C++-ification effort.
We need to decide whether or not to include this feature in the language to know how this feature interacts with local resources.