ac/surface puts the raw pip_bank_xor there, which needs the extra
shift for the actual tile_swizzle.
(I think long term we should refactor this in ac/surface but for
now lets fix like radeonsi to avoid race conditions.)
CC: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20979>
(cherry picked from commit
b0a9772cc6154e29ba6e3d21a91096dd891ef302)
"description": "radv: Shift left the tile swizzle more on GFX11.",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
tile_swizzle = iview->nbc_view.tile_swizzle;
}
+ tile_swizzle = radv_adjust_tile_swizzle(device->physical_device, tile_swizzle);
+
cb->cb_color_base = va >> 8;
if (device->physical_device->rad_info.gfx_level >= GFX9) {
} else
va += (uint64_t)base_level_info->offset_256B * 256;
+ swizzle = radv_adjust_tile_swizzle(device->physical_device, swizzle);
+
state[0] = va >> 8;
if (gfx_level >= GFX9 || base_level_info->mode == RADEON_SURF_MODE_2D)
state[0] |= swizzle;
if (gfx_level <= GFX8)
meta_va += plane->surface.u.legacy.color.dcc_level[base_level].dcc_offset;
- unsigned dcc_tile_swizzle = plane->surface.tile_swizzle << 8;
+ unsigned dcc_tile_swizzle = swizzle << 8;
dcc_tile_swizzle &= (1 << plane->surface.meta_alignment_log2) - 1;
meta_va |= dcc_tile_swizzle;
} else if (!disable_compression && radv_image_is_tc_compat_htile(image)) {
(pdevice->rad_info.gfx_level == GFX11 && bitsize == 32);
}
+static inline unsigned
+radv_adjust_tile_swizzle(const struct radv_physical_device *dev, unsigned pipe_bank_xor)
+{
+ return pipe_bank_xor << (dev->rad_info.gfx_level >= GFX11 ? 2 : 0);
+}
+
/* radv_perfcounter.c */
void radv_perfcounter_emit_shaders(struct radeon_cmdbuf *cs, unsigned shaders);
void radv_perfcounter_emit_spm_reset(struct radeon_cmdbuf *cs);
(tmz ? 4 : 0)) |
dcc << 19 | (is_v5 ? 0 : 0 /* tiled->buffer.b.b.last_level */) << 20 |
1u << 31);
- radeon_emit(cmd_buffer->cs,
- (uint32_t)tiled_address | (image->planes[0].surface.tile_swizzle << 8));
+ radeon_emit(
+ cmd_buffer->cs,
+ (uint32_t)tiled_address |
+ (radv_adjust_tile_swizzle(device->physical_device, image->planes[0].surface.tile_swizzle)
+ << 8));
radeon_emit(cmd_buffer->cs, (uint32_t)(tiled_address >> 32));
radeon_emit(cmd_buffer->cs, 0);
radeon_emit(cmd_buffer->cs, ((tiled_width - 1) << 16));