mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 10:20:09 +01:00
freedreno/a6xx: Cleanup setup_slices()
We don't need to runtime dispatch btwn a6xx and a7xx versions of setup_lrz(). Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30649>
This commit is contained in:
parent
a127a78548
commit
a5b103e4c1
3 changed files with 7 additions and 8 deletions
|
|
@ -294,14 +294,14 @@ setup_lrz(struct fd_resource *rsc)
|
|||
rsc->lrz = fd_bo_new(screen->dev, lrz_size, FD_BO_NOMAP, "lrz");
|
||||
}
|
||||
|
||||
template <chip CHIP>
|
||||
static uint32_t
|
||||
fd6_setup_slices(struct fd_resource *rsc)
|
||||
{
|
||||
struct pipe_resource *prsc = &rsc->b.b;
|
||||
struct fd_screen *screen = fd_screen(prsc->screen);
|
||||
|
||||
if (!FD_DBG(NOLRZ) && has_depth(prsc->format) && !is_z32(prsc->format))
|
||||
FD_CALLX(screen->info, setup_lrz)(rsc);
|
||||
setup_lrz<CHIP>(rsc);
|
||||
|
||||
if (rsc->layout.ubwc && !ok_ubwc_format(prsc->screen, prsc->format))
|
||||
rsc->layout.ubwc = false;
|
||||
|
|
@ -387,12 +387,14 @@ fd6_is_format_supported(struct pipe_screen *pscreen,
|
|||
}
|
||||
}
|
||||
|
||||
template <chip CHIP>
|
||||
void
|
||||
fd6_resource_screen_init(struct pipe_screen *pscreen)
|
||||
{
|
||||
struct fd_screen *screen = fd_screen(pscreen);
|
||||
|
||||
screen->setup_slices = fd6_setup_slices;
|
||||
screen->setup_slices = fd6_setup_slices<CHIP>;
|
||||
screen->layout_resource_for_modifier = fd6_layout_resource_for_modifier;
|
||||
screen->is_format_supported = fd6_is_format_supported;
|
||||
}
|
||||
FD_GENX(fd6_resource_screen_init);
|
||||
|
|
|
|||
|
|
@ -36,8 +36,6 @@ enum fd6_format_status {
|
|||
DEMOTE_TO_TILED,
|
||||
};
|
||||
|
||||
BEGINC;
|
||||
|
||||
enum fd6_format_status fd6_check_valid_format(struct fd_resource *rsc,
|
||||
enum pipe_format format);
|
||||
void fd6_validate_format(struct fd_context *ctx, struct fd_resource *rsc,
|
||||
|
|
@ -51,8 +49,7 @@ fd6_assert_valid_format(struct fd_resource *rsc, enum pipe_format format)
|
|||
|
||||
void fd6_emit_flag_reference(struct fd_ringbuffer *ring,
|
||||
struct fd_resource *rsc, int level, int layer);
|
||||
template <chip CHIP>
|
||||
void fd6_resource_screen_init(struct pipe_screen *pscreen);
|
||||
|
||||
ENDC;
|
||||
|
||||
#endif /* FD6_RESOURCE_H_ */
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ fd6_screen_init(struct pipe_screen *pscreen)
|
|||
|
||||
screen->tile_mode = fd6_tile_mode;
|
||||
|
||||
fd6_resource_screen_init(pscreen);
|
||||
FD_CALLX(screen->info, fd6_resource_screen_init)(pscreen);
|
||||
fd6_emit_init_screen(pscreen);
|
||||
ir3_screen_init(pscreen);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue