KhronosGroup / KhronosGroup/Vulkan-ValidationLayers
CTS test hangs when run with GPU-AV
- Dominant language
- C++
- Stars
- 1k
- Forks
- 504
- Avg merge
- 11h 35m
- Merged PRs (30d)
- 224
Description
The test `dEQP-VK.synchronization.cross_instance.suballocated.write_fill_buffer_read_ssbo_vertex.buffer_262144_binary_semaphore_fd`
hangs with RADV if gpu-av is enabled in:
```
#1 0x00007fffeaf49fde in nir_calc_dominance_impl (impl=0x55555b8929d0) at ../src/compiler/nir/nir_dominance.c:189
#2 0x00007fffeaff2b0c in nir_metadata_require (impl=0x55555b8929d0, required=3) at ../src/compiler/nir/nir_metadata.c:40
#3 0x00007fffeb0c0479 in nir_lower_reg_intrinsics_to_ssa_impl (impl=0x55555b8929d0) at ../src/compiler/nir/nir_lower_reg_intrinsics_to_ssa.c:134
#4 0x00007fffeb02ec19 in nir_opt_loop (shader=0x55555c75b6a0) at ../src/compiler/nir/nir_opt_loop.c:723
#5 0x00007fffeac29299 in radv_optimize_nir (shader=0x55555c75b6a0, optimize_conservatively=false) at ../src/amd/vulkan/radv_shader.c:192
#6 0x00007fffeac343cb in radv_shader_spirv_to_nir (device=0x55555c6eb070, stage=0x55555c76fde0, options=0x7fffffffb040, is_internal=false) at ../src/amd/vulkan/radv_shader.c:620
#7 0x00007fffeabfd199 in radv_graphics_shaders_compile (device=0x55555c6eb070, cache=0x55555c600a60, stages=0x55555c76fde0, gfx_state=0x7fffffffb460, keep_executable_info=false,
keep_statistic_info=false, is_internal=false, skip_shaders_cache=false, retained_shaders=0x0, noop_fs=false, shaders=0x55555c7657d0, binaries=0x7fffffffb2b0,
gs_copy_shader=0x55555c765840, gs_copy_binary=0x7fffffffb250) at ../src/amd/vulkan/radv_pipeline_graphics.c:2784
#8 0x00007fffeac00563 in radv_graphics_pipeline_compile (pipeline=0x55555c765760, pCreateInfo=0x55555c76efb8, gfx_state=0x7fffffffb3c0, device=0x55555c6eb070, cache=0x55555c600a60,
fast_linking_enabled=false) at ../src/amd/vulkan/radv_pipeline_graphics.c:3206
#9 0x00007fffeac01446 in radv_graphics_pipeline_init (pipeline=0x55555c765760, device=0x55555c6eb070, cache=0x55555c600a60, pCreateInfo=0x55555c76efb8)
at ../src/amd/vulkan/radv_pipeline_graphics.c:3507
#10 0x00007fffeac01780 in radv_graphics_pipeline_create (_device=0x55555c6eb070, _cache=0x55555c600a60, pCreateInfo=0x55555c76efb8, pAllocator=0x0, pPipeline=0x7fffffffc008)
at ../src/amd/vulkan/radv_pipeline_graphics.c:3562
#11 0x00007fffeac01f5a in radv_CreateGraphicsPipelines (_device=0x55555c6eb070, pipelineCache=0x55555c600a60, count=1, pCreateInfos=0x55555c76efb8, pAllocator=0x0,
pPipelines=0x7fffffffc008) at ../src/amd/vulkan/radv_pipeline_graphics.c:3717
#12 0x00007fffe0b72449 in vvl::dispatch::Device::CreateGraphicsPipelines (this=0x55555c3388c0, device=0x55555c6eb070, pipelineCache=0x55555c600a60, createInfoCount=1,
pCreateInfos=0x55555c242fe0, pAllocator=0x0, pPipelines=0x7fffffffc008) at /home/nnn/Projects/Vulkan-ValidationLayers/layers/chassis/dispatch_object_manual.cpp:1086
#13 0x00007fffe0b5fe3d in vulkan_layer_chassis::CreateGraphicsPipelines (device=0x55555c6eb070, pipelineCache=0x380000000038, createInfoCount=1, pCreateInfos=0x7fffffffc2f0,
pAllocator=0x0, pPipelines=0x7fffffffc008) at /home/nnn/Projects/Vulkan-ValidationLayers/layers/chassis/chassis_manual.cpp:546
#14 0x000055555a36f53a in vk::DeviceDriver::createGraphicsPipelines (this=0x55555c33f740, device=0x55555c6eb070, pipelineCache=..., createInfoCount=1, pCreateInfos=0x7fffffffc2f0,
pAllocator=0x0, pPipelines=0x7fffffffc008) at /home/nnn/Projects/vk-gl-cts/external/vulkancts/framework/vulkan/generated/vulkan/vkDeviceDriverImpl.inl:1545
#15 0x000055555a353e16 in vk::createGraphicsPipeline (vk=..., device=0x55555c6eb070, pipelineCache=..., pCreateInfo=0x7fffffffc2f0, pAllocator=0x0)
at /home/nnn/Projects/vk-gl-cts/external/vulkancts/framework/vulkan/vkRefUtil.cpp:36
#16 0x00005555596deb13 in vkt::synchronization::GraphicsPipelineBuilder::build (this=0x7fffffffc5b0, vk=..., device=0x55555c6eb070, pipelineLayout=..., renderPass=...,
pipelineCacheData=..., resourceInterface=...) at /home/nnn/Projects/vk-gl-cts/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationUtil.cpp:369
#17 0x00005555597382d6 in vkt::synchronization::(anonymous namespace)::ShaderAccess::GraphicsPipeline::GraphicsPipeline (this=0x55555b76ddd0, context=...,
stage=vk::VK_SHADER_STAGE_VERTEX_BIT, shaderPrefix="read_ssbo_buffer_262144_", descriptorSetLayout=...)
at /home/nnn/Projects/vk-gl-cts/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationOperation.cpp:1647
#18 0x0000555559739d78 in vkt::synchronization::(anonymous namespace)::ShaderAccess::BufferImplementation::BufferImplementation (this=0x55555b7b8e00, context=..., resource=...,
stage=vk::VK_SHADER_STAGE_VERTEX_BIT, bufferType=vkt::synchronization::(anonymous namespace)::BUFFER_TYPE_STORAGE, shaderPrefix="read_ssbo_buffer_262144_",
mode=vkt::synchronization::(anonymous namespace)::ACCESS_MODE_READ, specializedAccess=false, pipelineType=vkt::synchronization::(anonymous namespace)::PIPELINE_TYPE_GRAPHICS,
dispatchCall=vkt::synchronization::(anonymous namespace)::ShaderAccess::DISPATCH_CALL_DISPATCH)
at /home/nnn/Projects/vk-gl-cts/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationOperation.cpp:1869
```
I could not reproduce with a VVL test, but it has something to do with the ssbos in the vertex shader.
This is the vertex shader:
```
#version 440
layout(location = 0) in vec4 v_in_position;
out gl_PerVertex {
vec4 gl_Position;
};
layout(set = 0, binding = 0, std140) readonly buffer Input {
uvec4 data[16384];
} b_in;
layout(set = 0, binding = 1, std140) writeonly buffer Output {
uvec4 data[16384];
} b_out;
void main (void)
{
gl_Position = v_in_position;
for (int i = 0; i < 16384; ++i) {
b_out.data[i] = b_in.data[i];
}
}
```
Contributor guide
Research direction
Start by running the named dEQP-VK synchronization test with GPU-AV enabled and RADV, then inspect the stack frames in src/compiler/nir/nir_dominance.c, src/compiler/nir/nir_lower_reg_intrinsics_to_ssa.c, and src/amd/vulkan/radv_shader.c. Compare the behavior with the vertex shader and the CTS call sites in vktSynchronizationUtil.cpp and vktSynchronizationOperation.cpp. Done means the test no longer hangs under the reported configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100