godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.75k stars 20.12k forks source link

Strange bug with 3 sprites, where one of them uses gdshader - Android 10 #79760

Open marko995 opened 1 year ago

marko995 commented 1 year ago

Godot version

4.0, 4.1, 4.1.1

System information

Godot v4.1.1.stable (bd6af8e0e) - Fedora Linux 37 (Workstation Edition) - Vulkan (Mobile) - integrated Intel(R) Graphics (ADL GT2) () - 12th Gen Intel(R) Core(TM) i5-12500H (16 Threads)

Issue description

Hi guys, I am porting circle android jump game from kids can code tutorial using vulkan renderer. I am using an old phone Xiaomi mi a2 (Android 10, it support vulkan 1.0 and gles3.2) I found a strange bug, where I am rendering 3 sprites, two sprites use png, third use png with gdshader. Tested situations:

  1. When I hide one of them (nvm which one) everything is working. So, in this case, if there is one sprite with png, and a second with gdshader, everything is working.

  2. When I remove gdshader from the sprite, everything is working.

  3. When I remove gdshader, but add more sprites, everything is working.

I will send github repo to see details.

I did tests on other phones, like moto g5(android 12) and samsung a52(android 12), and on pc as well, and everything is working. It's working in compatibility renderer!

logcat: https://pastebin.com/Z8H5tDUQ

Currently, I am trying to build editor and export a template with debugging symbols to find the line where it's crashing, but I found nothing.

I am open to any suggestions to fix this error because it has very unpredictable behavior.

Steps to reproduce

  1. Create circle scene, add sprite, and add png.
  2. Create jumper scene, add sprite, add png and add gdshader on that sprite:
    
    shader_type canvas_item;

uniform vec4 color : source_color;

void fragment() { COLOR .rgb = color.rgb; }



3. Create main scene, where you add one jumper scene, and two circle scenes.

### Minimal reproduction project

I removed all unnecessary files.
https://github.com/marko995/CircleJumpGodot4
Sauermann commented 1 year ago

Since only a single device-type shows this problem, it might be hardware-related. That would make it difficult to fix this on the Godot-side.

marko995 commented 1 year ago

Since only a single device-type shows this problem, it might be hardware-related. That would make it difficult to fix this on the Godot-side.

Can you help me with debugging? Because same game created in godot 3.5, works in both gles3 and gles2

Sauermann commented 1 year ago

Can you help me with debugging?

@marko995 i don't believe so, because without the specific device I can't replicate the problem.

marko995 commented 1 year ago

yeah, I know, but can you give me guidelines on how to debug the issue? I already tried to build godot editor from source with debugging symbols, but I got same error message :/

Sauermann commented 1 year ago

For questions regarding godot-compilation I suggest to join the contributors chat at https://chat.godotengine.org/ It is difficult to discuss these things here on Github.

bemyak commented 1 year ago

I experience a similar issue on Sony Xperia XZ1 Compact running Android 11. I narrowed down the problem to the uniform feature. If I hardcode the value, the game no longer crashes.

bemyak commented 1 year ago

The issue is present on 4.1.1.stable and on v4.2.dev2.official [da81ca62a]; 3.5.2 works as expected.

Zireael07 commented 1 year ago

3.x is not a Vulkan app, so it could be related to your device's Vulkan drivers, too

Alex2782 commented 9 months ago

Minimal reproduction project: https://github.com/marko995/CircleJumpGodot4 is no longer found

Some bugs have been fixed in the last few weeks, you might be able to test again soon with version 4.2.x or 4.3.

marko995 commented 9 months ago

it still crashes

Alex2782 commented 9 months ago

and v4.2.1?

Akien - 13:22 We just released Godot 4.2.1, as the first maintenance update to the 4.2 feature branch.

This version contains the bug fixes that I meant. If not, please upload your project again.

marko995 commented 9 months ago

still crashing..kk

marko995 commented 9 months ago

