forked from microsoft/DirectXShaderCompiler
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added unused output target warning and moved usage mask fill location (…
…microsoft#3947) * Moved usage mask fill location Added unused output target warning and test * Updated for readability
- Loading branch information
1 parent
7914122
commit 5fba0c3
Showing
2 changed files
with
39 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
tools/clang/test/HLSLFileCheck/hlsl/diagnostics/warnings/unused-output-target-warning.hlsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// RUN: %dxc -T ps_6_0 %s | FileCheck -input=stderr %s | ||
|
||
// CHECK-NOT: warning: Declared output SV_Target0 not fully written in shader. | ||
// CHECK: warning: Declared output SV_Target1 not fully written in shader. | ||
// CHECK: warning: Declared output SV_Target2 not fully written in shader. | ||
// CHECK: warning: Declared output SV_Target3 not fully written in shader. | ||
|
||
void main(out float4 outRT0 : SV_Target0, | ||
out float4 outRT1 : SV_Target1, | ||
out float4 outRT2 : SV_Target2, | ||
out float4 outRT3 : SV_Target3) { | ||
|
||
outRT0 = 0.0f; | ||
outRT1.x = 0.0f; | ||
outRT2.zw = 0.0f; | ||
// outRT3 = 0.0f; | ||
} |