Skip to content
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

Fix crash when assigning wrong shader to particle process material #102280

Merged

Conversation

Chaosus
Copy link
Member

@Chaosus Chaosus commented Feb 1, 2025

(this bug does not happen on GLES3 (because it has a correct material checking), so I did not change it).

@Chaosus Chaosus force-pushed the fix_particles_process_shader_crash branch from 2e64ee1 to 53e6d30 Compare February 1, 2025 12:12
@AThousandShips AThousandShips added cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release labels Feb 1, 2025
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, it works as expected.

While I didn't get a crash on my end when following the steps in #102277 (Linux), this resolves error spam that previously occurred when assigning a fog shader to a property expecting a particle shader.

ERROR: Parameter "pipeline" is null.
   at: compute_list_bind_compute_pipeline (servers/rendering/rendering_device.cpp:5060)
ERROR: This compute pipeline requires (0) bytes of push constant data, supplied: (128)
   at: compute_list_set_push_constant (servers/rendering/rendering_device.cpp:5189)
ERROR: No compute pipeline was set before attempting to draw.
   at: compute_list_dispatch_threads (servers/rendering/rendering_device.cpp:5341)
ERROR: Parameter "pipeline" is null.
   at: compute_list_bind_compute_pipeline (servers/rendering/rendering_device.cpp:5060)
ERROR: This compute pipeline requires (0) bytes of push constant data, supplied: (128)
   at: compute_list_set_push_constant (servers/rendering/rendering_device.cpp:5189)
ERROR: No compute pipeline was set before attempting to draw.
   at: compute_list_dispatch_threads (servers/rendering/rendering_device.cpp:5341)
ERROR: Parameter "pipeline" is null.
   at: compute_list_bind_compute_pipeline (servers/rendering/rendering_device.cpp:5060)
ERROR: This compute pipeline requires (0) bytes of push constant data, supplied: (128)
   at: compute_list_set_push_constant (servers/rendering/rendering_device.cpp:5189)
ERROR: No compute pipeline was set before attempting to draw.
   at: compute_list_dispatch_threads (servers/rendering/rendering_device.cpp:5341)

Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine. It seems to use the same logic as the Compatibility renderer version of this function.

@akien-mga akien-mga merged commit d967d8d into godotengine:master Feb 11, 2025
19 checks passed
@akien-mga
Copy link
Member

Thanks!

@Chaosus Chaosus deleted the fix_particles_process_shader_crash branch February 12, 2025 07:13
@akien-mga akien-mga removed the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release crash topic:particles topic:rendering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Creating Shader with Fog built-in causes crash for GPUParticles2D
5 participants