From 67ed899cd6015c02331a6dee824204cbe2a8215c Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 13 Sep 2023 08:37:22 +0200 Subject: [PATCH] radv: remove absolute_depth_bias workaround This was only used with Path of Exile and the game bug seems fixed. Signed-off-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_cmd_buffer.c | 4 +--- src/amd/vulkan/radv_instance.c | 3 --- src/amd/vulkan/radv_private.h | 1 - src/util/driconf.h | 4 ---- 4 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index b8a688a37da..f6f99c86aa1 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -2109,15 +2109,13 @@ radv_emit_depth_bounds(struct radv_cmd_buffer *cmd_buffer) static void radv_emit_depth_bias(struct radv_cmd_buffer *cmd_buffer) { - const struct radv_device *device = cmd_buffer->device; const struct radv_dynamic_state *d = &cmd_buffer->state.dynamic; struct radv_rendering_state *render = &cmd_buffer->state.render; unsigned slope = fui(d->vk.rs.depth_bias.slope * 16.0f); unsigned pa_su_poly_offset_db_fmt_cntl = 0; if (vk_format_has_depth(render->ds_att.format) && - d->vk.rs.depth_bias.representation != VK_DEPTH_BIAS_REPRESENTATION_FLOAT_EXT && - !device->instance->absolute_depth_bias) { + d->vk.rs.depth_bias.representation != VK_DEPTH_BIAS_REPRESENTATION_FLOAT_EXT) { VkFormat format = vk_format_depth_only(render->ds_att.format); if (format == VK_FORMAT_D16_UNORM) { diff --git a/src/amd/vulkan/radv_instance.c b/src/amd/vulkan/radv_instance.c index d31a719198b..b0b593dd43e 100644 --- a/src/amd/vulkan/radv_instance.c +++ b/src/amd/vulkan/radv_instance.c @@ -128,7 +128,6 @@ static const driOptionDescription radv_dri_options[] = { DRI_CONF_RADV_ENABLE_MRT_OUTPUT_NAN_FIXUP(false) DRI_CONF_RADV_DISABLE_SHRINK_IMAGE_STORE(false) DRI_CONF_RADV_NO_DYNAMIC_BOUNDS(false) - DRI_CONF_RADV_ABSOLUTE_DEPTH_BIAS(false) DRI_CONF_RADV_OVERRIDE_UNIFORM_OFFSET_ALIGNMENT(0) DRI_CONF_SECTION_END @@ -169,8 +168,6 @@ radv_init_dri_options(struct radv_instance *instance) instance->disable_shrink_image_store = driQueryOptionb(&instance->dri_options, "radv_disable_shrink_image_store"); - instance->absolute_depth_bias = driQueryOptionb(&instance->dri_options, "radv_absolute_depth_bias"); - instance->disable_tc_compat_htile_in_general = driQueryOptionb(&instance->dri_options, "radv_disable_tc_compat_htile_general"); diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index caa32e0314a..fd96218259e 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -404,7 +404,6 @@ struct radv_instance { bool enable_mrt_output_nan_fixup; bool disable_tc_compat_htile_in_general; bool disable_shrink_image_store; - bool absolute_depth_bias; bool disable_aniso_single_level; bool zero_vram; bool disable_sinking_load_input_fs; diff --git a/src/util/driconf.h b/src/util/driconf.h index 3c598c96d66..b8dbdae4486 100644 --- a/src/util/driconf.h +++ b/src/util/driconf.h @@ -597,10 +597,6 @@ DRI_CONF_OPT_B(radv_disable_shrink_image_store, def, \ "Disabling shrinking of image stores based on the format") -#define DRI_CONF_RADV_ABSOLUTE_DEPTH_BIAS(def) \ - DRI_CONF_OPT_B(radv_absolute_depth_bias, def, \ - "Consider depthBiasConstantFactor an absolute depth bias (like D3D9)") - #define DRI_CONF_RADV_OVERRIDE_UNIFORM_OFFSET_ALIGNMENT(def) \ DRI_CONF_OPT_I(radv_override_uniform_offset_alignment, def, 0, 128, \ "Override the minUniformBufferOffsetAlignment exposed to the application. (0 = default)")