Repository navigation
win32: Config.GPU on Windows, a flip-model swap chain on the HWND (D4) - #161
Merged
Merged
Conversation
Opt-in, mirroring the Cocoa path (gpuPath, startGPU at Run, presentGPU, resizeGPU, stopGPU, GPU, GPUError, the CPU from then on): the widgets record into a gpu2d list through gpupainter, gpu2d v0.11.0's Direct3D 11 renderer draws it and Present copies it into the back buffer of a flip swap chain on the window. While the swap chain exists WM_PAINT only validates (flip model: GDI content is ignored); on any failure the swap chain and device are released and the frame is drawn by GDI again. The live test runs on windows-latest with WARP: a real window, the back buffer read just before the swap chain presents it equals the CPU path's frame, through a resize; a device that will not start and a refused frame fall back. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Config.GPUon Windows (D4 of go-gfx/gpu2d docs/NATIVE.md), opt-in, mirroring the Cocoa and Linux paths: gpu2d v0.11.0's Direct3D 11 renderer draws the frame and a flip-model swap chain on the window's HWND presents it; any failure falls back to GDI (GPUandGPUErrorsay which happened).Live proof on windows-latest (WARP, no GPU): a real window; the back buffer, read through staging just before the swap chain presents it, equals the CPU path's frame byte for byte at 320 x 200 and after a resize to 504 x 381. A device that will not start and a refused frame both fall back to GDI (tested). Not observed: what a screen showed (no one looks at a hosted runner), any real GPU, native child controls over a swap chain. Recorded in go-gfx/gpu2d#37.
🤖 Generated with Claude Code