radv: remove absolute_depth_bias workaround
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 13 Sep 2023 06:37:22 +0000 (08:37 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 19 Sep 2023 07:53:51 +0000 (07:53 +0000)
This was only used with Path of Exile and the game bug seems fixed.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25198>

src/amd/vulkan/radv_cmd_buffer.c
src/amd/vulkan/radv_instance.c
src/amd/vulkan/radv_private.h
src/util/driconf.h

index b8a688a..f6f99c8 100644 (file)
@@ -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) {
index d31a719..b0b593d 100644 (file)
@@ -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");
 
index caa32e0..fd96218 100644 (file)
@@ -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;
index 3c598c9..b8dbdae 100644 (file)
    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)")