renderer_vulkan: Remove primitive restart disable support check. (#3827)
Some checks failed
Build and Release / reuse (push) Has been cancelled
Build and Release / clang-format (push) Has been cancelled
Build and Release / get-info (push) Has been cancelled
Build and Release / windows-sdl (push) Has been cancelled
Build and Release / macos-sdl (push) Has been cancelled
Build and Release / linux-sdl (push) Has been cancelled
Build and Release / linux-sdl-gcc (push) Has been cancelled
Build and Release / pre-release (push) Has been cancelled

This commit is contained in:
squidbus 2025-11-24 23:51:39 -08:00 committed by GitHub
parent 6295c32e5c
commit 1394852791
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 2 additions and 16 deletions

View File

@ -94,10 +94,6 @@ GraphicsPipeline::GraphicsPipeline(
const auto topology = LiverpoolToVK::PrimitiveType(key.prim_type);
const vk::PipelineInputAssemblyStateCreateInfo input_assembly = {
.topology = topology,
// Avoid warning spam on all pipelines about unsupported restart disable, if not supported.
// However, must be false for list topologies to avoid validation errors.
.primitiveRestartEnable =
!instance.IsPrimitiveRestartDisableSupported() && !IsPrimitiveTopologyList(topology),
};
const bool is_rect_list = key.prim_type == AmdGpu::PrimitiveType::RectList;
@ -156,12 +152,9 @@ GraphicsPipeline::GraphicsPipeline(
vk::DynamicState::eStencilCompareMask, vk::DynamicState::eStencilWriteMask,
vk::DynamicState::eStencilOp, vk::DynamicState::eCullMode,
vk::DynamicState::eFrontFace, vk::DynamicState::eRasterizerDiscardEnable,
vk::DynamicState::eLineWidth,
vk::DynamicState::eLineWidth, vk::DynamicState::ePrimitiveRestartEnable,
};
if (instance.IsPrimitiveRestartDisableSupported()) {
dynamic_states.push_back(vk::DynamicState::ePrimitiveRestartEnable);
}
if (instance.IsDepthBoundsSupported()) {
dynamic_states.push_back(vk::DynamicState::eDepthBoundsTestEnable);
dynamic_states.push_back(vk::DynamicState::eDepthBounds);

View File

@ -411,11 +411,6 @@ public:
properties.limits.framebufferStencilSampleCounts;
}
/// Returns whether disabling primitive restart is supported.
bool IsPrimitiveRestartDisableSupported() const {
return driver_id != vk::DriverId::eMoltenvk;
}
/// Returns true if logic ops are supported by the device.
bool IsLogicOpSupported() const {
return features.logicOp;

View File

@ -290,9 +290,7 @@ void DynamicState::Commit(const Instance& instance, const vk::CommandBuffer& cmd
}
if (dirty_state.primitive_restart_enable) {
dirty_state.primitive_restart_enable = false;
if (instance.IsPrimitiveRestartDisableSupported()) {
cmdbuf.setPrimitiveRestartEnable(primitive_restart_enable);
}
cmdbuf.setPrimitiveRestartEnable(primitive_restart_enable);
}
if (dirty_state.rasterizer_discard_enable) {
dirty_state.rasterizer_discard_enable = false;