summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2020-02-18 14:14:16 -0500
committerGitHub <noreply@github.com>2020-02-18 14:14:16 -0500
commit8ee39e08c48a315163fe1850dbb12ca292020d4d (patch)
tree5041064a194849399aa587ac13b46db2088bdb05 /tests
parente109985375712b449d365450b3d3e39416a171ce (diff)
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/compute/texture-simple.slang8
-rw-r--r--tests/compute/texture-simple.slang.expected.txt8
2 files changed, 12 insertions, 4 deletions
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<float> t1D;
Texture2D<float> t2D;
//TEST_INPUT: Texture3D(size=4, content = one):name t3D
Texture3D<float> t3D;
+//TEST_INPUT: TextureCube(size=4, content = one):name tCube
+TextureCube<float> tCube;
+
+//TEST_INPUT: Texture1D(size=4, content = one, arrayLength=2):name t1DArray
+Texture1DArray<float> 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