mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-23 15:30:09 +00:00
radv: remove unused fast depth-stencil gfx clear path with expclear
This has never been used because it requires to know the previous clear values which is not really possible in Vulkan. 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/12326>
This commit is contained in:
parent
8bb9e9e76f
commit
98d10eed48
@ -53,7 +53,7 @@
|
||||
#define MAX_INLINE_UNIFORM_BLOCK_COUNT 64
|
||||
#define MAX_BIND_POINTS 3 /* compute + graphics + raytracing */
|
||||
|
||||
#define NUM_DEPTH_CLEAR_PIPELINES 3
|
||||
#define NUM_DEPTH_CLEAR_PIPELINES 2
|
||||
#define NUM_DEPTH_DECOMPRESS_PIPELINES 3
|
||||
|
||||
/*
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "util/format_rgb9e5.h"
|
||||
#include "vk_format.h"
|
||||
|
||||
enum { DEPTH_CLEAR_SLOW, DEPTH_CLEAR_FAST_EXPCLEAR, DEPTH_CLEAR_FAST_NO_EXPCLEAR };
|
||||
enum { DEPTH_CLEAR_SLOW, DEPTH_CLEAR_FAST };
|
||||
|
||||
static void
|
||||
build_color_shaders(struct nir_shader **out_vs, struct nir_shader **out_fs, uint32_t frag_output)
|
||||
@ -636,11 +636,11 @@ create_depthstencil_pipeline(struct radv_device *device, VkImageAspectFlags aspe
|
||||
|
||||
if (aspects & VK_IMAGE_ASPECT_DEPTH_BIT) {
|
||||
extra.db_depth_clear = index == DEPTH_CLEAR_SLOW ? false : true;
|
||||
extra.db_depth_disable_expclear = index == DEPTH_CLEAR_FAST_NO_EXPCLEAR ? true : false;
|
||||
extra.db_depth_disable_expclear = index == DEPTH_CLEAR_FAST ? true : false;
|
||||
}
|
||||
if (aspects & VK_IMAGE_ASPECT_STENCIL_BIT) {
|
||||
extra.db_stencil_clear = index == DEPTH_CLEAR_SLOW ? false : true;
|
||||
extra.db_stencil_disable_expclear = index == DEPTH_CLEAR_FAST_NO_EXPCLEAR ? true : false;
|
||||
extra.db_stencil_disable_expclear = index == DEPTH_CLEAR_FAST ? true : false;
|
||||
}
|
||||
result =
|
||||
create_pipeline(device, radv_render_pass_from_handle(render_pass), samples, vs_nir, fs_nir,
|
||||
@ -688,15 +688,9 @@ pick_depthstencil_pipeline(struct radv_cmd_buffer *cmd_buffer, struct radv_meta_
|
||||
bool fast = depth_view_can_fast_clear(cmd_buffer, iview, aspects, layout, in_render_loop,
|
||||
clear_rect, clear_value);
|
||||
bool unrestricted = cmd_buffer->device->vk.enabled_extensions.EXT_depth_range_unrestricted;
|
||||
int index = DEPTH_CLEAR_SLOW;
|
||||
int index = fast ? DEPTH_CLEAR_FAST : DEPTH_CLEAR_SLOW;
|
||||
VkPipeline *pipeline;
|
||||
|
||||
if (fast) {
|
||||
/* we don't know the previous clear values, so we always have
|
||||
* the NO_EXPCLEAR path */
|
||||
index = DEPTH_CLEAR_FAST_NO_EXPCLEAR;
|
||||
}
|
||||
|
||||
switch (aspects) {
|
||||
case VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT:
|
||||
pipeline = unrestricted
|
||||
|
Loading…
Reference in New Issue
Block a user