summaryrefslogtreecommitdiffstats
path: root/tests/wgsl/texture-gather.slang
diff options
context:
space:
mode:
authorSami Kiminki (NVIDIA) <235843927+skiminki-nv@users.noreply.github.com>2025-10-10 19:39:13 +0300
committerGitHub <noreply@github.com>2025-10-10 16:39:13 +0000
commit5c672cef1f6ac6b5cd6cd71bd47489b7b7331adb (patch)
tree7511c0bca54c2ddda7d1101a795cb19dd588bc04 /tests/wgsl/texture-gather.slang
parentcd50974490b82dd7e0f9ac0dd5ce9c17e390ff1f (diff)
8503 wgsl depth texture (#8645)
Add built-in type aliases for DepthTexture* and unify Sampler*Shadow Add the following type aliases: - DepthTexture1D, DepthTexture1DArray - DepthTexture2D, DepthTexture2DArray - DepthTexture2DMS, DepthTexture2DMSArray - DepthTexture3D - DepthTextureCube, DepthTextureCubeArray These match with the type aliases for non-depth textures. Also, unify the Sampler*Shadow type aliases with DepthTexture* ones. This adds the following: - Sampler2DMSShadow - Sampler2DMSArrayShadow and removes the Sampler3DArrayShadow type alias. As a side-effect, the descriptions of Sampler*ArrayShadow type aliases are fixed ("texture-sampler for shadow" ==> "texture-sampler array for shadow"). Update the slang tests to use the newly introduced type aliases instead of the custom type aliases that use _Texture<> directly. Add DepthTexture testing in hlsl-intrinsic/texture/texture-intrinsics. Do this by extracting the test logic of computeMain() in a separate function and parametrize it for non-depth/depth texture types. This adds basic coverage for the following types: - DepthTexture1D - DepthTexture2D - DepthTexture3D - DepthTextureCube - DepthTexture1DArray - DepthTexture2DArray - DepthTextureCubeArray Issue #6166 Issue #8503
Diffstat (limited to 'tests/wgsl/texture-gather.slang')
-rw-r--r--tests/wgsl/texture-gather.slang60
1 files changed, 4 insertions, 56 deletions
diff --git a/tests/wgsl/texture-gather.slang b/tests/wgsl/texture-gather.slang
index d0772994e..bb5851159 100644
--- a/tests/wgsl/texture-gather.slang
+++ b/tests/wgsl/texture-gather.slang
@@ -68,66 +68,14 @@ TextureCubeArray<uint4> tCubeArray_u32v4;
// depth
-__generic<let sampleCount:int=0, let format:int=0>
-typealias Depth2D = _Texture<
- float,
- __Shape2D,
- 0, // isArray
- 0, // isMS
- sampleCount,
- 0, // access
- 1, // isShadow
- 0, // isCombined
- format
->;
-
-__generic<let sampleCount:int=0, let format:int=0>
-typealias Depth2DArray = _Texture<
- float,
- __Shape2D,
- 1, // isArray
- 0, // isMS
- sampleCount,
- 0, // access
- 1, // isShadow
- 0, // isCombined
- format
->;
-
-__generic<let sampleCount:int=0, let format:int=0>
-typealias DepthCube = _Texture<
- float,
- __ShapeCube,
- 0, // isArray
- 0, // isMS
- sampleCount,
- 0, // access
- 1, // isShadow
- 0, // isCombined
- format
->;
-
-__generic<let sampleCount:int=0, let format:int=0>
-typealias DepthCubeArray = _Texture<
- float,
- __ShapeCube,
- 1, // isArray
- 0, // isMS
- sampleCount,
- 0, // access
- 1, // isShadow
- 0, // isCombined
- format
->;
-
//TEST_INPUT: Texture2D(size=4, content = zero):name d2D
-Depth2D d2D;
+DepthTexture2D d2D;
//TEST_INPUT: TextureCube(size=4, content = zero):name dCube
-DepthCube dCube;
+DepthTextureCube dCube;
//TEST_INPUT: Texture2D(size=4, content = zero, arrayLength=2):name d2DArray
-Depth2DArray d2DArray;
+DepthTexture2DArray d2DArray;
//TEST_INPUT: TextureCube(size=4, content = zero, arrayLength=2):name dCubeArray
-DepthCubeArray dCubeArray;
+DepthTextureCubeArray dCubeArray;
//TEST_INPUT: Sampler:name samplerState
SamplerState samplerState;