mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-29 02:05:29 +03:00
Force Memory Barrier at VkRenderPass
Start
We depend on past commands to have completed execution in a renderpass, a subpass dependency on all graphics stages from `VK_SUBPASS_EXTERNAL` to subpass #0 is used to enforce this. Nvidia and Adreno proprietary drivers implicitly do this but Turnip or Mali drivers require this or they execute out of order.
This commit is contained in:
parent
35fde2cd0b
commit
22ce531e6f
@ -4,6 +4,20 @@
|
|||||||
#include "command_nodes.h"
|
#include "command_nodes.h"
|
||||||
|
|
||||||
namespace skyline::gpu::interconnect::node {
|
namespace skyline::gpu::interconnect::node {
|
||||||
|
RenderPassNode::RenderPassNode(vk::Rect2D renderArea) : subpassDependencies(
|
||||||
|
{
|
||||||
|
// We assume all past commands have been executed when this RP starts
|
||||||
|
vk::SubpassDependency{
|
||||||
|
.srcSubpass = VK_SUBPASS_EXTERNAL,
|
||||||
|
.dstSubpass = 0,
|
||||||
|
.srcStageMask = vk::PipelineStageFlagBits::eAllGraphics,
|
||||||
|
.dstStageMask = vk::PipelineStageFlagBits::eAllGraphics,
|
||||||
|
.srcAccessMask = vk::AccessFlagBits::eMemoryRead | vk::AccessFlagBits::eMemoryWrite,
|
||||||
|
.dstAccessMask = vk::AccessFlagBits::eMemoryRead | vk::AccessFlagBits::eMemoryWrite,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
), storage(std::make_shared<Storage>()), renderArea(renderArea) {}
|
||||||
|
|
||||||
RenderPassNode::Storage::~Storage() {
|
RenderPassNode::Storage::~Storage() {
|
||||||
if (device) {
|
if (device) {
|
||||||
if (framebuffer)
|
if (framebuffer)
|
||||||
|
@ -64,7 +64,7 @@ namespace skyline::gpu::interconnect::node {
|
|||||||
vk::Rect2D renderArea;
|
vk::Rect2D renderArea;
|
||||||
std::vector<vk::ClearValue> clearValues;
|
std::vector<vk::ClearValue> clearValues;
|
||||||
|
|
||||||
RenderPassNode(vk::Rect2D renderArea) : storage(std::make_shared<Storage>()), renderArea(renderArea) {}
|
RenderPassNode(vk::Rect2D renderArea);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @note Any preservation of attachments from previous subpasses is automatically handled by this
|
* @note Any preservation of attachments from previous subpasses is automatically handled by this
|
||||||
|
Loading…
Reference in New Issue
Block a user