@Alex2782 same link https://github.com/marko995/CircleJumpGodot4

marko995 commented 9 months ago

@Alex2782 is there any tutorial on how to get better error logs from vulkan driver?

Calinou commented 9 months ago

@Alex2782 is there any tutorial on how to get better error logs from vulkan driver?

https://docs.godotengine.org/en/latest/contributing/development/debugging/vulkan/vulkan_validation_layers.html

It doesn't mention specific instructions for enabling Vulkan validation layers on Android. I can find this from a quick search: https://developer.android.com/ndk/guides/graphics/validation-layer

Alex2782 commented 9 months ago

@Alex2782 same link https://github.com/marko995/CircleJumpGodot4

ok thanks, 2 days ago Github showed 404 error (not found), today it works again

marko995 commented 9 months ago

@Alex2782 crash happens because of this line: uniform vec4 color : source_color;

when I don't use it, works fine

Alex2782 commented 9 months ago

logcat: https://pastebin.com/Z8H5tDUQ AudioTrack org.godotengine.game V processAudioBuffer(351): obtainBuffer(882) returned 1772 = 882 + 890 err 0

but in the project I can't find any audio files that are played


You could also try starting an empty 2D project (maybe with only 1 text label, no gdshader) via remote debugging and log everything without filters image

adb logcat > logs.txt (press Ctrl + C after crash, redirected all logs from the last 2 hours to one file)

Alex2782 commented 9 months ago

@Alex2782 crash happens because of this line: uniform vec4 color : source_color;

when I don't use it, works fine

ok on my Samsung Tab S7 no problems (newer Vulkan version)

marko995 commented 9 months ago

problem happens when I use 3 sprites, and one of them use uniform vec4 color : source_color;

if I use 2 sprites, everything works.

Probably the problem is in vulkan driver, because when I use the newer phone, motorola g5, works fine.

Alex2782 commented 9 months ago

strange, and if only COLOR is not initialized, it also crashes?

void fragment() {
    COLOR.rgb = color.rgb;
}
marko995 commented 9 months ago

@Alex2782 you didn't understand me :D if I don't use color, and use hardcoded color, it is working

Alex2782 commented 9 months ago

I just wanted to narrow down the error. I understood the rest.😄

problem happens when I use 3 sprites, and one of them use uniform vec4 color : source_color;

without COLOR.rgb = color.rgb;, crash or not?

shader_type canvas_item;
uniform vec4 color : source_color;

void fragment() {

}
marko995 commented 9 months ago

doesn't work:

shader_type canvas_item;

uniform vec4 color : source_color;

void fragment() {
    COLOR .rgb = color.rgb;
}

it works:

shader_type canvas_item;

void fragment() {
    COLOR.rgb = vec3(1.0, 0.0, 0.0);
}
marko995 commented 9 months ago

the idea is to manipulate colors through material parameter, which is not working.

marko995 commented 9 months ago

@Alex2782 is it possible to use source_color without uniform ?

marko995 commented 9 months ago

@Alex2782 also this doesn't work

shader_type canvas_item;

uniform vec3 color : source_color;

void fragment() {

}
marko995 commented 9 months ago

yup, problem is in word uniform :/ this doesn't work as well:

shader_type canvas_item;

uniform vec4 color;

void fragment() {

}
Alex2782 commented 9 months ago

Github: uniform + android 14 issues open.

I still have an old Samsung tablet with Android 8, if I find time I'll try to test it with Godot.

marko995 commented 9 months ago

@Alex2782 Ok, but I think this won't be fixed soon :/

Alex2782 commented 9 months ago

@Alex2782 is it possible to use source_color without uniform ?

Unfortunately, I don't know much about shaders at all, after a short research I couldn't find any examples without "uniform".


There are also compute shaders, where different uniform types can be specified via GdScript. Maybe it would also be interesting to catch the errors.

https://docs.godotengine.org/en/stable/tutorials/shaders/compute_shaders.html

