Revert "anv/image: Define anv_image_get_aux_addr (v3)"
This reverts commit87dc3106b0
. Fixes:87dc3106b0
"anv/image: Define anv_image_get_aux_addr (v3)" Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3826 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7670>
This commit is contained in:
parent
783b895ec9
commit
802fabdaa4
|
@ -227,13 +227,11 @@ get_blorp_surf_for_anv_image(const struct anv_device *device,
|
||||||
|
|
||||||
if (aux_usage != ISL_AUX_USAGE_NONE) {
|
if (aux_usage != ISL_AUX_USAGE_NONE) {
|
||||||
const struct anv_surface *aux_surface = &image->planes[plane].aux_surface;
|
const struct anv_surface *aux_surface = &image->planes[plane].aux_surface;
|
||||||
const struct anv_address aux_addr = anv_image_get_aux_addr(device, image, plane);
|
|
||||||
|
|
||||||
blorp_surf->aux_surf = &aux_surface->isl,
|
blorp_surf->aux_surf = &aux_surface->isl,
|
||||||
blorp_surf->aux_addr = (struct blorp_address) {
|
blorp_surf->aux_addr = (struct blorp_address) {
|
||||||
.buffer = aux_addr.bo,
|
.buffer = image->planes[plane].address.bo,
|
||||||
.offset = aux_addr.offset,
|
.offset = image->planes[plane].address.offset + aux_surface->offset,
|
||||||
.mocs = anv_mocs(device, aux_addr.bo, 0),
|
.mocs = anv_mocs(device, image->planes[plane].address.bo, 0),
|
||||||
};
|
};
|
||||||
blorp_surf->aux_usage = aux_usage;
|
blorp_surf->aux_usage = aux_usage;
|
||||||
|
|
||||||
|
|
|
@ -1880,7 +1880,8 @@ anv_image_fill_surface_state(struct anv_device *device,
|
||||||
|
|
||||||
struct anv_address aux_address = ANV_NULL_ADDRESS;
|
struct anv_address aux_address = ANV_NULL_ADDRESS;
|
||||||
if (aux_usage != ISL_AUX_USAGE_NONE) {
|
if (aux_usage != ISL_AUX_USAGE_NONE) {
|
||||||
aux_address = anv_image_get_aux_addr(device, image, plane);
|
aux_address = anv_address_add(image->planes[plane].address,
|
||||||
|
aux_surface->offset);
|
||||||
}
|
}
|
||||||
state_inout->aux_address = aux_address;
|
state_inout->aux_address = aux_address;
|
||||||
|
|
||||||
|
|
|
@ -3894,19 +3894,6 @@ anv_image_aux_layers(const struct anv_image * const image,
|
||||||
return MAX2(image->array_size, image->extent.depth >> miplevel);
|
return MAX2(image->array_size, image->extent.depth >> miplevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct anv_address
|
|
||||||
anv_image_get_aux_addr(UNUSED const struct anv_device *device,
|
|
||||||
const struct anv_image *image,
|
|
||||||
uint32_t plane)
|
|
||||||
{
|
|
||||||
const struct anv_image_plane *p = &image->planes[plane];
|
|
||||||
|
|
||||||
if (p->aux_surface.isl.size_B == 0)
|
|
||||||
return ANV_NULL_ADDRESS;
|
|
||||||
|
|
||||||
return anv_address_add(p->address, p->aux_surface.offset);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline struct anv_address
|
static inline struct anv_address
|
||||||
anv_image_get_clear_color_addr(UNUSED const struct anv_device *device,
|
anv_image_get_clear_color_addr(UNUSED const struct anv_device *device,
|
||||||
const struct anv_image *image,
|
const struct anv_image *image,
|
||||||
|
|
|
@ -5087,16 +5087,15 @@ cmd_buffer_emit_depth_stencil(struct anv_cmd_buffer *cmd_buffer)
|
||||||
info.hiz_usage = cmd_buffer->state.attachments[ds].aux_usage;
|
info.hiz_usage = cmd_buffer->state.attachments[ds].aux_usage;
|
||||||
if (info.hiz_usage != ISL_AUX_USAGE_NONE) {
|
if (info.hiz_usage != ISL_AUX_USAGE_NONE) {
|
||||||
assert(isl_aux_usage_has_hiz(info.hiz_usage));
|
assert(isl_aux_usage_has_hiz(info.hiz_usage));
|
||||||
|
|
||||||
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_surf = &image->planes[depth_plane].aux_surface.isl;
|
||||||
|
|
||||||
info.hiz_address =
|
info.hiz_address =
|
||||||
anv_batch_emit_reloc(&cmd_buffer->batch,
|
anv_batch_emit_reloc(&cmd_buffer->batch,
|
||||||
dw + device->isl_dev.ds.hiz_offset / 4,
|
dw + device->isl_dev.ds.hiz_offset / 4,
|
||||||
hiz_addr.bo,
|
image->planes[depth_plane].address.bo,
|
||||||
hiz_addr.offset);
|
image->planes[depth_plane].address.offset +
|
||||||
|
image->planes[depth_plane].aux_surface.offset);
|
||||||
|
|
||||||
info.depth_clear_value = ANV_HZ_FC_VAL;
|
info.depth_clear_value = ANV_HZ_FC_VAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue