diff options
| author | Tim Foley <tim.foley.is@gmail.com> | 2017-08-15 11:09:03 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-15 11:09:03 -0700 |
| commit | e6abc6821a1bf13a9826e7db74362ce34ccaca2a (patch) | |
| tree | 34d2ad3937c3986dfa7ce8d660cf902c19315581 /tests/diagnostics | |
| parent | 4a9b281c154422cdef03ef629718a458f753093f (diff) | |
| parent | f64bbf712e4e0719604d1e6728eef74539c9ceda (diff) | |
Merge pull request #162 from tfoleyNV/gh-38
Improve diagnostics for overlapping/conflicting bindings
Diffstat (limited to 'tests/diagnostics')
| -rw-r--r-- | tests/diagnostics/gh-38-fs.hlsl | 9 | ||||
| -rw-r--r-- | tests/diagnostics/gh-38-vs.hlsl | 9 | ||||
| -rw-r--r-- | tests/diagnostics/gh-38-vs.hlsl.expected | 9 |
3 files changed, 27 insertions, 0 deletions
diff --git a/tests/diagnostics/gh-38-fs.hlsl b/tests/diagnostics/gh-38-fs.hlsl new file mode 100644 index 000000000..61c8381e4 --- /dev/null +++ b/tests/diagnostics/gh-38-fs.hlsl @@ -0,0 +1,9 @@ +//TEST_IGNORE_FILE: + +// Companion file to `gh-38-fs.hlsl` + +Texture2D overlappingB : register(t0); + +Texture2D conflicting : register(t2); + +float4 main() : SV_Target { return 0; } diff --git a/tests/diagnostics/gh-38-vs.hlsl b/tests/diagnostics/gh-38-vs.hlsl new file mode 100644 index 000000000..7b23efdea --- /dev/null +++ b/tests/diagnostics/gh-38-vs.hlsl @@ -0,0 +1,9 @@ +//TEST:SIMPLE: -target dxbc-assembly -profile vs_5_0 -entry main tests/diagnostics/gh-38-fs.hlsl -profile ps_5_0 -entry main + +// Ensure that we catch errors with overlapping or conflicting parameter bindings. + +Texture2D overlappingA : register(t0); + +Texture2D conflicting : register(t1); + +float4 main() : SV_Position { return 0; } diff --git a/tests/diagnostics/gh-38-vs.hlsl.expected b/tests/diagnostics/gh-38-vs.hlsl.expected new file mode 100644 index 000000000..05f455821 --- /dev/null +++ b/tests/diagnostics/gh-38-vs.hlsl.expected @@ -0,0 +1,9 @@ +result code = -1 +standard error = { +tests/diagnostics/gh-38-fs.hlsl(7): error 39999: conflicting explicit bindings for parameter 'conflicting' +tests/diagnostics/gh-38-vs.hlsl(7): note: see other declaration of 'conflicting' +tests/diagnostics/gh-38-fs.hlsl(5): warning 39999: explicit binding for parameter 'overlappingB' overlaps with parameter 'overlappingA' +tests/diagnostics/gh-38-vs.hlsl(5): note: see declaration of 'overlappingA' +} +standard output = { +} |