# Create a uniform to assign the buffer to the rendering device
var uniform := RDUniform.new()
uniform.uniform_type = RenderingDevice.UNIFORM_TYPE_STORAGE_BUFFER

https://docs.godotengine.org/en/stable/classes/class_renderingdevice.html#enum-renderingdevice-uniformtype

Alex2782 commented 8 months ago

Samsung Galaxy Tab A (2016) SM-T580, Android 8, armeabi-v7a: no problems with Vulkan and uniform 😃


Vulkan API 1.0.61 - Forward Mobile - Using Vulkan Device #0: ARM - Mali-T830

https://vulkan.gpuinfo.org/ The tablet is so old that there is no information about it, I can't install the gpuinfo app either (arm-v8)


This comparison could perhaps be useful: Samsung Galaxy Tab A (2016, Android 10, arm-v8) vs. Xiaomi Mi A2 Lite https://vulkan.gpuinfo.org/compare.php?reports=10941,9320#extensions

For example, Samsung has these 2 'extensions'. They are also queried by Godot (optional). If I find more time again, I'll try to experiment with the sources.

marko995 commented 8 months ago

@Alex2782 If you need device to test it, ping me

Alex2782 commented 8 months ago

ShaderTest.zip

@marko995: if you find the time at some point, please try it out. Are the crashes reproducible? I need a project where I can debug the functions at the push of a button.

Bildschirmfoto 2023-12-29 um 19 42 44

On my Samsung Galaxy Tab A (2016) SM-T580, there are no problems with the color shaders, but with the compute shader (output = input).

Bildschirmfoto 2023-12-29 um 19 40 16

marko995 commented 8 months ago

@Alex2782 when i press compute once it works but if i press 25 times the app crashes. logcat: https://pastebin.com/fYeKr2c9

But when I pressed Add ShaderMaterial first (or after compute), app crashed instantly. logcat: https://pastebin.com/SFZmHzKT

marko995 commented 8 months ago

@Alex2782 any luck?

Alex2782 commented 8 months ago

I will release a debug APK for it soon, last I checked OpenGL ES3. I found some debug settings in the Godot sources, I still have to try if this is also possible with Vulkan.

Alex2782 commented 8 months ago

Firebase - Test Lab has also Mi A2 Lite: full logs (search for 22258 pid)

I have tried with Validation Layer, but I can't see any new useful information yet.

