mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-04 13:07:32 +00:00
feat(libSceAgcDriver): draw the system dialog in the presentation
The presentation drew the system keyboard from SystemOverlayView and laid it out inside its own recording. It now asks SystemOverlayLayout for the system panel at the swapchain extent, which is already validated by then, and records whichever of the keyboard and the dialog is set through the same overlay pass and layout transitions. Presentations with neither set are unchanged.
This commit is contained in:
1 parent
bab3301ffd
commit
f0d5ff528f
1 file changed
+3
-3
@@ -3641,8 +3641,8 @@ bool VulkanDevice::present(std::uint32_t width, std::uint32_t height, bool opaqu
|
||||
plane = nullptr;
|
||||
}
|
||||
const auto planeSource = plane != nullptr ? OverlayPlaneSource(graphicsContext(), *plane) : PlaneSource{};
|
||||
const auto keyboardView = SystemOverlayView();
|
||||
const bool keyboard = keyboardView.has_value();
|
||||
const auto systemLayout = SystemOverlayLayout(state->extent);
|
||||
const bool keyboard = systemLayout.has_value();
|
||||
const bool drawsOver = overlay || keyboard || plane != nullptr;
|
||||
if (display != nullptr && resident == nullptr) {
|
||||
static_cast<void>(DisplayBufferSize(*display));
|
||||
@@ -3817,7 +3817,7 @@ bool VulkanDevice::present(std::uint32_t width, std::uint32_t height, bool opaqu
|
||||
}
|
||||
if (keyboard) {
|
||||
if (!state->keyboard) state->keyboard = std::make_unique<PerformanceOverlay>(graphicsContext(), state->presentSlots.size());
|
||||
state->keyboard->RecordRects(commands, static_cast<std::size_t>(&slot - state->presentSlots.data()), barrier.image, state->surfaceFormat, state->surfaceColorSpace, state->extent, drawn || plane != nullptr ? VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL : VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, overlay ? VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL : VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, LayOutKeyboard(*keyboardView, state->extent));
|
||||
state->keyboard->RecordRects(commands, static_cast<std::size_t>(&slot - state->presentSlots.data()), barrier.image, state->surfaceFormat, state->surfaceColorSpace, state->extent, drawn || plane != nullptr ? VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL : VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, overlay ? VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL : VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, *systemLayout);
|
||||
}
|
||||
if (overlay) {
|
||||
if (!state->overlay) state->overlay = std::make_unique<PerformanceOverlay>(graphicsContext(), state->presentSlots.size());
|
||||
|
||||
Reference in new issue
Block a user