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

Add loop annotations to ubershaders to prevent loop unrolling. #102480

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

DarioSamo
Copy link
Contributor

Fixes #99964.

Mesa seems to be able to detect the range that the specialization constant for shadow samples can take and decides to unroll the loop on ubershaders, taking much longer time than we want on compiling them as our goal is not their runtime performance but their creation time.

This could likely result in improvements in other drivers depending on whether they respect the DontUnroll hint on the resulting SPIR-V.

@DarioSamo DarioSamo requested a review from a team as a code owner February 6, 2025 12:42
@Calinou Calinou added this to the 4.x milestone Feb 6, 2025
@Calinou Calinou added bug and removed enhancement labels Feb 6, 2025
@Calinou Calinou modified the milestones: 4.x, 4.4 Feb 6, 2025
akien-mga added a commit to akien-mga/godot that referenced this pull request Feb 7, 2025
…shader

Add loop annotations to ubershaders to prevent loop unrolling.
@akien-mga akien-mga merged commit 46aeded into godotengine:master Feb 7, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

Very long shader/pipeline compilation
4 participants