mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-05 08:52:36 +00:00
Remove duplicated rendering_info declarations
This commit is contained in:
parent
b7b4dde5e3
commit
b48c445bd4
@ -608,6 +608,16 @@ Frame* Presenter::PrepareFrameInternal(VideoCore::ImageId image_id, bool is_eop)
|
||||
.loadOp = vk::AttachmentLoadOp::eClear,
|
||||
.storeOp = vk::AttachmentStoreOp::eStore,
|
||||
}};
|
||||
const vk::RenderingInfo rendering_info{
|
||||
.renderArea =
|
||||
vk::Rect2D{
|
||||
.offset = {0, 0},
|
||||
.extent = {frame->width, frame->height},
|
||||
},
|
||||
.layerCount = 1,
|
||||
.colorAttachmentCount = attachments.size(),
|
||||
.pColorAttachments = attachments.data(),
|
||||
};
|
||||
|
||||
if (image_id != VideoCore::NULL_IMAGE_ID) {
|
||||
auto& image = texture_cache.GetImage(image_id);
|
||||
@ -669,31 +679,11 @@ Frame* Presenter::PrepareFrameInternal(VideoCore::ImageId image_id, bool is_eop)
|
||||
cmdbuf.pushConstants(*pp_pipeline_layout, vk::ShaderStageFlagBits::eFragment, 0,
|
||||
sizeof(PostProcessSettings), &pp_settings);
|
||||
|
||||
vk::RenderingInfo rendering_info{
|
||||
.renderArea =
|
||||
vk::Rect2D{
|
||||
.offset = {0, 0},
|
||||
.extent = {frame->width, frame->height},
|
||||
},
|
||||
.layerCount = 1,
|
||||
.colorAttachmentCount = attachments.size(),
|
||||
.pColorAttachments = attachments.data(),
|
||||
};
|
||||
cmdbuf.beginRendering(rendering_info);
|
||||
cmdbuf.draw(3, 1, 0, 0);
|
||||
cmdbuf.endRendering();
|
||||
} else {
|
||||
// Fix display of garbage images on startup on some drivers
|
||||
vk::RenderingInfo rendering_info{
|
||||
.renderArea =
|
||||
vk::Rect2D{
|
||||
.offset = {0, 0},
|
||||
.extent = {frame->width, frame->height},
|
||||
},
|
||||
.layerCount = 1,
|
||||
.colorAttachmentCount = attachments.size(),
|
||||
.pColorAttachments = attachments.data(),
|
||||
};
|
||||
cmdbuf.beginRendering(rendering_info);
|
||||
cmdbuf.endRendering();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user