anv/image: Define anv_image_get_aux_addr (v3)
Simple refactor. No intended change in behavior. Replace each derivation of aux address with anv_image_get_aux_addr(). The function will soon do more in support of VK_EXT_image_drm_format_modifier, where the image bo and aux bo may be disjoint. v2: - Replace param 'aspect' with 'plane'. v3: - Workaround for stencil ccs. If no aux surface, then return ANV_NULL_ADDRESS. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (v2) Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (v3)
This commit is contained in:
@@ -5087,15 +5087,16 @@ cmd_buffer_emit_depth_stencil(struct anv_cmd_buffer *cmd_buffer)
|
||||
info.hiz_usage = cmd_buffer->state.attachments[ds].aux_usage;
|
||||
if (info.hiz_usage != ISL_AUX_USAGE_NONE) {
|
||||
assert(isl_aux_usage_has_hiz(info.hiz_usage));
|
||||
info.hiz_surf = &image->planes[depth_plane].aux_surface.isl;
|
||||
|
||||
struct anv_address hiz_addr =
|
||||
anv_image_get_aux_addr(device, image, depth_plane);
|
||||
|
||||
info.hiz_surf = &image->planes[depth_plane].aux_surface.isl;
|
||||
info.hiz_address =
|
||||
anv_batch_emit_reloc(&cmd_buffer->batch,
|
||||
dw + device->isl_dev.ds.hiz_offset / 4,
|
||||
image->planes[depth_plane].address.bo,
|
||||
image->planes[depth_plane].address.offset +
|
||||
image->planes[depth_plane].aux_surface.offset);
|
||||
|
||||
hiz_addr.bo,
|
||||
hiz_addr.offset);
|
||||
info.depth_clear_value = ANV_HZ_FC_VAL;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user