mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-26 23:10:38 +00:00
commit
16d1d5566b
@ -2,6 +2,15 @@
|
||||
#include "VulkanContext.h"
|
||||
#include "VulkanBarrier.h"
|
||||
|
||||
#include "Common/Log.h"
|
||||
|
||||
VulkanBarrierBatch::~VulkanBarrierBatch() {
|
||||
// _dbg_assert_(imageBarriers_.empty());
|
||||
if (!imageBarriers_.empty()) {
|
||||
ERROR_LOG(G3D, "~VulkanBarrierBatch: %d barriers remaining", (int)imageBarriers_.size());
|
||||
}
|
||||
}
|
||||
|
||||
void VulkanBarrier::Flush(VkCommandBuffer cmd) {
|
||||
if (!imageBarriers_.empty()) {
|
||||
vkCmdPipelineBarrier(cmd, srcStageMask_, dstStageMask_, dependencyFlags_, 0, nullptr, 0, nullptr, (uint32_t)imageBarriers_.size(), imageBarriers_.data());
|
||||
|
@ -3,7 +3,6 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/Log.h"
|
||||
#include "Common/GPU/Vulkan/VulkanLoader.h"
|
||||
#include "Common/Data/Collections/FastVec.h"
|
||||
#include "Common/Data/Collections/TinySet.h"
|
||||
@ -12,9 +11,7 @@ class VulkanContext;
|
||||
|
||||
class VulkanBarrierBatch {
|
||||
public:
|
||||
~VulkanBarrierBatch() {
|
||||
_dbg_assert_(imageBarriers_.empty());
|
||||
}
|
||||
~VulkanBarrierBatch();
|
||||
|
||||
VkImageMemoryBarrier *Add(VkImage image, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags) {
|
||||
srcStageMask_ |= srcStageMask;
|
||||
|
@ -1357,11 +1357,12 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) {
|
||||
} else if (!Core_ShouldRunBehind() && strcmp(screenManager()->topScreen()->tag(), "DevMenu") != 0) {
|
||||
// Just to make sure.
|
||||
if (PSP_IsInited() && !skipBufferEffects) {
|
||||
_dbg_assert_(gpu);
|
||||
PSP_BeginHostFrame();
|
||||
gpu->CopyDisplayToOutput(true);
|
||||
PSP_EndHostFrame();
|
||||
}
|
||||
if (!framebufferBound && !gpu->PresentedThisFrame()) {
|
||||
if (!framebufferBound && (!gpu || !gpu->PresentedThisFrame())) {
|
||||
draw->BindFramebufferAsRenderTarget(nullptr, { RPAction::CLEAR, RPAction::CLEAR, RPAction::CLEAR, }, "EmuScreen_Behind");
|
||||
}
|
||||
// Need to make sure the UI texture is available, for "darken".
|
||||
@ -1439,6 +1440,7 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) {
|
||||
framebufferBound = true;
|
||||
// Just to make sure.
|
||||
if (PSP_IsInited()) {
|
||||
_dbg_assert_(gpu);
|
||||
gpu->CopyDisplayToOutput(true);
|
||||
}
|
||||
}
|
||||
@ -1458,6 +1460,7 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) {
|
||||
Achievements::FrameUpdate();
|
||||
}
|
||||
|
||||
_dbg_assert_(gpu);
|
||||
if (gpu && gpu->PresentedThisFrame()) {
|
||||
framebufferBound = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user