mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-30 03:10:19 +00:00
[TEST] Fix TFB subdependency
This commit is contained in:
@@ -725,6 +725,9 @@ public:
|
|||||||
if (!device.IsExtTransformFeedbackSupported()) {
|
if (!device.IsExtTransformFeedbackSupported()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!scheduler.IsRenderPassActive()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
FlushBeginTFB();
|
FlushBeginTFB();
|
||||||
has_started = true;
|
has_started = true;
|
||||||
}
|
}
|
||||||
@@ -741,6 +744,9 @@ public:
|
|||||||
if (has_flushed_end_pending) {
|
if (has_flushed_end_pending) {
|
||||||
if (scheduler.IsRenderPassActive()) {
|
if (scheduler.IsRenderPassActive()) {
|
||||||
FlushEndTFB();
|
FlushEndTFB();
|
||||||
|
} else {
|
||||||
|
has_flushed_end_pending = false;
|
||||||
|
has_started = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
runtime.View3DRegs([this](Maxwell3D& maxwell3d) {
|
runtime.View3DRegs([this](Maxwell3D& maxwell3d) {
|
||||||
|
|||||||
@@ -145,6 +145,16 @@ VkRenderPass RenderPassCache::Get(const RenderPassKey& key) {
|
|||||||
.preserveAttachmentCount = 0,
|
.preserveAttachmentCount = 0,
|
||||||
.pPreserveAttachments = nullptr,
|
.pPreserveAttachments = nullptr,
|
||||||
};
|
};
|
||||||
|
const VkSubpassDependency counter_resume_dependency{
|
||||||
|
.srcSubpass = 0,
|
||||||
|
.dstSubpass = 0,
|
||||||
|
.srcStageMask = VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT,
|
||||||
|
.dstStageMask = VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT,
|
||||||
|
.srcAccessMask = VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT,
|
||||||
|
.dstAccessMask = VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT,
|
||||||
|
.dependencyFlags = 0,
|
||||||
|
};
|
||||||
|
const bool can_resume_transform_feedback = device->IsExtTransformFeedbackSupported();
|
||||||
pair->second = device->GetLogical().CreateRenderPass({
|
pair->second = device->GetLogical().CreateRenderPass({
|
||||||
.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO,
|
.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO,
|
||||||
.pNext = nullptr,
|
.pNext = nullptr,
|
||||||
@@ -153,8 +163,8 @@ VkRenderPass RenderPassCache::Get(const RenderPassKey& key) {
|
|||||||
.pAttachments = descriptions.empty() ? nullptr : descriptions.data(),
|
.pAttachments = descriptions.empty() ? nullptr : descriptions.data(),
|
||||||
.subpassCount = 1,
|
.subpassCount = 1,
|
||||||
.pSubpasses = &subpass,
|
.pSubpasses = &subpass,
|
||||||
.dependencyCount = 0,
|
.dependencyCount = can_resume_transform_feedback ? 1u : 0u,
|
||||||
.pDependencies = nullptr,
|
.pDependencies = can_resume_transform_feedback ? &counter_resume_dependency : nullptr,
|
||||||
});
|
});
|
||||||
return *pair->second;
|
return *pair->second;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user