refactor(renderer): single GL boundary + CI guard (RC5 Batch 5b/6)#46
Merged
Conversation
… CI guard (RC5 Batch 5b/6) Completes the keystone: zero raw gl* outside GLDevice.cpp (135 -> 0), enforced by CI. - GfxDevice: add getString(GfxStringName) + getInt(GfxIntParam) so diagnostics and capability queries go through the device. GLDevice implements them. - RendererBindings: renderer_diagnose, checkGLErrors and renderer_clearStencil now route through the device (getString/getInt/getError/setClearStencil); the OpenGLHeaders include is dropped. - Engine: remove the dead getMaxTextureSize() (no callers) and its GL include — the last gl* call outside the backend. - tools/check-gl-boundary.mjs + a build.yml step: any `gl[A-Z]\w*(` outside GLDevice.cpp fails the build, so bypassing the device is now a build error. Verified: guard passes locally (0 violations); MockGfxDevice harnesses green.
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.
What
Completes RC5's keystone — zero raw
gl*calls outsideGLDevice.cpp(135 → 0), enforced by CI.getString(GfxStringName)+getInt(GfxIntParam)so diagnostics/capability queries go through the device.GLDeviceimplements them.renderer_diagnose,checkGLErrors, andrenderer_clearStencilnow route through the device (getString/getInt/getError/setClearStencil); theOpenGLHeadersinclude is dropped.getMaxTextureSize()(no callers anywhere) and its GL include — the lastgl*call outside the backend.tools/check-gl-boundary.mjs+ abuild.ymlstep fail the build if anygl[A-Z]\w*(appears outsideGLDevice.cpp. Bypassing the device is now a build error, not a silent regression.Verification
Guard passes locally (0 violations); the four
MockGfxDeviceharnesses still compile/pass against the expanded interface. Full web build + the new guard step run in CI.Remaining RC5 polish (follow-up)
Flip the transitional
Shader/Texture/Buffer/VAObind()(currently device-routed) toStateTrackerso all binds dedupe through the one cache; trim RenderContext's now-dead quad/colorShader/textureShader; fixTilemapRenderPlugin's collect-timedirtymutation. These are coherence/cleanup — the GL boundary itself is now complete and guarded.