Open Nielsbishere opened 3 years ago
Sorry for the delay. We can't do much without the code. Can you send the shader to askhlsl@microsoft.com or to me directly?
Sent
It is possible that this has been fixed recently. Moving to Dormant for now. @Nielsbishere, can you let us know if this is still an issue for you?
@damyanp Oops, apparently Greg sent a reply to my mail about 3 years ago and I didn't reply :( He managed to simplify the repro to the following:
groupshared float thingies[6];
groupshared uint thingCounter;
[numthreads(8, 1, 1)]
void main() {
if(thingies[thingCounter] >= 0.0) {
for(int ix = thingCounter; ix >= 0; --ix) {
if(thingies[ix] <= 0.0) {
thingies[ix] = 3.0;
break;
}
thingies[ix] = 4.0;
}
++thingCounter;
}
}
After a quick check it is still reproducible on the version on shader-playground and when fetching the latest from nuget (1.8.2403.2).
D:\programming\repos\rt_core\builds\external\dxc>"D:\programming\repos\rt_core\builds\external\dxc\build\native\bin\x64\dxc.exe" "C:\Users\n\Downloads\newio.txt" -E main -T cs_6_0
error: validation errors
C:\Users\n\Downloads\newio.txt:9:22: error: TGSM pointers must originate from an unambiguous TGSM global variable.
note: at '%13 = phi float addrspace(3)* [ %8, %7 ], [ %22, %11 ]' in block '#5' of function 'main'.
C:\Users\n\Downloads\newio.txt:15:20: error: TGSM pointers must originate from an unambiguous TGSM global variable.
note: at '%15 = phi float addrspace(3)* [ %22, %19 ], [ %8, %10 ]' in block '#6' of function 'main'.
Validation failed.
@damyanp that verifies that it is an issue right? Or is it to hint that I should link the code like that. Can do that next time.
It was meant more as a convenience for us when we look at this next. But if you want to link like that in the future then that'd be great as well :)
In commit cf044cc960419c5e08cc8a5d7366bc8df760013c (from 23 days ago) I get the following error when enabling optimization;
This happens because I have the WaveIsFirstLane write to a groupshared float2 array. I can't publish the code, but I will send a DM on Discord. When disabling optimization it works, so it seems like some optimization might change the generated DXIL.