Resurrect canvas srgb formats
We just removed these in #2522 with the intent of just using viewFormat to get -srgb texture views into the canvas.
But I'm proposing adding them back because on some systems (current D3D12, Vulkan without extension), enabling srgb viewFormats are likely more costly than just returning an srgb format. Internally, it may need to be reinterpreted, but hopefully sometimes it doesn't.
Implementation cost should be small (hopefully) and this is slightly more convenient for developers also.
https://github.com/gpuweb/gpuweb/discussions/2537#discussioncomment-2062936 https://github.com/gpuweb/gpuweb/pull/2540#discussion_r794095160
Previews, as seen when this build job started (54c401f7ec920a242eb38b201044a2385e4875df): WebGPU | IDL WGSL Explainer
Previews, as seen when this build job started (f9bbe88c3f9abd9ccd9b27d8cf2ab62199b2aacf): WebGPU | IDL WGSL Explainer
We just removed these in #2522 with the intent of just using viewFormat to get
-srgbtexture views into the canvas.But I'm proposing adding them back because on some systems (current D3D12, Vulkan without extension), enabling srgb viewFormats are likely more costly than just returning an srgb format. Internally, it may need to be reinterpreted, but hopefully sometimes it doesn't.
Implementation cost should be small (hopefully) and this is slightly more convenient for developers also.
Implementation cost may not be small. As far as I know there are no "-srgb" formats in Viz yet.
That's a fair point. I was thinking we could essentially start by just taking a texture view, but of course that's not possible because getCurrentTexture returns a texture.
Maybe we should postpone this change then.