summaryrefslogtreecommitdiffstats
path: root/tests/compute/multi-interface.slang
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2021-01-15 12:10:06 -0800
committerGitHub <noreply@github.com>2021-01-15 12:10:06 -0800
commit2a5d5b32348c33aac7ca62aa9a4c2bb7cff8e08a (patch)
tree01c394d8a3551d3e191e538d27b82472b721f749 /tests/compute/multi-interface.slang
parentf834f25794cfb746079e92d58c7410b767c57208 (diff)
Convert more tests to use shader objects (#1659)
This change converts a large number of our existing tests to use the `ShaderObject` support that was added to the `gfx` layer. In many cases, tests were just updated to pass `-shaderobj` and the result Just Worked. In other cases, a `name` attribute had to be added to one or more `TEST_INPUT` lines. For tests that did not work with shader objects "out of the box," I spent a little bit of time trying to get them work, but fell back to letting those tests run in the older mode. Future changes to the infrastructure will be needed to get those additional tests working in the new path. Along with the changes to test files, the following implementation changes were made to get additional tests working: * Because the shader object mode uses explicit register bindings (from reflection), the hacky logic that was offseting `u` registers for D3D12 based on the number of render targets gets disabled (by another hack). * The "flat" reflection information coming from Slang was not correctly reporting "binding ranges" for things that consumed only uniform data (which would be everything on CUDA/CPU), so it was refactored to properly include binding ranges for anything where the type of the field/variable implied a binding range should be created (even if the `LayoutResourceKind` was `::Uniform`). * A few fixes were made to the CUDA implementation of `Renderer`, in order to get additional tests up and running. Most of these changes had to do with texture bindings, which hadn't really been tested previously. In addition, a few changes were made that were attempts at getting more tests working, but didn't actually help. These could be dropped if requested: * As a quality-of-life feature (not being used) the `object` style of `TEST_INPUT` line is upgraded to support inferring the type to use from the type of the input being set. * Any `object` shader input lines get ignored in non-shader-object mode.
Diffstat (limited to 'tests/compute/multi-interface.slang')
-rw-r--r--tests/compute/multi-interface.slang4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/compute/multi-interface.slang b/tests/compute/multi-interface.slang
index bcb25b6dc..caa21d3f0 100644
--- a/tests/compute/multi-interface.slang
+++ b/tests/compute/multi-interface.slang
@@ -1,5 +1,5 @@
-//TEST(compute):COMPARE_COMPUTE:
-//TEST(compute):COMPARE_COMPUTE:-cpu
+//TEST(compute):COMPARE_COMPUTE: -shaderobj
+//TEST(compute):COMPARE_COMPUTE:-cpu -shaderobj
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
RWStructuredBuffer<float> outputBuffer;