glsl has the same grammar
layout(binding = 1) uniform sampler2D myTexture;
While this is handy when coming from GLSL, combined image samplers don't match what modern GPU hardware does, or what Metal and D3D12 expose (Vulkan has it but warns it might be slower than using separate image and samplers). I don't think we should have combined image and samplers in WebGPU, and certainly not for the MVP.
I really don't think we should have outdated GLSL concepts informing our API design.
The only real benefit I see here is being potentially able to run WebGL content on top of WebGPU.
I agree, let's keep them separate (for now).
While this is handy when coming from GLSL, combined image samplers don't match what modern GPU hardware does
This is not true. Combined image samplers are more efficient on Nvidia.
Yes, this is a classic NVIDIA vs. AMD thing.
NVIDIA has the sampling flags inline with the texture instruction, so using separable samplers requires an extra load + binmanip + store to put the flags into the texture request, while combined samplers are free.
AMD stores their sampler settings in special sampler constant registers (S#), so combined samplers require a load from the texture table, whereas separable samplers can be placed ahead of time in the registers.
Ultimately, though, D3D12 means that we are stuck with separable samplers, unless some heavy emulation is applied to make combined texture samplers fit in the 2048 sampler slots.
as a developer for the open source RADV Vulkan driver for AMD GPUs, I'm not quite sure what you're saying about AMD hardware.
On GCN and RDNA (basically most non-rebranded GPUs from 2011 and later), an image is a 32-byte blob of data and a sampler is a 16-byte blob of data. In typical usage we load them both from memory into registers and then reference the registers in the texture instruction. There is no real difference between combined/separate image & sampler here.
Sure, with separate samplers you can do some tricks (e.g. reusing samplers among images, and trying to tightly pack the samplers in memory), but just using separate samplers won't help you.
(Is the thing about sampler constant registers & the texture table about Terascale era GPUs?)