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

Mark pipeline compilation of ubershaders as high priority. #102125

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

DarioSamo
Copy link
Contributor

@DarioSamo DarioSamo commented Jan 28, 2025

Sanitizes the behavior seen in #101844.

In projects with high contention of threads in the worker pool, pipeline compilation for ubershaders takes an unnecessary backseat and can cause significant delays in the main thread. This PR marks compilation of any ubershader pipelines as high priority to mitigate this issue.

As indicated to the OP however, the issue itself is a bit more of a content issue, but regardless, the improvement should help in scenarios where it is critical for the game to be responsive compared to other tasks that might've been launched by the project.

We should probably test for no regressions in loading times to be found on existing projects when using no pipeline cache and clean driver caches.

Bugsquad edit: Fixes: #101844

@clayjohn clayjohn modified the milestones: 4.x, 4.5, 4.4 Jan 28, 2025
@clayjohn
Copy link
Member

clayjohn commented Jan 29, 2025

Tested with the MRP from #101844 this reduces the lag from compiling significantly (1750 ms -> 6 ms). For me thats enough to say that this fixes #101844

Compiling at runtime is not ideal and users should expect a pipeline stutter when doing surface compilations. Accordingly, this PR doesn't "fix" the stutter in #101844. However, it does reduce the stutter to an acceptable degree (assuming the user was okay with the stutter in 4.3). Therefore, it is safe to say that this fixes #101844. In other words the bug in #101844 is just that the stutter was worse, this fixes the bug, even though it doesn't eliminate the stutter entirely

@Repiteo Repiteo merged commit 7e97ada into godotengine:master Jan 29, 2025
19 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Jan 29, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants