[vk] Return the corrections made for buffer update logic #3690 (#4499)

Credit: Pavel
Fixes shadows in Metroid Prime Remastered

Broken
![image](/attachments/7c49b843-0184-4835-b14e-d93a0948dd56)
Fixed
![image](/attachments/2ba2eb43-fead-4fd4-9791-671aa518f282)

Needs to be tested
- Demon Slayer Vertex Explosions
- Ender Magnolia Freezing

- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md)
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.

-------------------

Co-authored-by: PavelBARABANOV <pavelbarabanov94@gmail.com>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4499
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Reviewed-by: lizzie <lizzie@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
This commit is contained in:
John
2026-10-12 01:09:10 +02:00
committed by crueter
parent fecc1b4ee3
commit 6352612425
@@ -814,7 +814,7 @@ public:
new_query->flags |= VideoCommon::QueryFlagBits::IsFinalValueSynced;
return index;
}
scheduler.RequestOutsideRenderPassOperationContext();
CloseCounter();
auto [bank_slot, data_slot] = ProduceCounterBuffer(slot);
@@ -952,8 +952,6 @@ private:
}
has_flushed_end_pending = false;
// Refresh buffer state before ending transform feedback to ensure counters_count is up-to-date.
UpdateBuffers();
if (buffers_count == 0) {
LOG_DEBUG(Render_Vulkan, "EndTransformFeedbackEXT called with no counters (buffers_count=0)");
scheduler.Record([](vk::CommandBuffer cmdbuf) {