mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-11-12 10:10:17 +01:00
[TEST] Fix TFB subdependency
This commit is contained in:
parent
27e7fa10d9
commit
ceffda663c
2 changed files with 18 additions and 2 deletions
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue