From 8ee39e08c48a315163fe1850dbb12ca292020d4d Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 18 Feb 2020 14:14:16 -0500 Subject: First pass Texture Array support on CUDA/CPU (#1225) * Add cubemap support. * Add CUDA fence instrinsics. * Added Gather for CUDA. * Use the CUDA driver API as much as possible. * * Support 1D texture on CPU * WIP on 1D texture on CUDA * Added simplified texture test * Fix test. * Improve texture-simple tests. * * Add CPU support for 3d textures * Add support for mip maps to CUDA * Disable warnings in nvrtc * Update CUDA docs * WIP on 3d texture support. * Add support for 3d textures for CPU and CUDA. * CPU and CUDA support for cube maps. * Add CPU support for Texture1DArray. * Support CUDA Layered/Array type in meta library. --- tests/compute/texture-simple.slang | 8 ++++++++ tests/compute/texture-simple.slang.expected.txt | 8 ++++---- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/compute/texture-simple.slang b/tests/compute/texture-simple.slang index e79a26885..3d8fe8619 100644 --- a/tests/compute/texture-simple.slang +++ b/tests/compute/texture-simple.slang @@ -12,6 +12,11 @@ Texture1D t1D; Texture2D t2D; //TEST_INPUT: Texture3D(size=4, content = one):name t3D Texture3D t3D; +//TEST_INPUT: TextureCube(size=4, content = one):name tCube +TextureCube tCube; + +//TEST_INPUT: Texture1D(size=4, content = one, arrayLength=2):name t1DArray +Texture1DArray t1DArray; //TEST_INPUT: Sampler:name samplerState SamplerState samplerState; @@ -29,6 +34,9 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) val += t1D.SampleLevel(samplerState, u, 0); val += t2D.SampleLevel(samplerState, float2(u, u), 0); val += t3D.SampleLevel(samplerState, float3(u, u, u), 0); + val += tCube.SampleLevel(samplerState, normalize(float3(u, 1 - u, u)), 0); + + val += t1DArray.SampleLevel(samplerState, float2(u, 0), 0); outputBuffer[idx] = val; } diff --git a/tests/compute/texture-simple.slang.expected.txt b/tests/compute/texture-simple.slang.expected.txt index e54af3bc8..a10701b2e 100644 --- a/tests/compute/texture-simple.slang.expected.txt +++ b/tests/compute/texture-simple.slang.expected.txt @@ -1,4 +1,4 @@ -40400000 -40400000 -40400000 -40400000 +40A00000 +40A00000 +40A00000 +40A00000 -- cgit v1.2.3