freedreno/a7xx: fix fd_lrzfc_layout

Various vkd3d-proton tests run via Turnip exposed an issue with the
a7xx-specific instantiation of the fd_lrzfc_layout struct used to allocate
memory for LRZ fast-clear operations.

The correct layout is quite bigger in size, and the duplicated FC buffers
are positioned at the beginning and the end of it. Smaller part of the area
in the middle is used for metadata, but it already seems to be used more
extensively than how we currently understand it.

Fixes in vkd3d-proton on tu/a750:
  test_clear_depth_stencil_view
  test_copy_texture
  test_early_depth_stencil_tests

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33080>
This commit is contained in:
Zan Dobersek 2025-01-17 09:22:12 +01:00 committed by Marge Bot
parent aae9a2c399
commit 0cf29bf0ce
2 changed files with 6 additions and 4 deletions

View file

@ -1,6 +1,3 @@
test_clear_depth_stencil_view,Fail
test_copy_texture,Fail
test_early_depth_stencil_tests,Fail
test_index_buffer_edge_case_stream_output,Fail
test_multisample_resolve_strongly_typed,Fail
test_primitive_restart_list_topology_stream_output,Fail

View file

@ -78,11 +78,12 @@ struct PACKED fd_lrzfc_layout<A7XX> {
union {
struct {
enum fd_lrz_gpu_dir dir_track;
uint8_t _pad_;
uint8_t _padding0;
uint32_t gras_lrz_depth_view;
};
uint8_t metadata[512];
};
uint8_t _padding1[1536];
union {
struct {
uint8_t fc2_a[FC_SIZE];
@ -92,4 +93,8 @@ struct PACKED fd_lrzfc_layout<A7XX> {
};
};
static_assert(sizeof(fd_lrzfc_layout<A7XX>) == 0x1800);
static_assert(offsetof(fd_lrzfc_layout<A7XX>, fc1) == 0x0);
static_assert(offsetof(fd_lrzfc_layout<A7XX>, fc2) == 0x1000);
#endif