Revert "[vulkan, qcom] Removing faulty DepthTest from QCOM drivers"

This commit is contained in:
CamilleLaVey
2026-02-02 16:11:06 -04:00
parent 284018cd36
commit 705ca3aef4
4 changed files with 2 additions and 17 deletions

View File

@@ -844,6 +844,7 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) {
static constexpr std::array extended{
VK_DYNAMIC_STATE_CULL_MODE_EXT,
VK_DYNAMIC_STATE_FRONT_FACE_EXT,
VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE_EXT,
VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE_EXT,
VK_DYNAMIC_STATE_DEPTH_COMPARE_OP_EXT,
VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE_EXT,
@@ -852,10 +853,6 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) {
};
dynamic_states.insert(dynamic_states.end(), extended.begin(), extended.end());
if (device.SupportsDepthTestEnable()) {
dynamic_states.push_back(VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE_EXT);
}
// VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT
if (!key.state.dynamic_vertex_input) {
dynamic_states.push_back(VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT);

View File

@@ -1026,9 +1026,7 @@ void RasterizerVulkan::UpdateDynamicStates() {
UpdateStencilOp(regs);
if (state_tracker.TouchStateEnable()) {
UpdateDepthBoundsTestEnable(regs);
if (device.SupportsDepthTestEnable()) {
UpdateDepthTestEnable(regs);
}
UpdateDepthTestEnable(regs);
UpdateDepthWriteEnable(regs);
UpdateStencilTestEnable(regs);
}

View File

@@ -502,10 +502,6 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
sets_per_pool = 1024;
LOG_INFO(Render_Vulkan, "Qualcomm: forcing {} sets per pool", sets_per_pool);
LOG_WARNING(Render_Vulkan,
"Qualcomm: Disabling broken VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE_EXT");
supports_depth_test_enable = false;
#if defined(ANDROID) && defined(ARCHITECTURE_arm64)
// BCn patching only safe on Android 9+ (API 28+). Older versions crash on driver load.
const auto major = (properties.properties.driverVersion >> 24) << 2;

View File

@@ -607,11 +607,6 @@ public:
return extensions.extended_dynamic_state;
}
/// Returns true if the device supports VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE_EXT.
bool SupportsDepthTestEnable() const {
return supports_depth_test_enable;
}
/// Returns true if the device supports VK_EXT_extended_dynamic_state2.
bool IsExtExtendedDynamicState2Supported() const {
return extensions.extended_dynamic_state2;
@@ -1072,7 +1067,6 @@ private:
bool dynamic_state3_provoking_vertex_mode{};
bool supports_conditional_barriers{}; ///< Allows barriers in conditional control flow.
bool supports_dynamic_state{true}; ///< Core Vulkan 1.0 dynamic states
bool supports_depth_test_enable{true}; ///< Supports VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE_EXT
size_t sampler_heap_budget{}; ///< Sampler budget for buggy drivers (0 = unlimited).
u64 device_access_memory{}; ///< Total size of device local memory in bytes.
u32 sets_per_pool{}; ///< Sets per Description Pool