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

Allow to skip parallel shader compilation if required #16121

Merged
merged 5 commits into from
Jan 30, 2025

Conversation

RaananW
Copy link
Member

@RaananW RaananW commented Jan 29, 2025

This allows disabling parallel shader compilation for a single effect. Instead of forcing us to change the engine's capabilities using this code:

engine.getCaps().parallelShaderCompile = undefined;

it is possible to set the flag to false. This flag is set on when creating a pipeline context and doesn't make any changes to the engine's capabilities, which allow an effects to be compiled in parallel and synchronously.

@RaananW RaananW marked this pull request as draft January 29, 2025 16:00
@bjsplat
Copy link
Collaborator

bjsplat commented Jan 29, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Jan 29, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Jan 29, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Jan 29, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Jan 29, 2025

@Popov72
Copy link
Contributor

Popov72 commented Jan 29, 2025

Looks good to me, but did you add this capability because you needed it? In my experience, we disable parallel compilation of shaders for testing purposes, but I've never had a use case where I needed to disable it specifically on a per effect/material basis.

@sebavan
Copy link
Member

sebavan commented Jan 29, 2025

Yup this is required for a partner use case.

@RaananW RaananW marked this pull request as ready for review January 30, 2025 10:15
@bjsplat
Copy link
Collaborator

bjsplat commented Jan 30, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Jan 30, 2025

@RaananW
Copy link
Member Author

RaananW commented Jan 30, 2025

Please wait with merging, I am adding a test for this.

@bjsplat
Copy link
Collaborator

bjsplat commented Jan 30, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Jan 30, 2025

@RaananW RaananW merged commit eb15460 into BabylonJS:master Jan 30, 2025
14 checks passed
@RaananW RaananW deleted the allowEffectToCompileSynchronous branch January 30, 2025 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants