mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-10 20:53:15 +00:00
Add fallback system for unsupported pixel formats.
This commit is contained in:
parent
35d629a730
commit
175ffe8ce3
6 changed files with 154 additions and 4 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue