mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-03-22 17:46:08 -04:00
fix(vulkan): revert query cache FlushBeginTFB order to fix menu freeze
Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
@@ -873,16 +873,17 @@ private:
|
||||
return;
|
||||
}
|
||||
has_flushed_end_pending = true;
|
||||
UpdateBuffers();
|
||||
if (!has_started || buffers_count == 0) {
|
||||
scheduler.Record([](vk::CommandBuffer cmdbuf) {
|
||||
cmdbuf.BeginTransformFeedbackEXT(0, 0, nullptr, nullptr);
|
||||
});
|
||||
UpdateBuffers();
|
||||
return;
|
||||
}
|
||||
scheduler.Record([this, total = static_cast<u32>(buffers_count)](vk::CommandBuffer cmdbuf) {
|
||||
cmdbuf.BeginTransformFeedbackEXT(0, total, counter_buffers.data(), offsets.data());
|
||||
});
|
||||
UpdateBuffers();
|
||||
}
|
||||
|
||||
void FlushEndTFB() {
|
||||
|
||||
@@ -67,14 +67,13 @@ struct DrawParams {
|
||||
VkViewport GetViewportState(const Device& device, const Maxwell& regs, size_t index, float scale) {
|
||||
const auto& src = regs.viewport_transform[index];
|
||||
const auto conv = [scale](float value) {
|
||||
if (scale >= 1.0f) {
|
||||
return value * scale;
|
||||
}
|
||||
// Use double only when scaling down to avoid sub-pixel jitter (MP4 fix)
|
||||
const double new_value = static_cast<double>(value) * static_cast<double>(scale);
|
||||
if (scale < 1.0f) {
|
||||
const bool sign = std::signbit(value);
|
||||
const double rounded = std::round(std::abs(new_value));
|
||||
double rounded = std::round(std::abs(new_value));
|
||||
return static_cast<float>(sign ? -rounded : rounded);
|
||||
}
|
||||
return static_cast<float>(new_value);
|
||||
};
|
||||
const float x = conv(src.translate_x - src.scale_x);
|
||||
const float width = conv(src.scale_x * 2.0f);
|
||||
|
||||
Reference in New Issue
Block a user