01-06 19:23:09.259: I/godot(22258): _on_timer_timeout
......
01-06 19:23:09.532: I/godot(22258): Shader loaded in 273 ms
......
01-06 19:23:09.587: F/libc(22258): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 22746 (VkThread), pid 22258 (com.godot.game)
......
01-06 19:23:09.833: F/DEBUG(23682): ABI: 'arm64'
01-06 19:23:09.835: F/DEBUG(23682): Timestamp: 2024-01-06 19:23:09-0800
01-06 19:23:09.835: F/DEBUG(23682): pid: 22258, tid: 22746, name: VkThread  >>> com.godot.game <<<
01-06 19:23:09.835: F/DEBUG(23682): uid: 10160
01-06 19:23:09.835: F/DEBUG(23682): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
01-06 19:23:09.835: F/DEBUG(23682): Cause: null pointer dereference
01-06 19:23:09.835: F/DEBUG(23682):     x0  0000000000000000  x1  0000000000000003  x2  0000007810966e80  x3  000000780f7b3058
01-06 19:23:09.836: F/DEBUG(23682):     x4  000000783cdb2000  x5  0000000000000000  x6  0000000000000000  x7  0000000000000001
01-06 19:23:09.836: F/DEBUG(23682):     x8  0000000000000002  x9  0000000000000001  x10 0000000000000001  x11 0000000000000004
01-06 19:23:09.836: F/DEBUG(23682):     x12 00000078156bbef0  x13 0000000000000000  x14 0000000000000000  x15 0000000000000002
01-06 19:23:09.836: F/DEBUG(23682):     x16 000000783d62eef8  x17 00000078156db800  x18 00000078204d2000  x19 00000078156db800
01-06 19:23:09.836: F/DEBUG(23682):     x20 0000007810966e80  x21 000000789b174d10  x22 0000000000000000  x23 000000789b174a10
01-06 19:23:09.836: F/DEBUG(23682):     x24 0000000000000001  x25 000000780f03e100  x26 0000000000000028  x27 0000007843eb8580
01-06 19:23:09.836: F/DEBUG(23682):     x28 0000000000000000  x29 000000789b177b70
01-06 19:23:09.836: F/DEBUG(23682):     sp  000000789b1740f0  lr  000000789b174a10  pc  00000078195d0004
01-06 19:23:09.829: W/Studio:PollNet(21316): type=1400 audit(0.0:4593): avc: denied { read } for name="stats" dev="proc" ino=4026532884 scontext=u:r:shell:s0 tcontext=u:object_r:proc_qtaguid_stat:s0 tclass=file permissive=0
01-06 19:23:09.844: F/DEBUG(23682): backtrace:
01-06 19:23:09.844: F/DEBUG(23682):       #00 pc 00000000000f5004  /vendor/lib64/hw/vulkan.msm8953.so (BuildId: 4059f276877a7a61cc16b085624608be)
01-06 19:23:09.844: F/DEBUG(23682):       #01 pc 00000000000a0468  /vendor/lib64/hw/vulkan.msm8953.so (qglinternal::vkCmdDrawIndexed(VkCommandBuffer_T*, unsigned int, unsigned int, unsigned int, int, unsigned int)+232) (BuildId: 4059f276877a7a61cc16b085624608be)
01-06 19:23:09.844: F/DEBUG(23682):       #02 pc 00000000019fd5e0  /data/app/com.godot.game-KJNnqiAlqU7OqrGjjechwQ==/lib/arm64/libVkLayer_khronos_validation.so (DispatchCmdDrawIndexed(VkCommandBuffer_T*, unsigned int, unsigned int, unsigned int, int, unsigned int)+156) (BuildId: 74b81aeab8816fc078cb99b8199b6b561a30c09b)
01-06 19:23:09.844: F/DEBUG(23682):       #03 pc 00000000017e8e94  /data/app/com.godot.game-KJNnqiAlqU7OqrGjjechwQ==/lib/arm64/libVkLayer_khronos_validation.so (vulkan_layer_chassis::CmdDrawIndexed(VkCommandBuffer_T*, unsigned int, unsigned int, unsigned int, int, unsigned int)+452) (BuildId: 74b81aeab8816fc078cb99b8199b6b561a30c09b)
Alex2782 commented 8 months ago

Next week I'll try to add debug_callback. I can test 5 x per day for free at Firebase on real devices, there are also a lot of virtual ones, which are probably unsuitable because of software renderer.

hsandt commented 5 months ago

I'm looking for a shader-related crash and I'm not sure if this issue is about it, because nor the title nor the description explicitly mention a crash.

The title says "strange bug". Then again in the description line:

I found a strange bug, where I am rendering 3 sprites, two sprites use png, third use png with gdshader.

The first and only mention of crash is when trying to fix it:

Currently, I am trying to build editor and export a template with debugging symbols to find the line where it's crashing, but I found nothing.

and in the label: crash

I think it would be clearer to add the words crash in both the title and bug description instead of "strange bug" because it's not clear what the issue is without running the MRP (esp. if it only happens on a certain device).

Anyway, I'll be following the other shader-related crash issues, so this is just to help other users find things more easily.

Alex2782 commented 5 months ago

@hsandt: uniform crash on some android devices (Xiaomi Redmi 7A, Google Pixel 2 XL)

85097

82602

86037


I've had this on my TODO list for a while, but haven't found enough time to check it out again. I would have to try it on Firebase Test Lab because I don't have the hardware to reproduce it.

