Skip to content

feat(WebGPU): extend the hardware selector API - #3671

Open
daker wants to merge 1 commit into
Kitware:masterfrom
daker:webgpu-hardware-selector
Open

daker wants to merge 1 commit into
Kitware:masterfrom
daker:webgpu-hardware-selector

Conversation

@daker

@daker daker commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Context

Results

Changes

Add setArea to the WebGPU selector. getSourceDataAsync copies only the
color pixels of the area, and the depth copy stays full size.
captureBuffersAsync keeps the data, and then getPixelInformation,
generateSelection and isPropHit read it synchronously. Fix endSelection
and destroy the read back buffers after use.

Move the nearest pixel search and the selection build to
Core/HardwareSelector/PixelSelectionHelper, and the view and renderer
check and preRender call to vtkHardwareSelector.prepareCapture. Both
backends use them.

Move PassTypes to Core/HardwareSelector/Constants, so Core/Mapper does
not import from OpenGL. OpenGL/HardwareSelector/Constants is deprecated.

The Unicam rotate manipulator uses the point picker on WebGPU.

PR Checklist

  • GitHub Actions CI passed: semantic-release commit messages, lint, and tests
  • Test coverage added
  • Documentation and TypeScript definitions are updated to match these changes

@daker
daker force-pushed the webgpu-hardware-selector branch from 1aed509 to 922c52d Compare October 5, 2026 10:28
@daker daker mentioned this pull request Oct 5, 2026
49 of 56 tasks
@daker
daker force-pushed the webgpu-hardware-selector branch from 922c52d to eed9470 Compare October 5, 2026 13:13
@finetjul
finetjul requested a review from sankhesh October 5, 2026 17:02

@sankhesh sankhesh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with minor nit

Comment thread Sources/Rendering/WebGPU/HardwareSelector/index.js Outdated
Add setArea and clearArea to the WebGPU selector. A flag records that
an area was set, so an area of all zeros reads the pixel at the origin.
With no area, captureBuffersAsync reads all the window.
getSourceDataAsync copies only the color pixels of the area, and the
depth copy stays full size. captureBuffersAsync keeps the data, and
then getPixelInformation, generateSelection and isPropHit read it
synchronously. Fix endSelection and destroy the read back buffers
after use.

Move the nearest pixel search and the selection build to
Core/HardwareSelector/PixelSelectionHelper, and the view and renderer
check and preRender call to vtkHardwareSelector.prepareCapture. Both
backends use them.

Move PassTypes to Core/HardwareSelector/Constants, so Core/Mapper does
not import from OpenGL. OpenGL/HardwareSelector/Constants is deprecated.

The Unicam rotate manipulator uses the point picker on WebGPU.
@daker
daker force-pushed the webgpu-hardware-selector branch from eed9470 to 6d186a7 Compare October 15, 2026 08:33

This branch has not been deployed

No deployments
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.

2 participants