From e109985375712b449d365450b3d3e39416a171ce Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 18 Feb 2020 12:40:14 -0500 Subject: CUDA/CPU resource coverage (#1224) * 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. --- tests/compute/texture-simple.slang | 5 ++++- tests/compute/texture-simple.slang.expected.txt | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/compute/texture-simple.slang b/tests/compute/texture-simple.slang index 040af2784..e79a26885 100644 --- a/tests/compute/texture-simple.slang +++ b/tests/compute/texture-simple.slang @@ -2,7 +2,7 @@ //TEST(compute):COMPARE_COMPUTE_EX:-slang -compute //TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx12 //TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx12 -profile cs_6_0 -use-dxil -// TODO(JS): Doesn't work on vk currently +// TODO(JS): Doesn't work on vk currently, because createTextureView not implemented on vk renderer //DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute //TEST(compute):COMPARE_COMPUTE_EX:-cuda -compute @@ -10,6 +10,8 @@ Texture1D t1D; //TEST_INPUT: Texture2D(size=4, content = one):name t2D Texture2D t2D; +//TEST_INPUT: Texture3D(size=4, content = one):name t3D +Texture3D t3D; //TEST_INPUT: Sampler:name samplerState SamplerState samplerState; @@ -26,6 +28,7 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) float val = 0.0f; val += t1D.SampleLevel(samplerState, u, 0); val += t2D.SampleLevel(samplerState, float2(u, u), 0); + val += t3D.SampleLevel(samplerState, float3(u, u, u), 0); outputBuffer[idx] = val; } diff --git a/tests/compute/texture-simple.slang.expected.txt b/tests/compute/texture-simple.slang.expected.txt index f5cf6fb10..e54af3bc8 100644 --- a/tests/compute/texture-simple.slang.expected.txt +++ b/tests/compute/texture-simple.slang.expected.txt @@ -1,4 +1,4 @@ -40000000 -40000000 -40000000 -40000000 +40400000 +40400000 +40400000 +40400000 -- cgit v1.2.3