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

Make shader binary alignment handling simpler and more robust #89209

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

RandomShaper
Copy link
Member

@RandomShaper RandomShaper commented Mar 6, 2024

  • Readability of code is improved.
  • Padding bytes containing in the shader binary file guaranteed to be zero (garbage data there is not the end of the world, but makes serialization non-deterministic and manual inspection of the data a bit less convenient).
  • Prevention of read-past-EOF is harmonized across rendering drivers (both now use ERR_FAIL instead of CRASH_COND, which is better since you'd rather have a missing shader than a fully crashing game).

Bonus:
Also simplified the rounding to block size in image size calculations.

@RandomShaper RandomShaper added this to the 4.3 milestone Mar 6, 2024
@RandomShaper RandomShaper requested a review from a team as a code owner March 6, 2024 10:00
@RandomShaper RandomShaper force-pushed the padding_for_dummies branch 3 times, most recently from c6cf852 to ac99ac2 Compare March 6, 2024 10:25
Bonus:
Also simplified the rounding to block size in image size calculations.
@RandomShaper RandomShaper force-pushed the padding_for_dummies branch from ac99ac2 to f77b4d1 Compare March 6, 2024 10:48
@akien-mga akien-mga merged commit ec55028 into godotengine:master Mar 6, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@RandomShaper RandomShaper deleted the padding_for_dummies branch March 6, 2024 12:36
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.

2 participants