More `sg_vertex_format` types
At the moment, there are no 1-element integer vertex formats, only 2+.
Requested types:
SG_VERTEXFORMAT_BYTE
SG_VERTEXFORMAT_UBYTE
SG_VERTEXFORMAT_SHORT
SG_VERTEXFORMAT_USHORT
SG_VERTEXFORMAT_INT
SG_VERTEXFORMAT_UINT
SG_VERTEXFORMAT_BYTEN
SG_VERTEXFORMAT_UBYTEN
SG_VERTEXFORMAT_SHORTN
SG_VERTEXFORMAT_USHORTN
SG_VERTEXFORMAT_INTN
SG_VERTEXFORMAT_UINTN
Several of those type will very likely cause performance problems on various backends and drivers (e.g. any type where the size isn't a multiple of 4 bytes). This is an old post of mine, but I doubt that GL drivers can even fix this type of problem: https://floooh.github.io/2013/01/23/a-radeon-fix-and-more.html
And for the "4-byte-multiple" sizes, a similar problem as with the uniform types exists, I seem to remember similar compatibility problems as with integer uniform types on WebGL and GLES2 which then resulted in the very "conservative" selection of vertex formats in sokol_gfx.h, but I'd need to do new tests to confirm this.
So, basically out of your list, only those would remain:
SG_VERTEXFORMAT_INT SG_VERTEXFORMAT_UINT SG_VERTEXFORMAT_INTN SG_VERTEXFORMAT_UINTN
(the other possible combinations for (U)BYTE and (U)SHORT which result in multiple-of-4 sizes are already supported)
I know the smaller types will be slow for numerous reasons, but I was wanting to reduce the size of my vertices by only storing enough data as required. If I have to use 4 bytes per integer rather than 1 or 2 bytes, then that's the compromise I will have to take for using sokol_gfx.h.
To be more precise, I think/guess it's not so much the size of the datatype, but the stride that's important (again, I might remember wrong, but an "odd" stride which isn't am multiple of four might have problems on other backend APIs too). And if this is true you wouldn't be able to save memory.
What I'm trying to do usually is to pack several things into the the same vertex component (for instance one could pack four "unrelated" 8-bit values into a single UBYTE4 vertex component.