From 1f401d04e32c6feaeb35243ea5bfc2b14520344b Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 20 Feb 2020 18:24:00 -0500 Subject: 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. --- tools/render-test/cuda/cuda-compute-util.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'tools/render-test/cuda/cuda-compute-util.h') 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 m_buffers; }; - class ResourceBase : public RefObject - { - public: - }; - - static SlangResult createTextureResource(const ShaderInputLayoutEntry& srcEntry, slang::TypeLayoutReflection* typeLayout, RefPtr& outResource); + static SlangResult createTextureResource(const ShaderInputLayoutEntry& srcEntry, slang::TypeLayoutReflection* typeLayout, RefPtr& outResource); static SlangResult execute(const ShaderCompilerUtil::OutputAndLayout& outputAndLayout, const uint32_t dispatchSize[3], Context& outContext); -- cgit v1.2.3