Closed
Description
Description
The atomic functions like InterlockedAdd are suddenly not functioning anymore,
complaining that the destination cannot be converted to an int& or long& reference.
This affects both groupshared and RWTexture2D destinations (and probably all others too)
I'm at a loss why this is now suddenly happening when it worked perfectly all the time
test.hlsl:6:2: error: no matching function for call to 'InterlockedAdd'
InterlockedAdd(foo, 1.0);
^~~~~~~~~~~~~~
test.hlsl:6:2: note: candidate function not viable: no known conversion from '__attribute__((address_space(3))) float' to 'unsigned long long &' for 1st argument
InterlockedAdd(foo, 1.0);
^ ~~~
test.hlsl:6:2: note: candidate function not viable: no known conversion from '__attribute__((address_space(3))) float' to 'int &' for 1st argument
InterlockedAdd(foo, 1.0);
^ ~~~
Steps to Reproduce
Test code:
groupshared float foo;
[numthreads(64, 1, 1)]
void main() {
InterlockedAdd(foo, 1.0);
}
dxc -E main -T cs_6_4 test.hlsl
Actual Behavior
The above code should compile successfully
Environment
- DXC version: "libdxcompiler.so: 1.8(dev;4662-416fab6b); libdxil.so: 1.8" (the newest release version from July 2024)
- Host Operating System Linux 6.12.3-arch1-1
Metadata
Metadata
Assignees
Type
Projects
Status
Triaged