Skip to content

fix(graphics): default xrCompatible for WebGL and WebGPU paths#8714

Merged
mvaligursky merged 1 commit into
mainfrom
mv-graphics-xr-compatible-defaults
May 11, 2026
Merged

fix(graphics): default xrCompatible for WebGL and WebGPU paths#8714
mvaligursky merged 1 commit into
mainfrom
mv-graphics-xr-compatible-defaults

Conversation

@mvaligursky

Copy link
Copy Markdown
Contributor

Default xrCompatible in GraphicsDevice when navigator.xr is present in a browser, so WebGL context creation and WebGPU requestAdapter both receive the same hint without relying on createGraphicsDevice alone.

Changes:

  • Set initOptions.xrCompatible in GraphicsDevice alongside other constructor defaults.
  • Remove the redundant defaulting block from createGraphicsDevice and document the behavior in its JSDoc.
  • Pass xrCompatible as an explicit boolean into GPURequestAdapterOptions in WebgpuGraphicsDevice.createDevice.

Apply the xrCompatible default in GraphicsDevice so all device constructors
see a consistent value. Drop the duplicate default from createGraphicsDevice
and pass a boolean xrCompatible flag into WebGPU requestAdapter options.
@mvaligursky mvaligursky self-assigned this May 11, 2026
@mvaligursky mvaligursky merged commit 41c5ce0 into main May 11, 2026
8 checks passed
@mvaligursky mvaligursky deleted the mv-graphics-xr-compatible-defaults branch May 11, 2026 11:31
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