Remove some texture formats that are not universal.#357
Conversation
kvark
left a comment
There was a problem hiding this comment.
I'm sad to lose "b5g6r5unorm", but there is not much we can do.
There was a problem hiding this comment.
I suspect b5g6r5unorm is actually well-supported, but that the naming conventions used by the APIs make this unclear.
D3D11.1+: DXGI_FORMAT_B5G6R5_UNORM (LSB-first! In D3D9 this was D3DFMT_R5G6B5!)
Vulkan: VK_FORMAT_R5G6B5_UNORM_PACK16 (MSB-first, shows you the bits in the spec)
Metal: MTLPixelFormat.b5g6r5Unorm (I'm betting this is LSB-first!)
We should check on Metal, but its other packed 16bit formats are:
a1bgr5Unormabgr4Unormbgr5a1Unorm
I would be surprised if abgr4Unorm was not GL_RGBA4.
FWIW, DXGI also declares DXGI_FORMAT_B5G5R5A1_UNORM. (Vulcan, of course, declares everything)
|
@jdashg the problem on Metal isn't the order of component in the format, like you said, it is likely the same format as in other APIs. The issue is that the format is explicitly marked unavailable on macOS, here's an extract of the system headers on my machine: typedef NS_ENUM(NSUInteger, MTLPixelFormat)
{
// ...
/* Packed 16 bit formats */
MTLPixelFormatB5G6R5Unorm API_AVAILABLE(ios(8.0)) API_UNAVAILABLE(macos) = 40,
MTLPixelFormatA1BGR5Unorm API_AVAILABLE(ios(8.0)) API_UNAVAILABLE(macos) = 41,
MTLPixelFormatABGR4Unorm API_AVAILABLE(ios(8.0)) API_UNAVAILABLE(macos) = 42,
MTLPixelFormatBGR5A1Unorm API_AVAILABLE(ios(8.0)) API_UNAVAILABLE(macos) = 43,
//...
}; |
|
@grorg Please inform the Metal team of my disappointment about B5G6R5Unorm desktop support. :) |
The r8unorm-srgb and rg8unorm-srgb are not guaranteed to be present in Vulkan and in fact rg8unorm-srgb isn't available on a recent NVIDIA Linux Vulkan driver. The r5g6b5unorm format isn't supported on Metal on macOS.
4819ee5 to
32db090
Compare
|
Rebased over #365. |
The r8unorm-srgb and rg8unorm-srgb are not guaranteed to be present in
Vulkan and in fact rg8unorm-srgb isn't available on a recent NVIDIA
Linux Vulkan driver.
The r5g6b5unorm format isn't supported on Metal on macOS.
Preview | Diff