xref: /aosp_15_r20/external/mesa3d/src/gallium/drivers/freedreno/a6xx/fd6_blitter.h (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1 /*
2  * Copyright © 2017 Rob Clark <[email protected]>
3  * Copyright © 2018 Google, Inc.
4  * SPDX-License-Identifier: MIT
5  *
6  * Authors:
7  *    Rob Clark <[email protected]>
8  */
9 
10 #ifndef FD6_BLIT_H_
11 #define FD6_BLIT_H_
12 
13 #include "pipe/p_state.h"
14 
15 #include "freedreno_context.h"
16 
17 
18 template <chip CHIP>
19 void fd6_blitter_init(struct pipe_context *pctx);
20 unsigned fd6_tile_mode_for_format(enum pipe_format pfmt);
21 unsigned fd6_tile_mode(const struct pipe_resource *tmpl);
22 
23 /*
24  * Blitter APIs used by gmem for cases that need CP_BLIT's (r2d)
25  * instead of CP_EVENT_WRITE::BLITs
26  */
27 
28 template <chip CHIP>
29 void fd6_clear_lrz(struct fd_batch *batch, struct fd_resource *zsbuf,
30                    struct fd_bo *lrz, double depth) assert_dt;
31 template <chip CHIP>
32 void fd6_clear_surface(struct fd_context *ctx, struct fd_ringbuffer *ring,
33                        struct pipe_surface *psurf, const struct pipe_box *box2d,
34                        union pipe_color_union *color, uint32_t unknown_8c01) assert_dt;
35 template <chip CHIP>
36 void fd6_resolve_tile(struct fd_batch *batch, struct fd_ringbuffer *ring,
37                       uint32_t base, struct pipe_surface *psurf, uint32_t unknown_8c01) assert_dt;
38 
39 #endif /* FD6_BLIT_H_ */
40