|
|
|
@ -2116,6 +2116,12 @@ ImageView::ImageView(TextureCacheRuntime& runtime, const VideoCommon::ImageViewI |
|
|
|
image.info.format); |
|
|
|
} |
|
|
|
|
|
|
|
const VkImageViewUsageCreateInfo image_view_usage{ |
|
|
|
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO, |
|
|
|
.pNext = nullptr, |
|
|
|
.usage = ImageUsageFlags(format_info, format), |
|
|
|
}; |
|
|
|
|
|
|
|
VkImageViewASTCDecodeModeEXT astc_decode_mode{ |
|
|
|
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_ASTC_DECODE_MODE_EXT, |
|
|
|
.pNext = nullptr, |
|
|
|
@ -2125,21 +2131,16 @@ ImageView::ImageView(TextureCacheRuntime& runtime, const VideoCommon::ImageViewI |
|
|
|
const void* view_pNext = &image_view_usage; |
|
|
|
|
|
|
|
if (device->IsExtASTCDecodeModeSupported() && |
|
|
|
VideoCommon::Surface::IsPixelFormatASTC(image.info.format) && |
|
|
|
VideoCommon::Surface::IsPixelFormatASTC(format)) { |
|
|
|
VideoCore::Surface::IsPixelFormatASTC(image.info.format) && |
|
|
|
VideoCore::Surface::IsPixelFormatASTC(format)) { |
|
|
|
|
|
|
|
const bool view_is_srgb = VideoCommon::Surface::IsPixelFormatSRGB(format); |
|
|
|
astc_decode_mode.decodeMode = view_is_srgb ? VK_FORMAT_R8G8B8A8_SRGB_PACK32 |
|
|
|
: VK_FORMAT_R8G8B8A8_UNORM_PACK32; |
|
|
|
const bool view_is_srgb = VideoCore::Surface::IsPixelFormatSRGB(format); |
|
|
|
astc_decode_mode.decodeMode = view_is_srgb ? VK_FORMAT_A8B8G8R8_SRGB_PACK32 |
|
|
|
: VK_FORMAT_A8B8G8R8_UNORM_PACK32; |
|
|
|
astc_decode_mode.pNext = view_pNext; |
|
|
|
view_pNext = &astc_decode_mode; |
|
|
|
} |
|
|
|
|
|
|
|
const VkImageViewUsageCreateInfo image_view_usage{ |
|
|
|
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO, |
|
|
|
.pNext = nullptr, |
|
|
|
.usage = ImageUsageFlags(format_info, format), |
|
|
|
}; |
|
|
|
const VkImageViewCreateInfo create_info{ |
|
|
|
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, |
|
|
|
.pNext = view_pNext, |
|
|
|
|