ac/descriptors: allow to configure DCC for buffer descriptors

This is not used yet.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33284>
This commit is contained in:
Samuel Pitoiset 2025-01-29 05:24:49 -08:00 committed by Marge Bot
parent fe6494559d
commit 5ac72c5f56
2 changed files with 10 additions and 0 deletions

View file

@ -770,6 +770,11 @@ ac_set_buf_desc_word3(const enum amd_gfx_level gfx_level, const struct ac_buffer
S_008F0C_FORMAT_GFX10(fmt->img_format)) |
S_008F0C_OOB_SELECT(state->gfx10_oob_select) |
S_008F0C_RESOURCE_LEVEL(gfx_level < GFX11);
if (gfx_level >= GFX12) {
*rsrc_word3 |= S_008F0C_COMPRESSION_EN(state->gfx12.compression_en) |
S_008F0C_WRITE_COMPRESS_ENABLE(state->gfx12.write_compress_enable);
}
} else {
const struct util_format_description * desc = util_format_description(state->format);
const int first_non_void = util_format_get_first_non_void_channel(state->format);

View file

@ -148,6 +148,11 @@ struct ac_buffer_state {
uint32_t index_stride : 2;
uint32_t add_tid : 1;
uint32_t gfx10_oob_select : 2;
struct {
uint32_t compression_en : 1;
uint32_t write_compress_enable : 1;
} gfx12;
};
void