mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-21 21:40:22 +01:00
blorp/gen12: Don't use aux address if implicit CCS
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8097>
This commit is contained in:
parent
bb7d627865
commit
4dfabac493
1 changed files with 7 additions and 2 deletions
|
|
@ -1424,8 +1424,13 @@ blorp_emit_surface_state(struct blorp_batch *batch,
|
||||||
/* We can't reinterpret HiZ */
|
/* We can't reinterpret HiZ */
|
||||||
assert(surface->surf.format == surface->view.format);
|
assert(surface->surf.format == surface->view.format);
|
||||||
}
|
}
|
||||||
|
|
||||||
enum isl_aux_usage aux_usage = surface->aux_usage;
|
enum isl_aux_usage aux_usage = surface->aux_usage;
|
||||||
|
|
||||||
|
/* On gen12, implicit CCS has no aux buffer */
|
||||||
|
bool use_aux_address = (aux_usage != ISL_AUX_USAGE_NONE) &&
|
||||||
|
(surface->aux_addr.buffer != NULL);
|
||||||
|
|
||||||
isl_channel_mask_t write_disable_mask = 0;
|
isl_channel_mask_t write_disable_mask = 0;
|
||||||
if (is_render_target && GEN_GEN <= 5) {
|
if (is_render_target && GEN_GEN <= 5) {
|
||||||
if (color_write_disables[0])
|
if (color_write_disables[0])
|
||||||
|
|
@ -1446,7 +1451,7 @@ blorp_emit_surface_state(struct blorp_batch *batch,
|
||||||
.aux_surf = &surface->aux_surf, .aux_usage = aux_usage,
|
.aux_surf = &surface->aux_surf, .aux_usage = aux_usage,
|
||||||
.address =
|
.address =
|
||||||
blorp_get_surface_address(batch, surface->addr),
|
blorp_get_surface_address(batch, surface->addr),
|
||||||
.aux_address = aux_usage == ISL_AUX_USAGE_NONE ? 0 :
|
.aux_address = use_aux_address ? 0 :
|
||||||
blorp_get_surface_address(batch, surface->aux_addr),
|
blorp_get_surface_address(batch, surface->aux_addr),
|
||||||
.clear_address = !use_clear_address ? 0 :
|
.clear_address = !use_clear_address ? 0 :
|
||||||
blorp_get_surface_address(batch,
|
blorp_get_surface_address(batch,
|
||||||
|
|
@ -1459,7 +1464,7 @@ blorp_emit_surface_state(struct blorp_batch *batch,
|
||||||
blorp_surface_reloc(batch, state_offset + isl_dev->ss.addr_offset,
|
blorp_surface_reloc(batch, state_offset + isl_dev->ss.addr_offset,
|
||||||
surface->addr, 0);
|
surface->addr, 0);
|
||||||
|
|
||||||
if (aux_usage != ISL_AUX_USAGE_NONE) {
|
if (use_aux_address) {
|
||||||
/* On gen7 and prior, the bottom 12 bits of the MCS base address are
|
/* On gen7 and prior, the bottom 12 bits of the MCS base address are
|
||||||
* used to store other information. This should be ok, however, because
|
* used to store other information. This should be ok, however, because
|
||||||
* surface buffer addresses are always 4K page alinged.
|
* surface buffer addresses are always 4K page alinged.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue