w3c / fxtf-drafts

Mirror of https://hg.fxtf.org/drafts

Home Page:https://drafts.fxtf.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[geometry] Add `Float16Array` support in `DOMMatrix`

petamoriken opened this issue · comments

Stage 3 Float16Array is currently in progress at TC39 and is in the process of being implemented in each engine.
https://github.com/tc39/proposal-float16array

WebGPU can handle mat4x4<f16> by enabling the f16 extension. It would be easier to handle it by including support for Float16Array in DOMMatrix.
https://www.w3.org/TR/WGSL/#matrix-types

partial interface DOMMatrixReadOnly {
  [NewObject] static DOMMatrixReadOnly fromFloat16Array(Float16Array array16);
  [NewObject] Float16Array toFloat16Array();
}

partial interface DOMMatrix {
   [NewObject] static DOMMatrix fromFloat16Array(Float16Array array16);
}

possibly related: