mirror of
https://github.com/izzy2lost/ppsspp.git
synced 2026-03-10 12:43:04 -07:00
Some Vulkan renderpass load/store optimizations.
This commit is contained in:
@@ -499,6 +499,8 @@ public:
|
||||
|
||||
void InvalidateCachedState() override;
|
||||
|
||||
void InvalidateFramebuffer(FBInvalidationStage stage, uint32_t channels) override;
|
||||
|
||||
private:
|
||||
VulkanTexture *GetNullTexture();
|
||||
VulkanContext *vulkan_ = nullptr;
|
||||
@@ -1604,4 +1606,19 @@ void VKContext::HandleEvent(Event ev, int width, int height, void *param1, void
|
||||
}
|
||||
}
|
||||
|
||||
void VKContext::InvalidateFramebuffer(FBInvalidationStage stage, uint32_t channels) {
|
||||
VkImageAspectFlags flags = 0;
|
||||
if (channels & FBChannel::FB_COLOR_BIT)
|
||||
flags |= VK_IMAGE_ASPECT_COLOR_BIT;
|
||||
if (channels & FBChannel::FB_DEPTH_BIT)
|
||||
flags |= VK_IMAGE_ASPECT_DEPTH_BIT;
|
||||
if (channels & FBChannel::FB_STENCIL_BIT)
|
||||
flags |= VK_IMAGE_ASPECT_STENCIL_BIT;
|
||||
if (stage == FB_INVALIDATION_LOAD) {
|
||||
renderManager_.SetLoadDontCare(flags);
|
||||
} else if (stage == FB_INVALIDATION_STORE) {
|
||||
renderManager_.SetStoreDontCare(flags);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Draw
|
||||
|
||||
Reference in New Issue
Block a user