anv: Make use of devinfo has_aux_map field
Reworks: * Use device rather than physical_device for info. (Lionel) Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5572>
This commit is contained in:
@@ -2902,7 +2902,7 @@ VkResult anv_CreateDevice(
|
|||||||
goto fail_surface_state_pool;
|
goto fail_surface_state_pool;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (device->info.gen >= 12) {
|
if (device->info.has_aux_map) {
|
||||||
device->aux_map_ctx = gen_aux_map_init(device, &aux_map_allocator,
|
device->aux_map_ctx = gen_aux_map_init(device, &aux_map_allocator,
|
||||||
&physical_device->info);
|
&physical_device->info);
|
||||||
if (!device->aux_map_ctx)
|
if (!device->aux_map_ctx)
|
||||||
@@ -3004,7 +3004,7 @@ VkResult anv_CreateDevice(
|
|||||||
fail_workaround_bo:
|
fail_workaround_bo:
|
||||||
anv_device_release_bo(device, device->workaround_bo);
|
anv_device_release_bo(device, device->workaround_bo);
|
||||||
fail_surface_aux_map_pool:
|
fail_surface_aux_map_pool:
|
||||||
if (device->info.gen >= 12) {
|
if (device->info.has_aux_map) {
|
||||||
gen_aux_map_finish(device->aux_map_ctx);
|
gen_aux_map_finish(device->aux_map_ctx);
|
||||||
device->aux_map_ctx = NULL;
|
device->aux_map_ctx = NULL;
|
||||||
}
|
}
|
||||||
@@ -3076,7 +3076,7 @@ void anv_DestroyDevice(
|
|||||||
if (device->info.gen >= 10)
|
if (device->info.gen >= 10)
|
||||||
anv_device_release_bo(device, device->hiz_clear_bo);
|
anv_device_release_bo(device, device->hiz_clear_bo);
|
||||||
|
|
||||||
if (device->info.gen >= 12) {
|
if (device->info.has_aux_map) {
|
||||||
gen_aux_map_finish(device->aux_map_ctx);
|
gen_aux_map_finish(device->aux_map_ctx);
|
||||||
device->aux_map_ctx = NULL;
|
device->aux_map_ctx = NULL;
|
||||||
}
|
}
|
||||||
|
@@ -1542,6 +1542,7 @@ genX(BeginCommandBuffer)(
|
|||||||
* ensured that we have the table even if this command buffer doesn't
|
* ensured that we have the table even if this command buffer doesn't
|
||||||
* initialize any images.
|
* initialize any images.
|
||||||
*/
|
*/
|
||||||
|
if (cmd_buffer->device->info.has_aux_map)
|
||||||
cmd_buffer->state.pending_pipe_bits |= ANV_PIPE_AUX_TABLE_INVALIDATE_BIT;
|
cmd_buffer->state.pending_pipe_bits |= ANV_PIPE_AUX_TABLE_INVALIDATE_BIT;
|
||||||
|
|
||||||
/* We send an "Indirect State Pointers Disable" packet at
|
/* We send an "Indirect State Pointers Disable" packet at
|
||||||
|
@@ -256,6 +256,7 @@ genX(init_device_state)(struct anv_device *device)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if GEN_GEN == 12
|
#if GEN_GEN == 12
|
||||||
|
if (device->info.has_aux_map) {
|
||||||
uint64_t aux_base_addr = gen_aux_map_get_base(device->aux_map_ctx);
|
uint64_t aux_base_addr = gen_aux_map_get_base(device->aux_map_ctx);
|
||||||
assert(aux_base_addr % (32 * 1024) == 0);
|
assert(aux_base_addr % (32 * 1024) == 0);
|
||||||
anv_batch_emit(&batch, GENX(MI_LOAD_REGISTER_IMM), lri) {
|
anv_batch_emit(&batch, GENX(MI_LOAD_REGISTER_IMM), lri) {
|
||||||
@@ -266,6 +267,7 @@ genX(init_device_state)(struct anv_device *device)
|
|||||||
lri.RegisterOffset = GENX(GFX_AUX_TABLE_BASE_ADDR_num) + 4;
|
lri.RegisterOffset = GENX(GFX_AUX_TABLE_BASE_ADDR_num) + 4;
|
||||||
lri.DataDWord = aux_base_addr >> 32;
|
lri.DataDWord = aux_base_addr >> 32;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Set the "CONSTANT_BUFFER Address Offset Disable" bit, so
|
/* Set the "CONSTANT_BUFFER Address Offset Disable" bit, so
|
||||||
|
Reference in New Issue
Block a user