Consider this shader:
RWByteAddressBuffer gBufArray[4] : register(u0);
[numthreads(1,1,1)]
void main(uint3 tid : SV_DispatchThreadID) {
RWByteAddressBuffer buf = gBufArray[5];
buf.Store(tid.x * 4, 42);
}
There is a statically known out of bounds access.
Currently, clang emits a warning.
This issue tracks the team discussing the diagnostic behavior upon detecting statically-known out of bounds access in HLSL.
Should the diagnostic be a warning? an error? A default error-warning? Does it depend on what is being accessed out of bounds?
This will interact and impact local resource specification.
Should the behavior depend on language version?
Consider this shader:
There is a statically known out of bounds access.
Currently, clang emits a warning.
This issue tracks the team discussing the diagnostic behavior upon detecting statically-known out of bounds access in HLSL.
Should the diagnostic be a warning? an error? A default error-warning? Does it depend on what is being accessed out of bounds?
This will interact and impact local resource specification.
Should the behavior depend on language version?