diff options
author | Jianxun Zhang <jianxun.zhang@intel.com> | 2022-11-13 13:21:02 -0800 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-12-14 18:11:13 +0000 |
commit | 9ff471fdc65f215ccd42bfcda682722b5495c833 (patch) | |
tree | 326a1585a4092460c5b42b303326d7757cb388bb | |
parent | 78a4b6deed3d29e2b3c099e0ccfdf68d1e15944d (diff) |
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>
-rw-r--r-- | src/intel/vulkan/anv_allocator.c | 4 | ||||
-rw-r--r-- | src/intel/vulkan/genX_cmd_buffer.c | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index 6ffdd7a24ac..795921d0999 100644 --- a/src/intel/vulkan/anv_allocator.c +++ b/src/intel/vulkan/anv_allocator.c @@ -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; diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 5e5c9989b86..7929c1f535a 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -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; |