Fix mistaken YCBCR format support indication.

MVKVkFormatDesc::chromaSubsamplingPlaneCount must be > 1 to be considered supported.
This commit is contained in:
Bill Hollings 2022-11-18 23:35:46 -05:00
parent 0dd329398a
commit bd497fe713
2 changed files with 2 additions and 1 deletions

View File

@ -20,6 +20,7 @@ Released TBD
- Fix crash on descriptor update with out-of-bounds descriptor count data.
- Work around `MTLCounterSet` crash on additional Intel Iris Plus Graphics devices.
- Fix mistaken YCBCR format support indication.
- Document new linkage model used by *Xcode 14* and later, and how to link **MoltenVK**
to an app or game using *Xcode 13* or earlier.
- Support *Xcode 14.1* build settings.

View File

@ -154,7 +154,7 @@ typedef struct MVKVkFormatDesc {
inline double bytesPerTexel() const { return (double)bytesPerBlock / (double)(blockTexelSize.width * blockTexelSize.height); };
inline bool isSupported() const { return (mtlPixelFormat != MTLPixelFormatInvalid || chromaSubsamplingPlaneCount > 0); };
inline bool isSupported() const { return (mtlPixelFormat != MTLPixelFormatInvalid || chromaSubsamplingPlaneCount > 1); };
inline bool isSupportedOrSubstitutable() const { return isSupported() || (mtlPixelFormatSubstitute != MTLPixelFormatInvalid); };
inline bool vertexIsSupported() const { return (mtlVertexFormat != MTLVertexFormatInvalid); };