[vulkan] Small patch for tesselation vs an already handling with topology patch list.

This commit is contained in:
CamilleLaVey 2026-03-13 01:17:57 -04:00
parent b1821cb60e
commit 76bb5fc18b
2 changed files with 7 additions and 1 deletions

View file

@ -98,6 +98,9 @@ public:
bool UsesExtendedDynamicState2LogicOp() const noexcept {
return key.state.extended_dynamic_state_2_logic_op != 0;
}
bool HasTessellationStages() const noexcept {
return static_cast<bool>(spv_modules[1]) || static_cast<bool>(spv_modules[2]);
}
GraphicsPipeline& operator=(GraphicsPipeline&&) noexcept = delete;
GraphicsPipeline(GraphicsPipeline&&) noexcept = delete;

View file

@ -1991,11 +1991,14 @@ void RasterizerVulkan::UpdateDepthCompareOp(Tegra::Engines::Maxwell3D::Regs& reg
}
void RasterizerVulkan::UpdatePrimitiveTopology([[maybe_unused]] Tegra::Engines::Maxwell3D::Regs& regs) {
GraphicsPipeline* pipeline = pipeline_cache.CurrentGraphicsPipeline();
const auto topology = maxwell3d->draw_manager->GetDrawState().topology;
if (!state_tracker.ChangePrimitiveTopology(topology)) {
return;
}
const auto vk_topology = MaxwellToVK::PrimitiveTopology(device, topology);
const auto vk_topology = pipeline && pipeline->HasTessellationStages()
? VK_PRIMITIVE_TOPOLOGY_PATCH_LIST
: MaxwellToVK::PrimitiveTopology(device, topology);
scheduler.Record([vk_topology](vk::CommandBuffer cmdbuf) {
cmdbuf.SetPrimitiveTopologyEXT(vk_topology);
});