Alex2782 commented 5 months ago

maybe only Adreno 5xx affected by the uniform crash

Test on Firebase (Mi A2 Lite) ----------------- After a few seconds, a shader is dynamically attached to CanvasItem, after which the app crashes. https://github.com/godotengine/godot/assets/41921395/b515c0e9-5ee7-4bf2-9234-de00cb5fc1af
Ayush-Agarwal123 commented 4 months ago

Is there any update on this crash? I am facing it on Godot version 4.2.1 also which is the latest stable version Device: OnePlus 3

Alex2782 commented 4 months ago
Alex2782 commented 4 months ago

Adreno Validation Layer VK_LAYER_ADRENO_debug (on my Samsung Tab S7 - Adreno 6xx):

RuleBundleDescriptorSets: Developers should avoid making multiple API calls to bind descriptor sets for any draw 
operation in a command buffer. Instead, descriptor sets should be bundled into a single API call to bind them. 
In primary command buffer [0xb400007059be6040] there is(are) [1] violation(s) to this rule for draw operations. 
The first violation occurs in render pass [0xb400007046d17e00] and subpass [0] when [3] calls to bind descriptor 
sets happen before the draw command [vkCmdDrawIndexed(0xb400007059be6040, 6, 1, 0, 0, 0)].

I will try it out soon, reduce the vkCmdBindDescriptorSets calls before vkCmdDrawIndexed. @clayjohn: Or do you know if there are good reasons to pass only one VkDescriptorSet?

// descriptorSetCount = 1
vkCmdBindDescriptorSets(..., ..., ..., p_set_index, 1, &usi->vk_descriptor_set, 0, nullptr);

In the logs I see that after GdShader assignment VkDescriptorSet is always set for 'Instancing' (SET2), even for nodes without GdShader.

