shader-slang / slang

Making it easier to work with shaders
http://shader-slang.com
MIT License
2.18k stars 187 forks source link

slang-test failures with the latest Vulkan SDK 1.3.283.0 #4321

Closed jkwak-work closed 5 months ago

jkwak-work commented 5 months ago

Problem description Following tests are failing with the latest Vulkan SDK, 1.3.283.0, on Windows. This issue is not observed with one previous version of Vulkan SDK, 1.3.280 on Windows.

tests/compute/func-cbuffer-param.slang.2 (vk)
tests/bindings/nested-parameter-block-2.slang.2 (vk)
tests/bugs/parameter-block-load.slang (vk)
tests/cross-compile/rw-buffer.slang
tests/cross-compile/rw-buffer.slang.1
tests/cross-compile/vk-push-constant-set.slang
tests/cross-compile/vk-texture-indexing.slang
tests/cross-compile/vk-texture-indexing.slang.1
tests/glsl/flat-in.slang
tests/glsl/flat-in.slang.1
tests/language-feature/generics/generic-shader-object-cbuffer.slang.2 (vk)
tests/language-feature/generics/generic-shader-object-cbuffer2.slang.2 (vk)
tests/pipeline/rasterization/mesh/dead-loop.slang.1 (vk)
tests/pipeline/rasterization/mesh/simple.slang.1 (vk)
tests/pipeline/rasterization/mesh/task-groupshared.slang.1 (vk)
tests/pipeline/rasterization/mesh/task-simple.slang.1 (vk)
gfx-unit-test-tool/nestedParameterBlockTestVulkan.internal
gfx-unit-test-tool/samplerArrayVulkan.internal

The release date of each version is following,

1.3.283.0 was release 14-May-2024 1.3.280.0 was release 19-Mar-2024

It looks like the issue has been started from May/14/2024. It is unclear if the issue can be reproduced on other platforms at this point.

Triage It looks like duplicated instructions of OpDecorate are emitted for "Annotations". Note that the testing is done with a recent fix for "Block".

9a23a9aa SPIRV Block decoration fixes. (#4303)

Error messages When the issue is reproduced, the following error messages are observed.

"tests/compute/func-cbuffer-param.slang.2"

               ; Annotations
               OpDecorate %Data_std140 Block
               OpDecorate %Data_std140 Block
 error: line 48: ID '22' decorated with Block multiple times is not allowed.

"tests/bindings/nested-parameter-block-2.slang.2 (vk)"

               OpDecorate %scene_material DescriptorSet 1
               OpDecorate %scene_material DescriptorSet 1
error: line 64: ID '38' decorated with DescriptorSet multiple times is not allowed.

tests/bugs/parameter-block-load.slang (vk)

               OpDecorate %gObj DescriptorSet 1
               OpDecorate %gObj DescriptorSet 1
error: line 59: ID '25' decorated with DescriptorSet multiple times is not allowed.

tests/language-feature/generics/generic-shader-object-cbuffer.slang.2 (vk)

               OpDecorate %cparams_gFoo DescriptorSet 1
               OpDecorate %cparams_gFoo DescriptorSet 1
               OpDecorate %cparams_gFoo_buffer0 DescriptorSet 1
               OpDecorate %cparams_gFoo_buffer1 DescriptorSet 1
error: line 79: ID '22' decorated with DescriptorSet multiple times is not allowed.

tests/language-feature/generics/generic-shader-object-cbuffer2.slang.2 (vk)

               OpDecorate %entryPointParams_gFoo DescriptorSet 1
               OpDecorate %entryPointParams_gFoo DescriptorSet 1
               OpDecorate %entryPointParams_gFoo_buffer0 DescriptorSet 1
               OpDecorate %entryPointParams_gFoo_buffer1 DescriptorSet 1
error: line 75: ID '22' decorated with DescriptorSet multiple times is not allowed.

The causes of the following test failures are not clear at this point.

tests/cross-compile/rw-buffer.slang
tests/cross-compile/rw-buffer.slang.1
tests/cross-compile/vk-push-constant-set.slang
tests/cross-compile/vk-texture-indexing.slang
tests/cross-compile/vk-texture-indexing.slang.1
tests/glsl/flat-in.slang
tests/glsl/flat-in.slang.1
tests/pipeline/rasterization/mesh/dead-loop.slang.1 (vk)
tests/pipeline/rasterization/mesh/task-groupshared.slang.1 (vk)
tests/pipeline/rasterization/mesh/task-simple.slang.1 (vk)
tests/pipeline/rasterization/mesh/simple.slang.1 (vk)

Once the issues are resolved, we will need to use the latest VulkanSDK on CI.