From eb4ee724763ae5b9386d0f32e32eef4fc81a49a9 Mon Sep 17 00:00:00 2001 From: Anders Leino Date: Wed, 20 Nov 2024 19:12:29 +0200 Subject: [PATCH] Enable WGPU texture sampling test (#5617) * Limit number of MIP levels on 1d textures to be 1 This avoids running into a WebGPU limitation, and helps to address issue #4943. * Update Slang-RHI to get WGPU fixes * Enable WGPU texture sampling test This helps to address issue #4943. --------- Co-authored-by: Yong He --- external/slang-rhi | 2 +- tests/compute/texture-sampling-no-1d-arrays.slang | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/external/slang-rhi b/external/slang-rhi index 0715210f24..3bb34bb0c2 160000 --- a/external/slang-rhi +++ b/external/slang-rhi @@ -1 +1 @@ -Subproject commit 0715210f240f72ada929e7b12f625285e86e5b22 +Subproject commit 3bb34bb0c2e75e4f75dc4f180071111592b86bab diff --git a/tests/compute/texture-sampling-no-1d-arrays.slang b/tests/compute/texture-sampling-no-1d-arrays.slang index ed982ef706..f95050fcad 100644 --- a/tests/compute/texture-sampling-no-1d-arrays.slang +++ b/tests/compute/texture-sampling-no-1d-arrays.slang @@ -3,7 +3,9 @@ //TEST(compute):COMPARE_RENDER_COMPUTE: -shaderobj -output-using-type -mtl -//TEST_INPUT: Texture1D(size=4, content = one):name=t1D +// WebGPU only supports 1 MIP level for 1d textures +// https://www.w3.org/TR/webgpu/#abstract-opdef-maximum-miplevel-count +//TEST_INPUT: Texture1D(size=4, content = one, mipMaps=1):name=t1D //TEST_INPUT: Texture2D(size=4, content = one):name=t2D //TEST_INPUT: Texture3D(size=4, content = one):name=t3D //TEST_INPUT: TextureCube(size=4, content = one):name=tCube @@ -12,9 +14,6 @@ //TEST_INPUT: Sampler:name=samplerState //TEST_INPUT: ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -// There are still some issues to fix in RHI, see issue #4943 -//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -wgpu - Texture1D t1D; Texture2D t2D; Texture3D t3D;