-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vulkan: Fix vkCmdDrawIndexed
crash on Adreno 5XX devices
#92611
base: master
Are you sure you want to change the base?
Conversation
fe8aa34
to
19639e4
Compare
19639e4
to
3c49670
Compare
uniform
crash on Adreno 5XX devicesvkCmdDrawIndexed
crash on Adreno 5XX devices
There are more I do not own an In the next few days I will first check what effects |
In theory it should have a big impact on performance. However since Adreno 5XX isn't a very common device anymore, it is probably better to force disable RENDER_GRAPH_REORDER so that the workaround only has a small impact on the complexity of the code. That being said, some of the original reports were from before the acyclic graph was added, which means that setting CC @DarioSamo You may find this interesting. We discussed this workaround last month, now we have a bit more information |
The good news is the macro doesn't really control much actual compilation and it just controls a boolean that gets passed here. Making a driver workaround might be as simple as just adding a && to that first argument (e.g. a workaround boolean called godot/servers/rendering/rendering_device.cpp Line 5232 in 0e9caa2
I'd keep this as an option if you consider there's absolutely no other solution and there's not enough time to figure out every annoying driver bug in time for 4.3. However, it is very likely the issue will pop up in the future in the mobile renderer just because someone adds an operation that causes it and we'll pretty much be back at the same point. Perhaps by that point, with some luck, we won't care that these devices are broken and don't need to investigate it further. |
This comment was marked as outdated.
This comment was marked as outdated.
3c49670
to
10c4a32
Compare
Is there a function to format the
That sounds better, maybe I'll change it later. (Wow ... this sentence rhymes in English) 🎤 drop I decided on a new private variable that is initialized in the constructor, but I can also change that later. |
Yep, they're defined in vulkan_core.h
You have to assemble the string yourself using
|
10c4a32
to
b87c545
Compare
This comment was marked as outdated.
This comment was marked as outdated.
9f47b1e
to
e0f18b1
Compare
Just a note about performance testing.
|
should only fix #94741 --> comment ShaderTest.zip -> #79760, #82602, #85097, #86037
On Firebase Test Lab, unfortunately 3 Samsung Tab S3 (crash)
F-01L - Fujitsu (OK)
BACKUP, previous solution: I could create a new PR, if the commit should have a chance. |
Co-Authored-By: Clay John <[email protected]> Co-Authored-By: Darío <[email protected]> Co-Authored-By: MatheusMDX <[email protected]>
e0f18b1
to
b0d1493
Compare
Fixes #94741 only (Editor)
for #79760, #82602, #85097, #86037
previous solution
Workaround for the Adreno 5XX family of devices.
An issue occurs when the
vkCmdDrawIndexed
function is called multiple times betweenvkCmdBeginRenderPass
and
vkCmdEndRenderPass
, using a shader that includes auniform
variable (#define MATERIAL_UNIFORMS_USED
enabled). The crash is caused if the subsequent render operations (Nodes
) within the same render pass do not use material shaders with auniform
variable.In other words, if a shader with
uniform
variables is used within a render pass, all following render operations up to the end of the render pass must also use shaders withuniform
variables. Otherwise, this can lead to a crash. This workaround ensures that this does not happen by making sure that shaders withuniform
variables are consistently used betweenvkCmdBeginRenderPass
andvkCmdEndRenderPass
.--> https://github.com/Alex2782/godot/tree/fix_uniform_crash_adreno_5xx_back
Test project: ShaderTest.zip
Tests on Firebase Test Lab
crash if:
r_device.workarounds.force_material_uniform_set = false;
no crash if:
r_device.workarounds.force_material_uniform_set = true;
no_crash_web-build_20240601_3ppp_daisy_sprout-29-en_US-landscape_video.mp4