Remove dead supportsStencil assignment in initializeCapabilities - #9264
Open
willeastcott wants to merge 1 commit into
Open
Remove dead supportsStencil assignment in initializeCapabilities#9264willeastcott wants to merge 1 commit into
willeastcott wants to merge 1 commit into
Conversation
The value queried from getContextAttributes was always discarded: createBackbuffer runs immediately afterwards and overwrites supportsStencil with initOptions.stencil, which is the deliberate convention shared with the WebGPU backend and what all readers rely on. supportsMsaa is kept as it is typed in the d.ts and app-readable. Fixes #9258. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Build size reportThis PR changes the size of the minified bundles.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
initializeCapabilities()setsupportsStencilfromgl.getContextAttributes(), but the constructor callscreateBackbuffer()immediately afterwards, which unconditionally overwrites it withinitOptions.stencil— so the queried value was always discarded. The requested-options convention is deliberate: the WebGPU backend setssupportsStencilthe same way, and all readers (backbuffer, post-effect queue, depth-grab pass) use it to decide render-target stencil allocation. This removes the one dead assignment; no behaviour change.The adjacent
supportsMsaais write-only inside the engine, but it dates to 2016 and ships typed inplaycanvas.d.ts, so it is kept as app-readable surface — that resolves the other half of the issue.Fixes #9258
Verified: lint clean; unit suite at the
mainbaseline (2337 passing).Checklist
🤖 Generated with Claude Code