mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 00:10:20 +01:00
intel/vulkan: replace AUX macros with interfaces
Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20259>
This commit is contained in:
parent
78a4b6deed
commit
9ff471fdc6
2 changed files with 7 additions and 4 deletions
|
|
@ -1446,7 +1446,9 @@ anv_device_alloc_bo(struct anv_device *device,
|
|||
size = align_u64(size, 64 * 1024);
|
||||
|
||||
/* See anv_bo::_ccs_size */
|
||||
ccs_size = align_u64(DIV_ROUND_UP(size, INTEL_AUX_MAP_GFX12_CCS_SCALE), 4096);
|
||||
uint64_t aux_ratio =
|
||||
intel_aux_get_main_to_aux_ratio(device->aux_map_ctx);
|
||||
ccs_size = align_u64(DIV_ROUND_UP(size, aux_ratio), 4096);
|
||||
}
|
||||
|
||||
uint32_t gem_handle;
|
||||
|
|
|
|||
|
|
@ -543,8 +543,8 @@ anv_image_init_aux_tt(struct anv_cmd_buffer *cmd_buffer,
|
|||
uint64_t address = base_address + offset;
|
||||
|
||||
uint64_t aux_entry_addr64, *aux_entry_map;
|
||||
aux_entry_map = intel_aux_map_get_entry(cmd_buffer->device->aux_map_ctx,
|
||||
address, &aux_entry_addr64);
|
||||
struct intel_aux_map_context *ctx = cmd_buffer->device->aux_map_ctx;
|
||||
aux_entry_map = intel_aux_map_get_entry(ctx, address, &aux_entry_addr64);
|
||||
|
||||
struct anv_address aux_entry_address = {
|
||||
.bo = NULL,
|
||||
|
|
@ -553,7 +553,8 @@ anv_image_init_aux_tt(struct anv_cmd_buffer *cmd_buffer,
|
|||
|
||||
const uint64_t old_aux_entry = READ_ONCE(*aux_entry_map);
|
||||
uint64_t new_aux_entry =
|
||||
(old_aux_entry & INTEL_AUX_MAP_ADDRESS_MASK) | format_bits;
|
||||
(old_aux_entry & intel_aux_get_meta_address_mask(ctx)) |
|
||||
format_bits;
|
||||
|
||||
if (isl_aux_usage_has_ccs(image->planes[plane].aux_usage))
|
||||
new_aux_entry |= INTEL_AUX_MAP_ENTRY_VALID_BIT;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue