This will allow MSAA to route through.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5782>
so->base.u.tex.last_level,
so->base.u.tex.first_layer,
so->base.u.tex.last_layer,
+ texture->nr_samples,
prsrc->cubemap_stride,
panfrost_translate_swizzle_4(composed_swizzle),
prsrc->bo->gpu,
so->base.u.tex.last_level,
so->base.u.tex.first_layer,
so->base.u.tex.last_layer,
+ texture->nr_samples,
prsrc->cubemap_stride,
panfrost_translate_swizzle_4(user_swizzle),
prsrc->bo->gpu,
assert(surf->u.tex.last_layer == first_layer);
int stride = rsrc->slices[level].stride;
- mali_ptr base = panfrost_get_texture_address(rsrc, level, first_layer);
+ mali_ptr base = panfrost_get_texture_address(rsrc, level, first_layer, 0);
rt->format = panfrost_mfbd_format(surf);
unsigned first_layer = surf->u.tex.first_layer;
assert(surf->u.tex.last_layer == first_layer);
- mali_ptr base = panfrost_get_texture_address(rsrc, level, first_layer);
+ mali_ptr base = panfrost_get_texture_address(rsrc, level, first_layer, 0);
if (rsrc->layout == MALI_TEXTURE_AFBC) {
/* The only Z/S format we can compress is Z24S8 or variants
struct panfrost_resource *stencil = rsrc->separate_stencil;
struct panfrost_slice stencil_slice = stencil->slices[level];
- fbx->ds_linear.stencil = panfrost_get_texture_address(stencil, level, first_layer);
+ fbx->ds_linear.stencil = panfrost_get_texture_address(stencil, level, first_layer, 0);
fbx->ds_linear.stencil_stride = stencil_slice.stride;
}
mali_ptr
panfrost_get_texture_address(
struct panfrost_resource *rsrc,
- unsigned level, unsigned face)
+ unsigned level, unsigned face, unsigned sample)
{
bool is_3d = rsrc->base.target == PIPE_TEXTURE_3D;
- return rsrc->bo->gpu + panfrost_texture_offset(rsrc->slices, is_3d, rsrc->cubemap_stride, level, face);
+ return rsrc->bo->gpu + panfrost_texture_offset(rsrc->slices, is_3d, rsrc->cubemap_stride, level, face, sample);
}
/* Given a resource that has already been allocated, hint that it should use a
mali_ptr
panfrost_get_texture_address(
struct panfrost_resource *rsrc,
- unsigned level, unsigned face);
+ unsigned level, unsigned face, unsigned sample);
void panfrost_resource_screen_init(struct pipe_screen *screen);
assert(surf->u.tex.last_layer == first_layer);
signed stride = rsrc->slices[level].stride;
- mali_ptr base = panfrost_get_texture_address(rsrc, level, first_layer);
+ mali_ptr base = panfrost_get_texture_address(rsrc, level, first_layer, 0);
fb->format = panfrost_sfbd_format(surf);
unsigned width, unsigned height,
unsigned first_level, unsigned last_level,
unsigned first_layer, unsigned last_layer,
+ unsigned nr_samples,
unsigned cube_stride,
bool manual_stride,
mali_ptr base,
enum mali_texture_layout layout,
unsigned first_level, unsigned last_level,
unsigned first_layer, unsigned last_layer,
+ unsigned nr_samples,
unsigned cube_stride,
unsigned swizzle,
mali_ptr base,
width, height,
first_level, last_level,
first_layer, last_layer,
+ nr_samples,
cube_stride,
manual_stride,
base,
enum mali_texture_layout layout,
unsigned first_level, unsigned last_level,
unsigned first_layer, unsigned last_layer,
+ unsigned nr_samples,
unsigned cube_stride,
unsigned swizzle,
mali_ptr base,
width, height,
first_level, last_level,
first_layer, last_layer,
+ nr_samples,
cube_stride,
true, /* Stride explicit on Bifrost */
base,
* the base address of a texture to get the address to that level/face */
unsigned
-panfrost_texture_offset(struct panfrost_slice *slices, bool is_3d, unsigned cube_stride, unsigned level, unsigned face)
+panfrost_texture_offset(struct panfrost_slice *slices, bool is_3d, unsigned cube_stride, unsigned level, unsigned face, unsigned sample)
{
unsigned layer_stride = panfrost_get_layer_stride(slices, is_3d, cube_stride, level);
- return slices[level].offset + (face * layer_stride);
+ return slices[level].offset + (face * layer_stride) + (sample * slices[level].size0);
}
enum mali_texture_layout layout,
unsigned first_level, unsigned last_level,
unsigned first_layer, unsigned last_layer,
+ unsigned nr_samples,
unsigned cube_stride,
unsigned swizzle,
mali_ptr base,
enum mali_texture_layout layout,
unsigned first_level, unsigned last_level,
unsigned first_layer, unsigned last_layer,
+ unsigned nr_samples,
unsigned cube_stride,
unsigned swizzle,
mali_ptr base,
panfrost_get_layer_stride(struct panfrost_slice *slices, bool is_3d, unsigned cube_stride, unsigned level);
unsigned
-panfrost_texture_offset(struct panfrost_slice *slices, bool is_3d, unsigned cube_stride, unsigned level, unsigned face);
+panfrost_texture_offset(struct panfrost_slice *slices, bool is_3d, unsigned cube_stride, unsigned level, unsigned face, unsigned sample);
/* Formats */