amd/addrlib: expose DCC address equations to drivers

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003>
This commit is contained in:
Marek Olšák
2021-03-19 15:51:36 -04:00
committed by Marge Bot
parent 8771d45a74
commit df2cbdd2e3
3 changed files with 126 additions and 1 deletions
+29
View File
@@ -3394,6 +3394,35 @@ typedef struct _ADDR2_COMPUTE_DCCINFO_OUTPUT
};
ADDR2_META_MIP_INFO* pMipInfo; ///< DCC mip information
/* The equation for doing DCC address computations in shaders. */
union {
/* This is chip-specific, and it varies with:
* - resource type
* - swizzle_mode
* - bpp
* - number of fragments
* - pipe_aligned
* - rb_aligned
*/
struct {
UINT_8 num_bits;
struct {
struct {
UINT_8 dim; /* 0..4 as index, 5 means invalid */
UINT_8 ord; /* 0..31 */
} coord[8]; /* 0..num_coords */
} bit[32]; /* 0..num_bits */
UINT_8 numPipeBits;
} gfx9;
/* This is chip-specific, it requires 64KB_R_X, and it varies with:
* - bpp
* - pipe_aligned
*/
UINT_16 *gfx10_bits; /* 68 2-byte elements */
} equation;
} ADDR2_COMPUTE_DCCINFO_OUTPUT;
/**