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
voidstuff(outfloat3 b) {
for(int i = 0; i < 10; i++) {
}
b = i;
}
I think these are legacy HLSL rules, but in any modern programming language with reasonable scoping rules this shouldn't compile. I think we shouldn't expect DXC to accept this code.
The text was updated successfully, but these errors were encountered:
We have to blame the gravity of legacy for this one. This is how HLSL has behaved since its inception. We considered this change for HLSL 2021, but decided it was a more impactful change than we were willing to make at this time. We will likely consider it again for the next HLSL version.
It is a known issue. In fact, a much older bug #584 is already tracking this. As such, I'm closing this as a duplicate.
http://shader-playground.timjones.io/9ec140c1a4f17799769abb8a333f4986
I think these are legacy HLSL rules, but in any modern programming language with reasonable scoping rules this shouldn't compile. I think we shouldn't expect DXC to accept this code.
The text was updated successfully, but these errors were encountered: