unsigned first_layer = pview->u.tex.first_layer;
unsigned last_layer = pview->u.tex.last_layer;
+ /* Lower-bit is set when sampling from colour AFBC */
+ bool is_afbc = rsrc->bo->layout == PAN_AFBC;
+ bool is_zs = rsrc->base.bind & PIPE_BIND_DEPTH_STENCIL;
+ unsigned afbc_bit = (is_afbc && !is_zs) ? 1 : 0;
+
/* Inject the addresses in, interleaving mip levels, cube faces, and
* strides in that order */
for (unsigned l = first_level; l <= last_level; ++l) {
for (unsigned f = first_layer; f <= last_layer; ++f) {
+
view->hw.payload[idx++] =
- panfrost_get_texture_address(rsrc, l, f);
+ panfrost_get_texture_address(rsrc, l, f) + afbc_bit;
if (has_manual_stride) {
view->hw.payload[idx++] =
unsigned level_offset = rsrc->bo->slices[level].offset;
unsigned face_offset = face * rsrc->bo->cubemap_stride;
- /* Lower-bit is set when sampling from colour AFBC */
- bool is_afbc = rsrc->bo->layout == PAN_AFBC;
- bool is_zs = rsrc->base.bind & PIPE_BIND_DEPTH_STENCIL;
- unsigned afbc_bit = (is_afbc && !is_zs) ? 1 : 0;
-
- return rsrc->bo->gpu + level_offset + face_offset + afbc_bit;
+ return rsrc->bo->gpu + level_offset + face_offset;
}
static void