mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
radv: prevent fast clearing HTILE depth for unrestricted ranges
VK_EXT_depth_range_unrestricted removes the restriction that the clear value must be between 0.0 and 1.0. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10035>
This commit is contained in:
parent
0cfeb93751
commit
269795c838
1 changed files with 5 additions and 0 deletions
|
|
@ -975,6 +975,11 @@ radv_can_fast_clear_depth(struct radv_cmd_buffer *cmd_buffer, const struct radv_
|
||||||
if (!view_mask && clear_rect->layerCount != iview->image->info.array_size)
|
if (!view_mask && clear_rect->layerCount != iview->image->info.array_size)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (cmd_buffer->device->vk.enabled_extensions.EXT_depth_range_unrestricted &&
|
||||||
|
(aspects & VK_IMAGE_ASPECT_DEPTH_BIT) &&
|
||||||
|
(clear_value.depth < 0.0 || clear_value.depth > 1.0))
|
||||||
|
return false;
|
||||||
|
|
||||||
if (((aspects & VK_IMAGE_ASPECT_DEPTH_BIT) && !radv_is_fast_clear_depth_allowed(clear_value)) ||
|
if (((aspects & VK_IMAGE_ASPECT_DEPTH_BIT) && !radv_is_fast_clear_depth_allowed(clear_value)) ||
|
||||||
((aspects & VK_IMAGE_ASPECT_STENCIL_BIT) &&
|
((aspects & VK_IMAGE_ASPECT_STENCIL_BIT) &&
|
||||||
!radv_is_fast_clear_stencil_allowed(clear_value)))
|
!radv_is_fast_clear_stencil_allowed(clear_value)))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue