summaryrefslogtreecommitdiff
path: root/tools/render-test/cuda/cuda-compute-util.h
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2020-01-17 09:15:06 -0500
committerGitHub <noreply@github.com>2020-01-17 09:15:06 -0500
commita8669ade5cb3add8b9ce08e2c3bd96e93190bca8 (patch)
tree63be2fa7829c5bf956a5ce4d52af4e1d4073bf84 /tools/render-test/cuda/cuda-compute-util.h
parent662721ba4ab0e38924701df4c876a86eb8390968 (diff)
Slang -> CUDA kernel runs correctly in test infrastructure (#1167)
* First pass at BindLocation. * Added BindSet::init - for initializing with two input constant buffers. Needs better name, and perhaps should be another class. * Fix handling of constant buffer stripping. Improved initialization. * Trying to generalize BindLocation a little more. Split out CPULikeBindRoot. * More work to make BindLocation et al work with non uniform bindings. * Added parsing to a location. * WIP: Trying to get CPU working with BindLocation. * Describe problem of knowing the type of the reference point in the binding table. * More ideas on getBindings fix. * Remove BindSet as member of BindLocation. * Added BindLocation::Invalid * Made BindLocation able to be key in hash * Use BindLocation for bindings on BindingSet. * Added cuda and nvrtc categories to test infrastructure. Disabled CUDA synthetic tests by default. Fixed such that all tests now produce something in BindLocation style. * Use m_userIndex instead of m_userData on Resource. Move the binding setup out of cpu-compute-util (as no longer CPU specific) * Removed CPUBinding - used BindLocation/BindSet instead. Fixed some bugs around indexOf around uniform indirection. * Renamed BindSet::Resource -> BindSet::Value. * Document BindLocation. * Fixes for Clang/GCC Improve invariant requirement handling when constructing from BindPoints. * WIP: First attempt to run CUDA kernel. * Fix some issues around doing CUDA kernel launch. * Fix issues around use of cudaMemCpy . * Better cuda runtime error checking mechanism. * Fixed bug in passing parameters to cuda kernel launch. Simplified initialisation of context. * WIP: Fix CUDA runtime issues. * Add explicit CUDA synchronize so failures don't appear on implicit ones. * Fix problem emitting non shared variable on CUDA. * Fix some typos in CUDA layout. Use just a pointer for now for CUDA StucturedBuffer. * Arg order for CUDA launch was wrong. * First compute kernel runs on CUDA.
Diffstat (limited to 'tools/render-test/cuda/cuda-compute-util.h')
-rw-r--r--tools/render-test/cuda/cuda-compute-util.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/render-test/cuda/cuda-compute-util.h b/tools/render-test/cuda/cuda-compute-util.h
index 9c7d83b1f..58ca21716 100644
--- a/tools/render-test/cuda/cuda-compute-util.h
+++ b/tools/render-test/cuda/cuda-compute-util.h
@@ -10,7 +10,16 @@ namespace renderer_test {
struct CUDAComputeUtil
{
- static SlangResult execute(const ShaderCompilerUtil::OutputAndLayout& outputAndLayout);
+ struct Context
+ {
+ /// Holds the binding information
+ BindSet m_bindSet;
+ CPULikeBindRoot m_bindRoot;
+ /// Buffers are held in same order as entries in layout (useful for dumping out bindings)
+ List<BindSet::Value*> m_buffers;
+ };
+
+ static SlangResult execute(const ShaderCompilerUtil::OutputAndLayout& outputAndLayout, Context& outContext);
static bool canCreateDevice();
};