diff --git a/source/slang/slang-emit-wgsl.cpp b/source/slang/slang-emit-wgsl.cpp index 5df94f561b..1198720233 100644 --- a/source/slang/slang-emit-wgsl.cpp +++ b/source/slang/slang-emit-wgsl.cpp @@ -135,13 +135,17 @@ void WGSLSourceEmitter::emitParameterGroupImpl( case LayoutResourceKind::SamplerState: case LayoutResourceKind::DescriptorTableSlot: { + auto kinds = LayoutResourceKindFlag::make(LayoutResourceKind::DescriptorTableSlot); m_writer->emit("@binding("); - m_writer->emit(attr->getOffset()); + auto index = getBindingOffsetForKinds( + &containerChain, + kinds); + m_writer->emit(index); m_writer->emit(") "); m_writer->emit("@group("); auto space = getBindingSpaceForKinds( &containerChain, - LayoutResourceKind::DescriptorTableSlot); + kinds); m_writer->emit(space); m_writer->emit(") "); } diff --git a/tests/compute/compile-time-loop.slang b/tests/compute/compile-time-loop.slang index 840ffd1451..9035bde2af 100644 --- a/tests/compute/compile-time-loop.slang +++ b/tests/compute/compile-time-loop.slang @@ -1,6 +1,5 @@ //TEST(compute):COMPARE_RENDER_COMPUTE: -shaderobj //TEST(compute):COMPARE_RENDER_COMPUTE: -mtl -shaderobj -//DISABLE_TEST(compute):COMPARE_COMPUTE:-wgpu //TEST_INPUT: Texture2D(size=4, content = one):name t //TEST_INPUT: Sampler:name s diff --git a/tests/compute/discard-stmt.slang b/tests/compute/discard-stmt.slang index b665a56a8c..fa00c9ec32 100644 --- a/tests/compute/discard-stmt.slang +++ b/tests/compute/discard-stmt.slang @@ -3,7 +3,6 @@ //TEST_INPUT: Texture2D(size=4, content = one):name tex //TEST_INPUT: Sampler:name samp //TEST_INPUT: ubuffer(data=[0 0], stride=4):out,name outputBuffer -//DISABLE_TEST(compute):COMPARE_COMPUTE:-wgpu Texture2D tex; diff --git a/tests/compute/texture-sampling.slang b/tests/compute/texture-sampling.slang index 3e56be5a7b..0e319680a3 100644 --- a/tests/compute/texture-sampling.slang +++ b/tests/compute/texture-sampling.slang @@ -12,7 +12,6 @@ //TEST_INPUT: TextureCube(size=4, content = one, arrayLength=2):name=tCubeArray //TEST_INPUT: Sampler:name=samplerState //TEST_INPUT: ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer -//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -wgpu Texture1D t1D; Texture2D t2D; diff --git a/tests/expected-failure-github.txt b/tests/expected-failure-github.txt index 11dac66fea..e101a384fc 100644 --- a/tests/expected-failure-github.txt +++ b/tests/expected-failure-github.txt @@ -19,17 +19,14 @@ tests/compute/atomics (wgpu) tests/compute/atomics-buffer (wgpu) tests/compute/atomics-groupshared (wgpu) tests/compute/buffer-type-splitting (wgpu) -tests/compute/compile-time-loop.slang.2 syn (wgpu) tests/compute/constant-buffer-memory-packing.slang.6 syn (wgpu) tests/compute/constexpr.slang.2 syn (wgpu) -tests/compute/discard-stmt.slang.2 syn (wgpu) tests/compute/func-cbuffer-param.slang.4 syn (wgpu) tests/compute/interface-shader-param-in-struct.slang.4 syn (wgpu) tests/compute/interface-shader-param.slang.5 syn (wgpu) tests/compute/loop-unroll.slang.7 syn (wgpu) tests/compute/matrix-layout.hlsl.3 syn (wgpu) tests/compute/texture-get-dimensions (wgpu) -tests/compute/texture-sampling (wgpu) tests/compute/texture-simple (wgpu) tests/compute/transcendental-double (wgpu) tests/hlsl-intrinsic/byte-address-buffer/byte-address-struct.slang.5 syn (wgpu)