mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-10 21:58:45 +00:00
Add fallback system for unsupported pixel formats.
This commit is contained in:
@@ -142,7 +142,7 @@ Image::Image(const Vulkan::Instance& instance_, Vulkan::Scheduler& scheduler_,
|
||||
const vk::ImageCreateInfo image_ci = {
|
||||
.flags = flags,
|
||||
.imageType = info.type,
|
||||
.format = info.pixel_format,
|
||||
.format = instance->GetSupportedFormat(info.pixel_format),
|
||||
.extent{
|
||||
.width = info.size.width,
|
||||
.height = info.size.height,
|
||||
|
||||
@@ -89,8 +89,8 @@ ImageView::ImageView(const Vulkan::Instance& instance, const ImageViewInfo& info
|
||||
.pNext = usage_override ? &usage_ci : nullptr,
|
||||
.image = image.image,
|
||||
.viewType = info.type,
|
||||
.format = format,
|
||||
.components = info.mapping,
|
||||
.format = instance.GetSupportedFormat(format),
|
||||
.components = instance.GetSupportedComponentSwizzle(format, info.mapping),
|
||||
.subresourceRange{
|
||||
.aspectMask = aspect,
|
||||
.baseMipLevel = 0U,
|
||||
|
||||
Reference in New Issue
Block a user