Skip to content

feat: expose native canvas present modes - #453

Open
huytdps13400 wants to merge 1 commit into
wcandillon:mainfrom
huytdps13400:fix/444-present-mode
Open

feat: expose native canvas present modes#453
huytdps13400 wants to merge 1 commit into
wcandillon:mainfrom
huytdps13400:fix/444-present-mode

Conversation

@huytdps13400

Copy link
Copy Markdown
Contributor

Summary

  • add a non-standard presentMode field to GPUCanvasConfiguration
  • map fifo, fifo-relaxed, immediate, and mailbox to Dawn's native surface modes
  • keep FIFO as the default and stop SurfaceRegistry from overwriting the caller's selection
  • document platform-dependent support and add TypeScript/native regression coverage

This addresses the present-mode portion of #444. It intentionally does not add DisplayLink/Choreographer ownership or a refresh-rate scheduler, matching the maintainer's scope guidance in the issue.

Unsupported modes remain subject to Dawn's existing surface configuration validation.

Verification

  • yarn workspace react-native-webgpu tsc
  • yarn workspace react-native-webgpu test:node CanvasConfiguration.spec.ts (3 tests passed)
  • yarn workspace react-native-webgpu build
  • yarn workspace docs tsc
  • yarn workspace docs build:docs
  • clang++ -std=c++20 -fsyntax-only ... GPUCanvasContext.cpp
  • cpplint on all changed C++ files

The full local Node-WebGPU suite also ran; all relevant tests passed, with one unrelated existing Node backend failure in GPU.spec.ts where limits.maxBindGroups serializes as undefined.

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.

1 participant