This was getting in the way of UBWC mipmap handling.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3059>
prsc->last_level + 1, prsc->array_size,
prsc->target == PIPE_TEXTURE_3D, false);
- /* The caller does this bit of layout setup again. */
- if (rsc->layout.layer_first)
- return rsc->layout.size / prsc->array_size;
- else
- return rsc->layout.size;
+ return rsc->layout.size;
}
return prsc;
}
- if (rsc->layout.layer_first) {
+ /* Set the layer size if the (non-a6xx) backend hasn't done so. */
+ if (rsc->layout.layer_first && !rsc->layout.layer_size) {
rsc->layout.layer_size = align(size, 4096);
size = rsc->layout.layer_size * prsc->array_size;
}