freedreno: Add enum for fd_lrzfc_layout::dir_track values

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30513>
This commit is contained in:
Danylo Piliaiev 2024-08-05 12:47:02 +02:00 committed by Marge Bot
parent 3135f76331
commit 1fcbd720fc

View file

@ -8,6 +8,30 @@
#include "adreno_common.xml.h"
enum fd_lrz_gpu_dir : uint8_t {
FD_LRZ_GPU_DIR_DISABLED = 0,
FD_LRZ_GPU_DIR_LESS = 1,
FD_LRZ_GPU_DIR_GREATER = 2,
FD_LRZ_GPU_DIR_NOT_SET = 3,
};
UNUSED static const char *
fd_lrz_gpu_dir_to_str(enum fd_lrz_gpu_dir dir)
{
switch (dir) {
case FD_LRZ_GPU_DIR_DISABLED:
return "DISABLED";
case FD_LRZ_GPU_DIR_LESS:
return "DIR_LESS";
case FD_LRZ_GPU_DIR_GREATER:
return "DIR_GREATER";
case FD_LRZ_GPU_DIR_NOT_SET:
return "DIR_NOT_SET";
default:
return "INVALID";
}
}
/* Layout of LRZ fast-clear buffer templated on the generation, the
* members are as follows:
* - fc1: The first FC buffer, always present. This may contain multiple
@ -30,7 +54,7 @@ struct PACKED fd_lrzfc_layout<A6XX> {
uint8_t fc1[FC_SIZE];
union {
struct {
uint8_t dir_track;
enum fd_lrz_gpu_dir dir_track;
uint8_t _pad_;
uint32_t gras_lrz_depth_view;
};
@ -51,7 +75,14 @@ struct PACKED fd_lrzfc_layout<A7XX> {
};
uint8_t fc1[FC_SIZE * 2];
};
uint8_t metadata[512];
union {
struct {
enum fd_lrz_gpu_dir dir_track;
uint8_t _pad_;
uint32_t gras_lrz_depth_view;
};
uint8_t metadata[512];
};
union {
struct {
uint8_t fc2_a[FC_SIZE];