w3c / fxtf-drafts

Mirror of https://hg.fxtf.org/drafts
https://drafts.fxtf.org/
Other
71 stars 50 forks source link

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

Open petamoriken opened 9 months ago

petamoriken commented 9 months ago

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);
}
svgeesus commented 9 months ago

possibly related:

svgeesus commented 8 months ago

@dirkschulze