summaryrefslogtreecommitdiff
path: root/tools/render-test/cuda/cuda-compute-util.h
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2020-02-20 18:24:00 -0500
committerGitHub <noreply@github.com>2020-02-20 15:24:00 -0800
commit1f401d04e32c6feaeb35243ea5bfc2b14520344b (patch)
tree64394bc2f9fbef3dec3237c69604a0277d019f3c /tools/render-test/cuda/cuda-compute-util.h
parentf9d99fde581c7dfdeb46e87f32da1fed8ac5441c (diff)
WIP on RWTexture types on CUDA/CPU (#1234)
* CUDA support for array of resources. * * Add support for Texture2DArray on CPU * Expand texture-simple.slang to test Texture2DArray * Reorganise CUDAComputeUtil to split out createTextureResource. * Add TextureCubeArray support for CPU/CUDA targets. * Pulled out CUDAResource Renamed derived classes to reflect that change. * Creation of SurfObject type. * Functions to return read/write access for simplifying future additions. * WIP for RWTexture access on CPU/CUDA. * CUsurfObject cannot have mips. * Ability to set number of mips on test data. Preliminary support for CUsurfObj and RWTexture1D on CUDA. CUDA docs improvements. * Fix typo.
Diffstat (limited to 'tools/render-test/cuda/cuda-compute-util.h')
-rw-r--r--tools/render-test/cuda/cuda-compute-util.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/tools/render-test/cuda/cuda-compute-util.h b/tools/render-test/cuda/cuda-compute-util.h
index 58a5bba33..f15c9d4e3 100644
--- a/tools/render-test/cuda/cuda-compute-util.h
+++ b/tools/render-test/cuda/cuda-compute-util.h
@@ -8,10 +8,16 @@
namespace renderer_test {
+// Base class for CUDA resources. This includes textures but also
+// memory allocations
+class CUDAResource : public RefObject
+{
+public:
+};
struct CUDAComputeUtil
{
- // Define here, so we don't need to include the cude header
+ // Define here, so we don't need to include the CUDA header
typedef size_t CUdeviceptr;
/// NOTE! MUST match up to definitions in the CUDA prelude
@@ -40,12 +46,7 @@ struct CUDAComputeUtil
List<BindSet::Value*> m_buffers;
};
- class ResourceBase : public RefObject
- {
- public:
- };
-
- static SlangResult createTextureResource(const ShaderInputLayoutEntry& srcEntry, slang::TypeLayoutReflection* typeLayout, RefPtr<ResourceBase>& outResource);
+ static SlangResult createTextureResource(const ShaderInputLayoutEntry& srcEntry, slang::TypeLayoutReflection* typeLayout, RefPtr<CUDAResource>& outResource);
static SlangResult execute(const ShaderCompilerUtil::OutputAndLayout& outputAndLayout, const uint32_t dispatchSize[3], Context& outContext);