Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TGSM race conditions are flagged as errors #65

Closed
dmpots opened this issue Feb 3, 2017 · 1 comment
Closed

TGSM race conditions are flagged as errors #65

dmpots opened this issue Feb 3, 2017 · 1 comment
Assignees

Comments

@dmpots
Copy link
Member

dmpots commented Feb 3, 2017

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;
}

@python3kgae
Copy link
Contributor

The check is disabled for now.

ehsannas added a commit to ehsannas/DirectXShaderCompiler that referenced this issue May 9, 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.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants