Merge pull request #1291 from aws-lumberyard-dev/Atom/tonypeng/ATOM-15774

Atom/tonypeng/atom 15774
main
AMZN-tpeng 5 years ago committed by GitHub
commit a671ebc699
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -55,7 +55,11 @@ namespace AZ
const auto& image = static_cast<const Image&>(resourceBase); const auto& image = static_cast<const Image&>(resourceBase);
const RHI::ImageViewDescriptor& descriptor = GetDescriptor(); const RHI::ImageViewDescriptor& descriptor = GetDescriptor();
AZ_Assert(image.GetNativeImage() != VK_NULL_HANDLE, "Image has not been initialized."); // this can happen when image has been invalidated/released right before re-compiling the image
if (image.GetNativeImage() == VK_NULL_HANDLE)
{
return RHI::ResultCode::Fail;
}
RHI::Format viewFormat = descriptor.m_overrideFormat; RHI::Format viewFormat = descriptor.m_overrideFormat;
// If an image is not owner of native image, it is a swapchain image. // If an image is not owner of native image, it is a swapchain image.

Loading…
Cancel
Save