Hello,
Adreno Vulkan driver crashes if you set a viewport or scissor rectangle, then bind a compute pipeline and issue a dispatch, like so:
vkBeginCommandBuffer(cmdBuf, ...) vkCmdSetViewport(cmdBuf, ...) // or vkCmdSetScissor(cmdBuf, ...) vkCmdBindPipeline(cmdBuf, VK_PIPELINE_BIND_POINT_COMPUTE, ...) // this call will cause a segmentation fault in the Vulkan driver vkCmdDispatch(cmdBuf, ...)
I have read the relevant parts of the Vulkan spec and I couldn't find anything indicating that doing this might be illegal.
This occurred on a Samsung Galaxy S10+ running Android 10. Device details:
- From Vulkan Hardware Capability Viewer:
From AdrenoVK log messages:
I'm reporting this issue here but if anyone knows of a more appropriate channel to report issues such as these, please let me know.
Thanks
Hi,
1) I think you have no access to ViewPort data from compute stage at all(may be I'm wrong), so you needn't set viewport for Compute Stage, my be you will have UB in this case
2) do you have any validation error from Vulkan Validation Layers ?
3) have you checked on another devices ?
4) do you have a minimal test case for reproduce this error?
5)
You can ask on Discord Vulkan Channel, Khronos slack, Khronos Vulkan Forum
Hi,
I also meet the same problem while having a renderpass which setViewPort() before dispatching compute jobs.
I will give you some information that you're asking about:
3) I meet this problem on many adreno devices, such as:
GPU Device Name Firmware
Adreno 650 Black Shark 4 Android 12
Adreno 620 LG Wing Android 10
Adreno 640 Galaxy Note 10 Android 9
Adreno 630 Galaxy S9 Android 10
4) I used Khronos Vulkan sample which was recommend by NDK Guides: Get started
to reproduce my rendering flow.
After adding a renderpass with setViewPort() before dispatching compute job
for Compute N-body simulation function (image is in this link)
My changes are in add_a_renderpass_before_vkCmdDispatch.diff
2) It was crashed on Adreno gpus without any validation's log.
Log:
The callstack:
I tested with other gpus excepting adreno, it works fine.
I hope you could reproduce this case with my information!
Please tell me if you find out any clue and what could we do for handling it, thanks!