summaryrefslogtreecommitdiff
path: root/tests/compute
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2020-02-18 12:40:14 -0500
committerGitHub <noreply@github.com>2020-02-18 12:40:14 -0500
commite109985375712b449d365450b3d3e39416a171ce (patch)
tree56a2c805368d5afbfa568e514af0704b8ed7346c /tests/compute
parent2c097545eaa324a91a035327abad2e8b4fa60469 (diff)
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.
Diffstat (limited to 'tests/compute')
-rw-r--r--tests/compute/texture-simple.slang5
-rw-r--r--tests/compute/texture-simple.slang.expected.txt8
2 files changed, 8 insertions, 5 deletions
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<float> t1D;
//TEST_INPUT: Texture2D(size=4, content = one):name t2D
Texture2D<float> t2D;
+//TEST_INPUT: Texture3D(size=4, content = one):name t3D
+Texture3D<float> 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