Merge pull request #718 from billhollings/master

vkCmdBlitImage() fix test for different sample counts.
This commit is contained in:
Bill Hollings 2019-08-12 23:55:56 -04:00 committed by GitHub
commit 0bc3be3707
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,9 +77,10 @@ void MVKCmdCopyImage::setContent(VkImage srcImage,
_isDstCompressed = _dstImage->getIsCompressed();
uint32_t dstBytesPerBlock = mvkMTLPixelFormatBytesPerBlock(_dstMTLPixFmt);
_canCopyFormats = formatsMustMatch
_canCopyFormats = (_dstSampleCount == _srcSampleCount) && (formatsMustMatch
? (_dstMTLPixFmt == _srcMTLPixFmt)
: ((dstBytesPerBlock == srcBytesPerBlock) && (_dstSampleCount == _srcSampleCount));
: (dstBytesPerBlock == srcBytesPerBlock));
_useTempBuffer = (_srcMTLPixFmt != _dstMTLPixFmt) && (_isSrcCompressed || _isDstCompressed); // Different formats and at least one is compressed
_commandUse = commandUse;