pp_pass: Use correct surface format. (#2860)

This commit is contained in:
squidbus 2025-04-27 20:56:17 -07:00 committed by GitHub
parent ff984d3cde
commit 81ad31ce31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View file

@ -14,7 +14,7 @@
namespace Vulkan::HostPasses {
void PostProcessingPass::Create(vk::Device device) {
void PostProcessingPass::Create(vk::Device device, const vk::Format surface_format) {
static const std::array pp_shaders{
HostShaders::FS_TRI_VERT,
HostShaders::POST_PROCESS_FRAG,
@ -76,7 +76,7 @@ void PostProcessingPass::Create(vk::Device device) {
Check<"create pp pipeline layout">(device.createPipelineLayoutUnique(layout_info));
const std::array pp_color_formats{
vk::Format::eB8G8R8A8Unorm, // swapchain.GetSurfaceFormat().format,
surface_format,
};
const vk::PipelineRenderingCreateInfo pipeline_rendering_ci{
.colorAttachmentCount = pp_color_formats.size(),

View file

@ -19,7 +19,7 @@ public:
u32 hdr = 0;
};
void Create(vk::Device device);
void Create(vk::Device device, vk::Format surface_format);
void Render(vk::CommandBuffer cmdbuf, vk::ImageView input, vk::Extent2D input_size,
Frame& output, Settings settings);

View file

@ -130,7 +130,7 @@ Presenter::Presenter(Frontend::WindowSDL& window_, AmdGpu::Liverpool* liverpool_
}
fsr_pass.Create(device, instance.GetAllocator(), num_images);
pp_pass.Create(device);
pp_pass.Create(device, swapchain.GetSurfaceFormat().format);
ImGui::Layer::AddLayer(Common::Singleton<Core::Devtools::Layer>::Instance());
}