Would it work without it? ``` vkCmdBindDescriptorSets: p_set_index: 0 vkCmdBindDescriptorSets: p_set_index: 2 vkCmdBindDescriptorSets: p_set_index: 3 vkCmdDrawIndexed: 6 1 0 0 0 vkCmdBindDescriptorSets: p_set_index: 3 vkCmdDrawIndexed: 6 1 0 0 0 vkCmdBindDescriptorSets: p_set_index: 3 vkCmdDrawIndexed: 9 1 0 0 0 vkCmdBindDescriptorSets: p_set_index: 0 vkCmdDrawIndexed: 6 1 0 0 0 set_shader_parameter Shader loaded in 283 ms vkCmdBindDescriptorSets: p_set_index: 0 vkCmdBindDescriptorSets: p_set_index: 2 vkCmdBindDescriptorSets: p_set_index: 3 vkCmdDrawIndexed: 6 1 0 0 0 vkCmdBindDescriptorSets: p_set_index: 1 <--- GdShader Uniform vkCmdBindDescriptorSets: p_set_index: 2 <--- ??? vkCmdBindDescriptorSets: p_set_index: 3 vkCmdDrawIndexed: 6 1 0 0 0 vkCmdBindDescriptorSets: p_set_index: 2 <--- ??? vkCmdBindDescriptorSets: p_set_index: 3 vkCmdDrawIndexed: 9 1 0 0 0 00-00 00:00:00.000 0 0 ? (none) : --------- beginning of crash 05-07 08:55:08.271 22821 23179 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 ```
More details / logs ------------------------ ### Canvas uniforms: - SET0: Light, shadow, etc. - SET1: Is reserved for the material - SET2: Instancing and Skeleton - SET3: Texture
GdShader / GdScript ```glsl shader_type canvas_item; uniform vec4 color; void fragment() { COLOR = color; } ``` **Note:** `GDScript` is not necessary to reproduce the crash. If `GdShader` is assigned via Editor, the app crashes immediately on startup. ```gdscript var mat := ShaderMaterial.new() var start_time = Time.get_ticks_msec() mat.shader = load("res://global_color_canvas_item.gdshader") print("set_shader_parameter") mat.set_shader_parameter("color", Vector4(1.0, 0.5, 0.5, 0.5)) var time = Time.get_ticks_msec() - start_time print("Shader loaded in %s ms" % time) spriteIcon.material = mat ```
### No crash on Adreno 5xx, with only 1 node (Mi A2 Lite - Firebase Test Lab) ``` 05-07 08:07:10.004 20316 20586 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 0 05-07 08:07:10.006 20316 20586 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 2 05-07 08:07:10.007 20316 20586 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 3 05-07 08:07:10.018 20316 20586 I godot : RenderingDeviceDriverVulkan::command_render_draw_indexed -> vkCmdDrawIndexed: 6 1 0 0 0 05-07 08:07:10.051 20316 20586 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 0 05-07 08:07:10.051 20316 20586 I godot : RenderingDeviceDriverVulkan::command_render_draw_indexed -> vkCmdDrawIndexed: 6 1 0 0 0 05-07 08:07:10.759 20316 20586 I godot : set_shader_parameter 05-07 08:07:10.766 20316 20586 I godot : Shader loaded in 557 ms 05-07 08:07:11.002 20316 20586 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 0 05-07 08:07:11.002 20316 20586 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 1 05-07 08:07:11.002 20316 20586 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 2 05-07 08:07:11.002 20316 20586 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 3 05-07 08:07:11.002 20316 20586 I godot : RenderingDeviceDriverVulkan::command_render_draw_indexed -> vkCmdDrawIndexed: 6 1 0 0 0 05-07 08:07:11.003 20316 20586 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 0 05-07 08:07:11.003 20316 20586 I godot : RenderingDeviceDriverVulkan::command_render_draw_indexed -> vkCmdDrawIndexed: 6 1 0 0 0 ``` ### Crash (Fatal signal 11) on Adreno 5xx, with 3 nodes (Mi A2 Lite - Firebase Test Lab) ![Bildschirmfoto 2024-05-07 um 19 45 43](https://github.com/godotengine/godot/assets/41921395/62a429c7-c2d7-49ff-a3d2-89d8fa79733b) ``` 05-07 08:55:07.120 22821 23179 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 0 05-07 08:55:07.120 22821 23179 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 2 05-07 08:55:07.121 22821 23179 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 3 05-07 08:55:07.121 22821 23179 I godot : RenderingDeviceDriverVulkan::command_render_draw_indexed -> vkCmdDrawIndexed: 6 1 0 0 0 05-07 08:55:07.121 22821 23179 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 3 05-07 08:55:07.121 22821 23179 I godot : RenderingDeviceDriverVulkan::command_render_draw_indexed -> vkCmdDrawIndexed: 6 1 0 0 0 05-07 08:55:07.121 22821 23179 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 3 05-07 08:55:07.122 22821 23179 I godot : RenderingDeviceDriverVulkan::command_render_draw_indexed -> vkCmdDrawIndexed: 9 1 0 0 0 05-07 08:55:07.122 22821 23179 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 0 05-07 08:55:07.123 22821 23179 I godot : RenderingDeviceDriverVulkan::command_render_draw_indexed -> vkCmdDrawIndexed: 6 1 0 0 0 05-07 08:55:08.202 22821 23179 I godot : set_shader_parameter 05-07 08:55:08.203 22821 23179 I godot : Shader loaded in 283 ms 05-07 08:55:08.270 22821 23179 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 0 05-07 08:55:08.270 22821 23179 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 2 05-07 08:55:08.270 22821 23179 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 3 05-07 08:55:08.270 22821 23179 I godot : RenderingDeviceDriverVulkan::command_render_draw_indexed -> vkCmdDrawIndexed: 6 1 0 0 0 05-07 08:55:08.270 22821 23179 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 1 05-07 08:55:08.270 22821 23179 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 2 05-07 08:55:08.270 22821 23179 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 3 05-07 08:55:08.270 22821 23179 I godot : RenderingDeviceDriverVulkan::command_render_draw_indexed -> vkCmdDrawIndexed: 6 1 0 0 0 05-07 08:55:08.270 22821 23179 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 2 05-07 08:55:08.270 22821 23179 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 3 05-07 08:55:08.270 22821 23179 I godot : RenderingDeviceDriverVulkan::command_render_draw_indexed -> vkCmdDrawIndexed: 9 1 0 0 0 00-00 00:00:00.000 0 0 ? (none) : --------- beginning of crash 05-07 08:55:08.271 22821 23179 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 23179 (VkThread), pid 22821 (lex.shader_test) ``` ### No crash on Adreno 6xx (Samsung Tab S7) ``` 05-07 18:24:36.987 29259 29298 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 0 05-07 18:24:36.987 29259 29298 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 2 05-07 18:24:36.987 29259 29298 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 3 05-07 18:24:36.987 29259 29298 I godot : RenderingDeviceDriverVulkan::command_render_draw_indexed -> vkCmdDrawIndexed: 6 1 0 0 0 05-07 18:24:36.987 29259 29298 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 3 05-07 18:24:36.987 29259 29298 I godot : RenderingDeviceDriverVulkan::command_render_draw_indexed -> vkCmdDrawIndexed: 6 1 0 0 0 05-07 18:24:36.987 29259 29298 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 3 05-07 18:24:36.987 29259 29298 I godot : RenderingDeviceDriverVulkan::command_render_draw_indexed -> vkCmdDrawIndexed: 9 1 0 0 0 05-07 18:24:36.987 29259 29298 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 0 05-07 18:24:36.988 29259 29298 I godot : RenderingDeviceDriverVulkan::command_render_draw_indexed -> vkCmdDrawIndexed: 6 1 0 0 0 05-07 18:24:37.223 29259 29298 I godot : set_shader_parameter 05-07 18:24:37.223 29259 29298 I godot : Shader loaded in 36 ms 05-07 18:24:37.238 29259 29298 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 0 05-07 18:24:37.238 29259 29298 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 2 05-07 18:24:37.238 29259 29298 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 3 05-07 18:24:37.238 29259 29298 I godot : RenderingDeviceDriverVulkan::command_render_draw_indexed -> vkCmdDrawIndexed: 6 1 0 0 0 05-07 18:24:37.238 29259 29298 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 1 05-07 18:24:37.238 29259 29298 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 2 05-07 18:24:37.238 29259 29298 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 3 05-07 18:24:37.238 29259 29298 I godot : RenderingDeviceDriverVulkan::command_render_draw_indexed -> vkCmdDrawIndexed: 6 1 0 0 0 05-07 18:24:37.238 29259 29298 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 2 05-07 18:24:37.238 29259 29298 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 3 05-07 18:24:37.239 29259 29298 I godot : RenderingDeviceDriverVulkan::command_render_draw_indexed -> vkCmdDrawIndexed: 9 1 0 0 0 05-07 18:24:37.239 29259 29298 I godot : RenderingDeviceDriverVulkan::command_bind_render_uniform_set -> vkCmdBindDescriptorSets: p_set_index: 0 05-07 18:24:37.239 29259 29298 I godot : RenderingDeviceDriverVulkan::command_render_draw_indexed -> vkCmdDrawIndexed: 6 1 0 0 0 ``` ![Bildschirmfoto 2024-05-07 um 19 45 53](https://github.com/godotengine/godot/assets/41921395/1c19d2a0-8108-4b89-82c1-37d05ffd5242)
Alex2782 commented 3 months ago

no crash if all nodes have a uniform shader.

Video: Firebase Test Lab https://github.com/godotengine/godot/assets/41921395/8eafa7db-0268-4555-9cf0-a1ff734abfad

It looks to me as if the commands have to be executed in the correct order (on Adreno 5xx): RenderingDeviceGraph::_run_draw_list_command