IR interpreter: Improve code gen for the main interpreter loop

Thanks to fp64 for the idea of using unreachable markers to avoid the
range check on the switch!

Additionally, use it in a few more places.
This commit is contained in:
Henrik Rydgård committed 2025-10-15 21:15:30 +02:00
1 parent 8509e951a7
commit c3dfddebd7
4 files changed
+22 -4

No files matched your search

+5 -1
View File
@@ -366,6 +366,9 @@ void VulkanQueueRunner::RunSteps(std::vector<VKRStep *> &steps, int curFrame, Fr
break;
case VKRStepType::RENDER_SKIP:
break;
default:
UNREACHABLE();
break;
}
if (profile && profile->timestampsEnabled && profile->timestampDescriptions.size() + 1 < MAX_TIMESTAMP_QUERIES) {
@@ -813,6 +816,7 @@ void VulkanQueueRunner::ApplyRenderPassMerge(std::vector<VKRStep *> &steps) {
break;
default:
// We added a new step? Might be unsafe.
_dbg_assert_(false);
goto done_fb;
}
}
@@ -1239,7 +1243,7 @@ void VulkanQueueRunner::PerformRenderPass(const VKRStep &step, VkCommandBuffer c
break;
default:
ERROR_LOG(Log::G3D, "Unimpl queue command");
UNREACHABLE();
break;
}
}