vkCmdBlitImage() fix test for different sample counts.

This commit is contained in:
Bill Hollings 2019-08-12 23:55:18 -04:00
parent 95f5b58145
commit 95e805c8c2

View File

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