Debian Codegraph @

src/gallium/drivers/freedreno/a6xx/fd6_barrier.h

raw symbols SCIP
1 /*
2 * Copyright © 2023 Google, Inc.
3 * SPDX-License-Identifier: MIT
4 */
5
6 #ifndef FD6_BARRIER_H_
7 #define FD6_BARRIER_H_
8
9 #include "freedreno_batch.h"
10 #include "freedreno_context.h"
11 #include "fd6_pack.h"
12
13 /**
14 * Various flush operations that could be needed
15 */
16 enum fd6_flush {
17 FD6_FLUSH_CCU_COLOR = BIT(0),
18 FD6_FLUSH_CCU_DEPTH = BIT(1),
19 FD6_INVALIDATE_CCU_COLOR = BIT(2),
20 FD6_INVALIDATE_CCU_DEPTH = BIT(3),
21 FD6_FLUSH_CACHE = BIT(4),
22 FD6_INVALIDATE_CACHE = BIT(5),
23 FD6_BLIT_CLEAN_CACHE = BIT(6),
24 FD6_INVALIDATE_CCHE = BIT(7),
25
26 FD6_WAIT_MEM_WRITES = BIT(16),
27 FD6_WAIT_FOR_IDLE = BIT(17),
28 FD6_WAIT_FOR_ME = BIT(18),
29 };
30
31 template <chip CHIP>
32 void fd6_emit_flushes(struct fd_context *ctx, fd_cs &cs, unsigned flushes);
33
34 template <chip CHIP>
35 static inline void
36 fd6_barrier_flush(fd_cs &cs, struct fd_batch *batch)
37 {
38 if (!batch->barrier)
39 return;
40 fd6_emit_flushes<CHIP>(batch->ctx, cs, batch->barrier);
41 batch->barrier = 0;
42 }
43
44 void fd6_barrier_init(struct pipe_context *pctx);
45
46 #endif /* FD6_BARRIER_H_ */