diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2020-02-08 11:19:31 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-08 11:19:31 -0500 |
| commit | 0eed0125fa5e5f425d546efdc2b284b09ffc2785 (patch) | |
| tree | 4ded20c4966f05881a056fad8146e34ac595063e /tools/render-test/shader-input-layout.cpp | |
| parent | 7de90c1e0b42b565a5f46e2f9f7580e1f577d414 (diff) | |
Fixes to make all CPU compute shaders work on CUDA (#1211)
* Launch CUDA test taking into account dispatch size.
* Enable isCPUOnly hack to work on CUDA.
* Rename 'isCPUOnly' hack to 'onlyCPULikeBinding'.
* Add $T special type.
Support SampleLevel on CUDA.
* Fix typo.
Diffstat (limited to 'tools/render-test/shader-input-layout.cpp')
| -rw-r--r-- | tools/render-test/shader-input-layout.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/render-test/shader-input-layout.cpp b/tools/render-test/shader-input-layout.cpp index 40502a9ec..d3c206b58 100644 --- a/tools/render-test/shader-input-layout.cpp +++ b/tools/render-test/shader-input-layout.cpp @@ -56,8 +56,9 @@ namespace renderer_test return -1; } - static bool _isCPUTarget(SlangCompileTarget target) + static bool _isCPULikeBindingTarget(SlangCompileTarget target) { + // CUDA and C++ are 'CPULike' in terms of their binding mechanism switch (target) { case SLANG_C_SOURCE: @@ -65,6 +66,8 @@ namespace renderer_test case SLANG_EXECUTABLE: case SLANG_SHARED_LIBRARY: case SLANG_HOST_CALLABLE: + case SLANG_CUDA_SOURCE: + case SLANG_PTX: { return true; } @@ -74,13 +77,13 @@ namespace renderer_test void ShaderInputLayout::updateForTarget(SlangCompileTarget target) { - if (!_isCPUTarget(target)) + if (!_isCPULikeBindingTarget(target)) { int count = int(entries.getCount()); for (int i = 0; i < count; ++i) { auto& entry = entries[i]; - if (entry.isCPUOnly) + if (entry.onlyCPULikeBinding) { entries.removeAt(i); i--; @@ -462,9 +465,9 @@ namespace renderer_test parser.Read(":"); while (!parser.IsEnd()) { - if (parser.LookAhead("isCPUOnly")) + if (parser.LookAhead("onlyCPULikeBinding")) { - entry.isCPUOnly = true; + entry.onlyCPULikeBinding = true; parser.ReadToken(); } else if (parser.LookAhead("out")) |
