mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-27 11:52:31 -06:00
Merge pull request #9154 from liamwhite/new-fb
vk_blit_screen: recreate swapchain images on guest format change
This commit is contained in:
commit
3794851f7f
2 changed files with 10 additions and 1 deletions
|
@ -480,11 +480,15 @@ void BlitScreen::RefreshResources(const Tegra::FramebufferConfig& framebuffer) {
|
||||||
fsr.reset();
|
fsr.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (framebuffer.width == raw_width && framebuffer.height == raw_height && !raw_images.empty()) {
|
if (framebuffer.width == raw_width && framebuffer.height == raw_height &&
|
||||||
|
framebuffer.pixel_format == pixel_format && !raw_images.empty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
raw_width = framebuffer.width;
|
raw_width = framebuffer.width;
|
||||||
raw_height = framebuffer.height;
|
raw_height = framebuffer.height;
|
||||||
|
pixel_format = framebuffer.pixel_format;
|
||||||
|
|
||||||
ReleaseRawImages();
|
ReleaseRawImages();
|
||||||
|
|
||||||
CreateStagingBuffer(framebuffer);
|
CreateStagingBuffer(framebuffer);
|
||||||
|
|
|
@ -28,6 +28,10 @@ namespace VideoCore {
|
||||||
class RasterizerInterface;
|
class RasterizerInterface;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace Service::android {
|
||||||
|
enum class PixelFormat : u32;
|
||||||
|
}
|
||||||
|
|
||||||
namespace Vulkan {
|
namespace Vulkan {
|
||||||
|
|
||||||
struct ScreenInfo;
|
struct ScreenInfo;
|
||||||
|
@ -156,6 +160,7 @@ private:
|
||||||
|
|
||||||
u32 raw_width = 0;
|
u32 raw_width = 0;
|
||||||
u32 raw_height = 0;
|
u32 raw_height = 0;
|
||||||
|
Service::android::PixelFormat pixel_format{};
|
||||||
|
|
||||||
std::unique_ptr<FSR> fsr;
|
std::unique_ptr<FSR> fsr;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue