xref: /aosp_15_r20/external/mesa3d/src/gallium/drivers/freedreno/a3xx/fd3_context.h (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1 /*
2  * Copyright © 2013 Rob Clark <[email protected]>
3  * SPDX-License-Identifier: MIT
4  *
5  * Authors:
6  *    Rob Clark <[email protected]>
7  */
8 
9 #ifndef FD3_CONTEXT_H_
10 #define FD3_CONTEXT_H_
11 
12 #include "util/u_upload_mgr.h"
13 
14 #include "freedreno_context.h"
15 
16 #include "ir3/ir3_shader.h"
17 
18 struct fd3_context {
19    struct fd_context base;
20 
21    struct fd_bo *vs_pvt_mem, *fs_pvt_mem;
22 
23    /* This only needs to be 4 * num_of_pipes bytes (ie. 32 bytes).  We
24     * could combine it with another allocation.
25     */
26    struct fd_bo *vsc_size_mem;
27 
28    struct u_upload_mgr *border_color_uploader;
29    struct pipe_resource *border_color_buf;
30 
31    /* storage for ctx->last.key: */
32    struct ir3_shader_key last_key;
33 };
34 
35 static inline struct fd3_context *
fd3_context(struct fd_context * ctx)36 fd3_context(struct fd_context *ctx)
37 {
38    return (struct fd3_context *)ctx;
39 }
40 
41 struct pipe_context *fd3_context_create(struct pipe_screen *pscreen, void *priv,
42                                         unsigned flags);
43 
44 #endif /* FD3_CONTEXT_H_ */
45