- From: Kai Ninomiya <notifications@github.com>
- Date: Mon, 07 Jun 2021 20:47:58 -0700
- To: w3ctag/design-reviews <design-reviews@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 8 June 2021 03:49:10 UTC
> * Lots of strings in the API is USVString - feels like DOMString would be more appropriate, is there something I'm missing? Good question. This was a deliberate decision in the places where we used it: - All of the debug strings (GPUObjectBase/label, GPUObjectDescriptorBase/label, pushDebugGroup/groupLabel, insertDebugMarker/markerLabel) may optionally be passed down to the GPU driver to enhance the debugging experience for developers running specialized GPU debugging tools against the browser. Implementations which choose to do this would presumably perform some further sanitization on these strings before passing them, but nonetheless invalid unicode strings don't make sense - at least some drivers would take UTF-8 (or maybe ASCII) to drivers. - Shader code (GPUShaderModuleDescriptor/code, GPUProgrammableStage/entryPoint) is processed as a unicode string by WGSL, so a restriction is needed here as well. In practice, implementations are likely to do that processing in UTF-8, and this also enables that. Once again however, there is still a requirement to handle certain other edge cases (like `\0`, filed https://github.com/gpuweb/gpuweb/issues/1816) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3ctag/design-reviews/issues/626#issuecomment-856415954
Received on Tuesday, 8 June 2021 03:49:10 UTC