1 /*
2 * Copyright © 2012-2013 Rob Clark <[email protected]>
3 * SPDX-License-Identifier: MIT
4 *
5 * Authors:
6 * Rob Clark <[email protected]>
7 */
8
9 #ifndef FD2_EMIT_H
10 #define FD2_EMIT_H
11
12 #include "pipe/p_context.h"
13
14 #include "freedreno_context.h"
15
16 struct fd_ringbuffer;
17
18 struct fd2_vertex_buf {
19 unsigned offset, size;
20 struct pipe_resource *prsc;
21 };
22
23 void fd2_emit_vertex_bufs(struct fd_ringbuffer *ring, uint32_t val,
24 struct fd2_vertex_buf *vbufs, uint32_t n);
25 void fd2_emit_state_binning(struct fd_context *ctx,
26 const enum fd_dirty_3d_state dirty) assert_dt;
27 void fd2_emit_state(struct fd_context *ctx,
28 const enum fd_dirty_3d_state dirty) assert_dt;
29 void fd2_emit_restore(struct fd_context *ctx, struct fd_ringbuffer *ring);
30
31 void fd2_emit_init_screen(struct pipe_screen *pscreen);
32 void fd2_emit_init(struct pipe_context *pctx);
33
34 static inline void
fd2_emit_ib(struct fd_ringbuffer * ring,struct fd_ringbuffer * target)35 fd2_emit_ib(struct fd_ringbuffer *ring, struct fd_ringbuffer *target)
36 {
37 __OUT_IB(ring, false, target);
38 }
39
40 #endif /* FD2_EMIT_H */
41