From 7bce066cfc51296a538c7a7d325133d60e352494 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Wed, 26 Feb 2020 21:13:41 +0000 Subject: Support for RWTexture types on CPU and CUDA (#1243) * Added FloatTextureData as a mechanism to enable CPU based Texture writes. * Add [] RWTexture access for CPU. * Fixed rw-texture-simple.slang.expected.txt * WIP: CUDA stdlib has support for [] surface access. * Made IRWTexture class able to take different locations. Doing a Texture2d access on CUDA works. * Fix bug in outputing UniformState - was missing out padding. Support RWTexture with array. Support RWTexture3D. * Use * for locations for read only textures, so only need a ITexture interface. * Fix problem around application of set/get for CUDA on subscript Texture types. --- tools/render-test/cuda/cuda-compute-util.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tools/render-test/cuda/cuda-compute-util.cpp') diff --git a/tools/render-test/cuda/cuda-compute-util.cpp b/tools/render-test/cuda/cuda-compute-util.cpp index b21b22b30..96b4e3b3e 100644 --- a/tools/render-test/cuda/cuda-compute-util.cpp +++ b/tools/render-test/cuda/cuda-compute-util.cpp @@ -928,7 +928,9 @@ static SlangResult _compute(CUcontext context, CUmodule module, const ShaderComp auto access = type->getResourceAccess(); - switch (shape & SLANG_RESOURCE_BASE_SHAPE_MASK) + const auto baseShape = shape & SLANG_RESOURCE_BASE_SHAPE_MASK; + + switch (baseShape) { case SLANG_STRUCTURED_BUFFER: { -- cgit v1.2.3