Revert "fix: crash when host is on hdr but client is not on Metal lower iOS versions"
This reverts commit 6c0b1550fd.
This commit is contained in:
1 parent
6c0b1550fd
commit
e4d6be3bb3
1 file changed
+2
-13
@@ -404,22 +404,11 @@ CFStringRef __currentColorSpace;
|
|||||||
} else {
|
} else {
|
||||||
newColorSpace = CGColorSpaceCreateWithName(kCGColorSpaceITUR_2020);
|
newColorSpace = CGColorSpaceCreateWithName(kCGColorSpaceITUR_2020);
|
||||||
}
|
}
|
||||||
// Only use BGR10A2Unorm if HDR is enabled and the initial format supports it
|
newPixelFormat = MTLPixelFormatBGR10A2Unorm;
|
||||||
if (_hdrEnabled && _colorPixelFormat == MTLPixelFormatBGR10A2Unorm) {
|
|
||||||
newPixelFormat = MTLPixelFormatBGR10A2Unorm;
|
|
||||||
} else {
|
|
||||||
newPixelFormat = MTLPixelFormatBGRA8Unorm;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// SDR 2020, I'm not sure it's possible to stream this though
|
// SDR 2020, I'm not sure it's possible to stream this though
|
||||||
newColorSpace = CGColorSpaceCreateWithName(kCGColorSpaceITUR_2020);
|
newColorSpace = CGColorSpaceCreateWithName(kCGColorSpaceITUR_2020);
|
||||||
// For SDR content, respect the initially configured pixel format
|
newPixelFormat = MTLPixelFormatBGR10A2Unorm;
|
||||||
// Don't force BGR10A2Unorm unless it was configured initially
|
|
||||||
if (_hdrEnabled && _colorPixelFormat == MTLPixelFormatBGR10A2Unorm) {
|
|
||||||
newPixelFormat = MTLPixelFormatBGR10A2Unorm;
|
|
||||||
} else {
|
|
||||||
newPixelFormat = MTLPixelFormatBGRA8Unorm;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (isHDR) {
|
if (isHDR) {
|
||||||
paramBuffer.cscParams = (fullRange ? k_CscParams_Bt2020Full_10bit : k_CscParams_Bt2020Lim_10bit);
|
paramBuffer.cscParams = (fullRange ? k_CscParams_Bt2020Full_10bit : k_CscParams_Bt2020Lim_10bit);
|
||||||
|
|||||||
Reference in new issue
Block a user