mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-17 02:18:21 +02:00
vc4: Remove tiling from vc4_surface
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35278>
This commit is contained in:
parent
51bc2e607f
commit
40f3dac716
3 changed files with 12 additions and 12 deletions
|
|
@ -289,9 +289,7 @@ vc4_submit_setup_rcl_surface(struct vc4_job *job,
|
|||
struct pipe_surface *psurf,
|
||||
bool is_depth, bool is_write)
|
||||
{
|
||||
struct vc4_surface *surf = vc4_surface(psurf);
|
||||
|
||||
if (!surf)
|
||||
if (!psurf)
|
||||
return;
|
||||
|
||||
struct vc4_resource *rsc = vc4_resource(psurf->texture);
|
||||
|
|
@ -314,7 +312,7 @@ vc4_submit_setup_rcl_surface(struct vc4_job *job,
|
|||
VC4_LOADSTORE_TILE_BUFFER_FORMAT);
|
||||
}
|
||||
submit_surf->bits |=
|
||||
VC4_SET_FIELD(surf->tiling,
|
||||
VC4_SET_FIELD(vc4_surface_get_tiling(psurf),
|
||||
VC4_LOADSTORE_TILE_BUFFER_TILING);
|
||||
} else {
|
||||
assert(!is_write);
|
||||
|
|
@ -330,9 +328,7 @@ vc4_submit_setup_rcl_render_config_surface(struct vc4_job *job,
|
|||
struct drm_vc4_submit_rcl_surface *submit_surf,
|
||||
struct pipe_surface *psurf)
|
||||
{
|
||||
struct vc4_surface *surf = vc4_surface(psurf);
|
||||
|
||||
if (!surf)
|
||||
if (!psurf)
|
||||
return;
|
||||
|
||||
struct vc4_resource *rsc = vc4_resource(psurf->texture);
|
||||
|
|
@ -341,11 +337,11 @@ vc4_submit_setup_rcl_render_config_surface(struct vc4_job *job,
|
|||
|
||||
if (psurf->texture->nr_samples <= 1) {
|
||||
submit_surf->bits =
|
||||
VC4_SET_FIELD(vc4_rt_format_is_565(surf->base.format) ?
|
||||
VC4_SET_FIELD(vc4_rt_format_is_565(psurf->format) ?
|
||||
VC4_RENDER_CONFIG_FORMAT_BGR565 :
|
||||
VC4_RENDER_CONFIG_FORMAT_RGBA8888,
|
||||
VC4_RENDER_CONFIG_FORMAT) |
|
||||
VC4_SET_FIELD(surf->tiling,
|
||||
VC4_SET_FIELD(vc4_surface_get_tiling(psurf),
|
||||
VC4_RENDER_CONFIG_MEMORY_FORMAT);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -763,7 +763,6 @@ vc4_create_surface(struct pipe_context *pctx,
|
|||
const struct pipe_surface *surf_tmpl)
|
||||
{
|
||||
struct vc4_surface *surface = CALLOC_STRUCT(vc4_surface);
|
||||
struct vc4_resource *rsc = vc4_resource(ptex);
|
||||
|
||||
if (!surface)
|
||||
return NULL;
|
||||
|
|
@ -781,7 +780,6 @@ vc4_create_surface(struct pipe_context *pctx,
|
|||
psurf->level = level;
|
||||
psurf->first_layer = surf_tmpl->first_layer;
|
||||
psurf->last_layer = surf_tmpl->last_layer;
|
||||
surface->tiling = rsc->slices[level].tiling;
|
||||
|
||||
return &surface->base;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ struct vc4_resource_slice {
|
|||
|
||||
struct vc4_surface {
|
||||
struct pipe_surface base;
|
||||
uint8_t tiling;
|
||||
};
|
||||
|
||||
struct vc4_resource {
|
||||
|
|
@ -118,4 +117,11 @@ static inline uint32_t vc4_surface_get_offset(struct pipe_surface *psurf)
|
|||
psurf->first_layer * rsc->cube_map_stride;
|
||||
}
|
||||
|
||||
static inline uint8_t vc4_surface_get_tiling(struct pipe_surface *psurf)
|
||||
{
|
||||
assert(psurf && psurf->texture);
|
||||
struct vc4_resource *rsc = vc4_resource(psurf->texture);
|
||||
return rsc->slices[psurf->level].tiling;
|
||||
}
|
||||
|
||||
#endif /* VC4_RESOURCE_H */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue