mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 13:40:16 +01:00
anv: Support 1MB AUX mapping (MTL)
Replace the hardcoded 64KB granularity with a value provided by AUX module that returns either 64KB(TGL) or 1MB(MTL) of the running system. Signed-off-by: Zhang, Jianxun <jianxun.zhang@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23002>
This commit is contained in:
parent
a98f246857
commit
d2b6f16145
1 changed files with 8 additions and 4 deletions
|
|
@ -412,12 +412,16 @@ anv_image_init_aux_tt(struct anv_cmd_buffer *cmd_buffer,
|
|||
end_offset_B = MAX2(end_offset_B, slice_end_offset_B);
|
||||
}
|
||||
|
||||
/* Aux operates 64K at a time */
|
||||
start_offset_B = ROUND_DOWN_TO(start_offset_B, 64 * 1024);
|
||||
end_offset_B = align64(end_offset_B, 64 * 1024);
|
||||
struct intel_aux_map_context *ctx = cmd_buffer->device->aux_map_ctx;
|
||||
/* It depends on what the purpose you use that figure from AUX module,
|
||||
* alignment, page size of main surface, or actually granularity...
|
||||
*/
|
||||
uint64_t main_page_size = intel_aux_map_get_alignment(ctx);
|
||||
start_offset_B = ROUND_DOWN_TO(start_offset_B, main_page_size);
|
||||
end_offset_B = align64(end_offset_B, main_page_size);
|
||||
|
||||
for (uint64_t offset = start_offset_B;
|
||||
offset < end_offset_B; offset += 64 * 1024) {
|
||||
offset < end_offset_B; offset += main_page_size) {
|
||||
uint64_t address = base_address + offset;
|
||||
|
||||
uint64_t aux_entry_addr64, *aux_entry_map;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue