diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp index 326fc702da..a9d5c5e508 100644 --- a/source/slang/slang-emit.cpp +++ b/source/slang/slang-emit.cpp @@ -1200,6 +1200,15 @@ Result linkAndOptimizeIR( byteAddressBufferOptions.translateToStructuredBufferOps = false; byteAddressBufferOptions.lowerBasicTypeOps = true; break; + case CodeGenTarget::WGSL: + case CodeGenTarget::WGSLSPIRV: + case CodeGenTarget::WGSLSPIRVAssembly: + byteAddressBufferOptions.scalarizeVectorLoadStore = true; + byteAddressBufferOptions.treatGetEquivalentStructuredBufferAsGetThis = true; + byteAddressBufferOptions.translateToStructuredBufferOps = false; + byteAddressBufferOptions.lowerBasicTypeOps = true; + byteAddressBufferOptions.useBitCastFromUInt = true; + break; } // We also need to decide whether to translate diff --git a/tests/expected-failure-github.txt b/tests/expected-failure-github.txt index ee96de7f5d..862f3528e2 100644 --- a/tests/expected-failure-github.txt +++ b/tests/expected-failure-github.txt @@ -12,7 +12,6 @@ tests/autodiff/custom-intrinsic.slang.2 syn (wgpu) tests/bugs/buffer-swizzle-store.slang.3 syn (wgpu) tests/compute/interface-shader-param-in-struct.slang.4 syn (wgpu) tests/compute/interface-shader-param.slang.5 syn (wgpu) -tests/hlsl-intrinsic/byte-address-buffer/byte-address-struct.slang.5 syn (wgpu) tests/language-feature/constants/static-const-in-generic-interface.slang.1 syn (wgpu) tests/language-feature/enums/strongly-typed-id.slang.1 syn (wgpu) tests/language-feature/generics/tuple.slang.1 syn (wgpu) diff --git a/tests/hlsl-intrinsic/byte-address-buffer/byte-address-struct.slang b/tests/hlsl-intrinsic/byte-address-buffer/byte-address-struct.slang index 7d0259e49f..7564a8a0ca 100644 --- a/tests/hlsl-intrinsic/byte-address-buffer/byte-address-struct.slang +++ b/tests/hlsl-intrinsic/byte-address-buffer/byte-address-struct.slang @@ -9,8 +9,6 @@ //TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx12 -use-dxil -shaderobj //TEST(compute, vulkan):COMPARE_COMPUTE_EX:-slang -vk -compute -shaderobj //TEST(compute):COMPARE_COMPUTE_EX:-slang -cuda -compute -shaderobj -// WGSL: Signed int initialized using unsigned int #5283 -//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu // Note: This input should really be just a `ByteAddressBuffer`, // so that we can confirm that the functionality works in the