Skip to content

fix(WebGPU): keep finite inputs in range on half-float uploads - #3750

Open
PaulHax wants to merge 1 commit into
webgpu-filterable-image-scalarsfrom
webgpu-finite-uint16-sampling
Open

PaulHax wants to merge 1 commit into
webgpu-filterable-image-scalarsfrom
webgpu-finite-uint16-sampling

Conversation

@PaulHax

@PaulHax PaulHax commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Context

Uint16 values from 65520 through 65535 round to infinity in a half-float texture. Finite floating-point inputs can also overflow. A non-finite texel can affect interpolation with its neighbors. Half-float conversion

Results

With half-float storage, 65535 uploads as 65504. A partial update containing -70000 and 70000 stores -65504 and 65504 respectively.

Changes

Clamp finite values to the representable range in the half-float conversion shared by full and partial WebGPU texture uploads.

PR Checklist

  • GitHub Actions CI passed: semantic-release commit messages, lint, and tests
  • Test coverage added
  • Documentation and TypeScript definitions are current for this internal change

@PaulHax
PaulHax force-pushed the webgpu-finite-uint16-sampling branch from 2bdf985 to b5d305e Compare November 11, 2026 13:20

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.

1 participant