diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2021-01-15 12:10:06 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-15 12:10:06 -0800 |
| commit | 2a5d5b32348c33aac7ca62aa9a4c2bb7cff8e08a (patch) | |
| tree | 01c394d8a3551d3e191e538d27b82472b721f749 /tests/ir | |
| parent | f834f25794cfb746079e92d58c7410b767c57208 (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/ir')
| -rw-r--r-- | tests/ir/string-literal-hash.slang | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ir/string-literal-hash.slang b/tests/ir/string-literal-hash.slang index 3e71b8a32..5aa354d85 100644 --- a/tests/ir/string-literal-hash.slang +++ b/tests/ir/string-literal-hash.slang @@ -1,5 +1,5 @@ -//TEST(compute):COMPARE_COMPUTE: -//TEST(compute):COMPARE_COMPUTE: -vk +//TEST(compute):COMPARE_COMPUTE: -shaderobj +//TEST(compute):COMPARE_COMPUTE: -vk -shaderobj // Note: disabled on CPU target until we can fill // in a more correct/complete `String` and `getStringHash` |
