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
In commit #48 we implemented checking for race conditions, but these are flagged as errors. I think the old compiler flagged these as warnings. We should keep that same behavior.
compiling the below program gives the error:
error: validation errors
t.hlsl:21:15 Race condition writing to shared memory detected, consider making this write conditional
// RUN: dxc /Tcs_5_1 /DDX12 %s
struct Foo {
int a;
int b;
int c;
int d;
};
Buffer<Foo> inputs : register(t1);
RWBuffer< int > g_Intensities : register(u1);
groupshared Foo sharedData;
#ifdef DX12
[RootSignature("DescriptorTable(UAV(u1, numDescriptors=1), SRV(t1), visibility=SHADER_VISIBILITY_ALL)")]
#endif
[ numthreads( 64, 2, 2 ) ]
void main( uint GI : SV_GroupIndex)
{
sharedData = inputs[GI];
int rtn;
InterlockedAdd(sharedData.d, g_Intensities[GI], rtn);
g_Intensities[GI] = rtn + sharedData.d;
}
The text was updated successfully, but these errors were encountered:
* [spirv] Effcee test fixture and a sample test.
* Added effcee and its dependencies (re2) to the project.
* Introduced FileTest that uses effcee to perform checks.
* Added a sample test (check-entrypoint.hlsl2spv)
* Refactored code so WholeFileTest and FileTest can reuse code.
antiagainst
pushed a commit
to antiagainst/DirectXShaderCompiler
that referenced
this issue
Jun 6, 2017
* [spirv] Effcee test fixture and a sample test.
* Added effcee and its dependencies (re2) to the project.
* Introduced FileTest that uses effcee to perform checks.
* Added a sample test (check-entrypoint.hlsl2spv)
* Refactored code so WholeFileTest and FileTest can reuse code.
In commit #48 we implemented checking for race conditions, but these are flagged as errors. I think the old compiler flagged these as warnings. We should keep that same behavior.
compiling the below program gives the error:
The text was updated successfully, but these errors were encountered: