Merge pull request #296 from cdavis5e/copy-image-compat-format
vkCmdCopyImage: Allow copies between compatible formats.
This commit is contained in:
commit
4640d273af
@ -59,12 +59,9 @@ void MVKCmdCopyImage::setContent(VkImage srcImage,
|
|||||||
|
|
||||||
// Validate
|
// Validate
|
||||||
clearConfigurationResult();
|
clearConfigurationResult();
|
||||||
if (_srcImage->getMTLPixelFormat() != _dstImage->getMTLPixelFormat()) {
|
if ((_srcImage->getMTLTextureType() == MTLTextureType3D) != (_dstImage->getMTLTextureType() == MTLTextureType3D)) {
|
||||||
setConfigurationResult(mvkNotifyErrorWithText(VK_ERROR_FEATURE_NOT_PRESENT, "vkCmdCopyImage(): The source and destination images must have the same format."));
|
setConfigurationResult(mvkNotifyErrorWithText(VK_ERROR_FEATURE_NOT_PRESENT, "vkCmdCopyImage(): Metal does not support copying to or from slices of a 3D texture."));
|
||||||
}
|
}
|
||||||
if ((_srcImage->getMTLTextureType() == MTLTextureType3D) || (_dstImage->getMTLTextureType() == MTLTextureType3D)) {
|
|
||||||
setConfigurationResult(mvkNotifyErrorWithText(VK_ERROR_FEATURE_NOT_PRESENT, "vkCmdCopyImage(): Metal does not support copying to or from slices of a 3D texture."));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adds a Metal copy region structure for each layer in the specified copy region.
|
// Adds a Metal copy region structure for each layer in the specified copy region.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user