Hi again! We have been experimentally using sokol_gfx for some time now, and so far it has been really neat and clean. Great job! :)
One of our main use-cases is WebGL 1 on iOS devices (iPhone, iPad, etc), in our previous renderer we could use PVRTC compressed textures on this configuration.
When querying PVRTC formats (with sg_query_pixelformat())
SG_PIXELFORMAT_PVRTC_RGB_2BPP
SG_PIXELFORMAT_PVRTC_RGB_4BPP
SG_PIXELFORMAT_PVRTC_RGBA_2BPP
SG_PIXELFORMAT_PVRTC_RGBA_4BPP
we get back false on all members of the sg_pixelformat_info struct, suggesting that these compressed formats are not supported by sokol_gfx.
I did some quick digging in the code to try to see what's going on, but I'm not yet super familiar with the internals of the library. So I decided it might be better to ask before digging deeper.
Is compressed textures supported on WebGL1 for iOS? Or is it just a bug with the sg_query_pixelformat() function?
If support is not implemented, would it be much work to do so? If it's not too hard I can probably spend some time implementing this and making a pull-request if you can give some pointers as to where in the code I should be making the changes. :)
(edit: please ignore, see comment below)
Are you using sokol_gfx.h together with sokol_app.h or do you initialize the WebGL context yourself?
The PVRTC extension isn't enabled automatically in the emscripten SDK WebGL shim, that's why sokol_app.h does this:
https://github.com/floooh/sokol/blob/8f55c786ed6144e18f2dbfb504e37cdffb5e5fcb/sokol_app.h#L2897
So, if you also use sokol_app.h it should work (unless there's a bug elsewhere), otherwise you need to call emscripten_webgl_enable_extension(ctx, "WEBKIT_WEBGL_compressed_texture_pvrtc"); yourself after setting up the WebGL context and before calling sg_setup().
My iPad is currently empty and needs recharging so I can't check, but if it works as expected you should see the PVRTC extensions listed in the "Capabilities" debug window here:
https://floooh.github.io/sokol-html5/triangle-sapp-ui.html
(the screenshot was taken on a desktop machine so it only lists the BC compression formats):

Ok, looks like it's a bug, the PVRTC pixel formats are not showing up on my (now charged) iPad.
Maybe the extension name in sokol_app.h is wrong, I need to have a look tomorrow.
Maybe not relevant anymore, but we are using sokol_app.h, yes. Thank you for your time :)
Ok, this should work now. Reason was a minor disagreement between sokol_app.h and sokol_gfx.h what the PVRTC extension is actually called (I'm quite sure this has changed over time).
The cgltf-sapp sample should work now on iOS devices (it does here on my iPad Mini4), this uses textures in the .basisu file formats, which are transcoded into PVRTC during loading via Basis Universal:
https://floooh.github.io/sokol-html5/cgltf-sapp-ui.html
...and in the Capabilities debug window, the PVRTC pixel formats are now properly listed when running in iOS Safari.
Thank you for your help @floooh! :)
Most helpful comment
Ok, looks like it's a bug, the PVRTC pixel formats are not showing up on my (now charged) iPad.
Maybe the extension name in sokol_app.h is wrong, I need to have a look tomorrow.