summaryrefslogtreecommitdiffstats
path: root/tests/compute
diff options
context:
space:
mode:
Diffstat (limited to 'tests/compute')
-rw-r--r--tests/compute/texture-sampling.slang17
-rw-r--r--tests/compute/texture-sampling.slang.expected.txt6
2 files changed, 19 insertions, 4 deletions
diff --git a/tests/compute/texture-sampling.slang b/tests/compute/texture-sampling.slang
index 12bdc80bf..9ef0075bb 100644
--- a/tests/compute/texture-sampling.slang
+++ b/tests/compute/texture-sampling.slang
@@ -1,4 +1,6 @@
-//TEST(compute):COMPARE_RENDER_COMPUTE: -shaderobj
+//TEST(compute):COMPARE_RENDER_COMPUTE: -shaderobj -output-using-type
+//TEST(compute):COMPARE_RENDER_COMPUTE: -shaderobj -output-using-type -vk
+
//TEST_INPUT: Texture1D(size=4, content = one):name=t1D
//TEST_INPUT: Texture2D(size=4, content = one):name=t2D
@@ -8,7 +10,7 @@
//TEST_INPUT: Texture2D(size=4, content = one, arrayLength=2):name=t2dArray
//TEST_INPUT: TextureCube(size=4, content = one, arrayLength=2):name=tCubeArray
//TEST_INPUT: Sampler:name=samplerState
-//TEST_INPUT: ubuffer(data=[0], stride=4):out,name=outputBuffer
+//TEST_INPUT: ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
Texture1D t1D;
Texture2D t2D;
@@ -100,7 +102,16 @@ FragmentStageOutput fragmentMain(FragmentStageInput input)
val += tCubeArray.Sample(samplerState, float4(uv, 0.5, 0.0));
val += tCube.Sample(samplerState, float3(uv, 0.5));
-
+
+ val += t2D.Load(int3(0), int2(0));
+ val += t2dArray.Load(int4(0));
+
+ val += t3D[int3(0)];
+
outputBuffer[0] = val.x;
+
+ int w, h, l, lods;
+ t2dArray.GetDimensions(0, w, h, l, lods);
+ outputBuffer[1] = w + h + l + lods;
return output;
}
diff --git a/tests/compute/texture-sampling.slang.expected.txt b/tests/compute/texture-sampling.slang.expected.txt
index acf037f69..1df249246 100644
--- a/tests/compute/texture-sampling.slang.expected.txt
+++ b/tests/compute/texture-sampling.slang.expected.txt
@@ -1 +1,5 @@
-40E00000 \ No newline at end of file
+type: float
+10.000000
+13.000000
+0.000000
+0.000000