From fb50fab76a723f46026474ea5bb0226c297d1fd5 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 8 Jun 2021 08:48:47 -0400 Subject: Fix RWTexture issues on CUDA (#1876) * #include an absolute path didn't work - because paths were taken to always be relative. * Re-enable CUDA RWTexture tests. Re-enable RWTexture1D test Make sure tests have only single mip for RWTexture (required for CUDA) * Fix issue with reading CUDA surface. Re-enable working CUDA RWTextureTest. Enable 1D case. --- tools/gfx/cuda/render-cuda.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools') diff --git a/tools/gfx/cuda/render-cuda.cpp b/tools/gfx/cuda/render-cuda.cpp index 0859524f0..64da1721d 100644 --- a/tools/gfx/cuda/render-cuda.cpp +++ b/tools/gfx/cuda/render-cuda.cpp @@ -1625,6 +1625,9 @@ public: // if (desc.allowedStates.contains(ResourceState::UnorderedAccess)) { + // On CUDA surfaces only support a single MIP map + SLANG_ASSERT(desc.numMipLevels == 1); + SLANG_CUDA_RETURN_ON_FAIL(cuSurfObjectCreate(&tex->m_cudaSurfObj, &resDesc)); } -- cgit v1.2.3