panvk: fix depth bias calculation

We don't need to multiply the depth bias constant by 2.0. This brings
panvk in line with other vulkan implementations (like asahi and nvk)
and fixes the one failing CTS test while still passing the other
CTS depth_bias tests.

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32358>
This commit is contained in:
Eric R. Smith 2024-11-26 19:52:37 -04:00 committed by Marge Bot
parent e1a8fd80d4
commit 5bc4d33fa5
4 changed files with 2 additions and 5 deletions

View file

@ -2748,8 +2748,6 @@ dEQP-VK.renderpass2.suballocation.subpass_dependencies.late_fragment_tests.rende
dEQP-VK.spirv_assembly.instruction.graphics.cross_stage.basic_type.no_perspective,Fail
dEQP-VK.spirv_assembly.instruction.graphics.cross_stage.interface_blocks.no_perspective,Fail
dEQP-VK.rasterization.depth_bias.d32_sfloat,Fail
# New with vk_clear
dEQP-VK.api.copy_and_blit.dedicated_allocation.resolve_image.whole_copy_before_resolving_no_cab.4_bit,Fail
dEQP-VK.api.copy_and_blit.dedicated_allocation.resolve_image.copy_with_regions_before_resolving.4_bit,Fail

View file

@ -321,7 +321,6 @@ dEQP-VK.renderpass2.suballocation.subpass_dependencies.late_fragment_tests.rende
dEQP-VK.spirv_assembly.instruction.graphics.cross_stage.basic_type.no_perspective,Fail
dEQP-VK.spirv_assembly.instruction.graphics.cross_stage.interface_blocks.no_perspective,Fail
dEQP-VK.rasterization.depth_bias.d32_sfloat,Fail
dEQP-VK.rasterization.flatshading.line_strip,Fail
dEQP-VK.rasterization.flatshading.line_strip_wide,Fail
dEQP-VK.rasterization.flatshading.lines,Fail

View file

@ -1370,7 +1370,7 @@ prepare_ds(struct panvk_cmd_buffer *cmdbuf)
cfg.depth_bias_enable = rs->depth_bias.enable;
cfg.depth_function = test_z ? translate_compare_func(ds->depth.compare_op)
: MALI_FUNC_ALWAYS;
cfg.depth_units = rs->depth_bias.constant * 2.0f;
cfg.depth_units = rs->depth_bias.constant;
cfg.depth_factor = rs->depth_bias.slope;
cfg.depth_bias_clamp = rs->depth_bias.clamp;
}

View file

@ -424,7 +424,7 @@ panvk_draw_prepare_fs_rsd(struct panvk_cmd_buffer *cmdbuf,
cfg.stencil_mask_misc.single_sampled_lines =
dyns->ms.rasterization_samples <= 1;
cfg.depth_units = rs->depth_bias.constant * 2.0f;
cfg.depth_units = rs->depth_bias.constant;
cfg.depth_factor = rs->depth_bias.slope;
cfg.depth_bias_clamp = rs->depth_bias.clamp;