diff options
author | Rob Clark <[email protected]> | 2016-08-13 11:39:25 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2016-08-13 13:59:03 -0400 |
commit | 561fd226d421b8d6505b80bcb6c3d90fd3c9a007 (patch) | |
tree | dd338e4245f42ccc2c9c60885177ee30b595fe80 /src/gallium/drivers/freedreno/freedreno_context.h | |
parent | a49fb4ab2d5b062a418e930dc46cb2c79380852e (diff) |
freedreno/a3xx+a4xx: move common VBOs to fd_context
These are the same for a3xx and later. (a2xx could probably use them
too, but due to limited hw support and ancient downstream kernels, it
isn't so easy to test.)
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_context.h')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_context.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_context.h b/src/gallium/drivers/freedreno/freedreno_context.h index b3674b8115c..ffc4d9ef47c 100644 --- a/src/gallium/drivers/freedreno/freedreno_context.h +++ b/src/gallium/drivers/freedreno/freedreno_context.h @@ -275,6 +275,27 @@ struct fd_context { /* indirect-branch emit: */ void (*emit_ib)(struct fd_ringbuffer *ring, struct fd_ringbuffer *target); + + /* + * Common pre-cooked VBO state (used for a3xx and later): + */ + + /* for clear/gmem->mem vertices, and mem->gmem */ + struct pipe_resource *solid_vbuf; + + /* for mem->gmem tex coords: */ + struct pipe_resource *blit_texcoord_vbuf; + + /* vertex state for solid_vbuf: + * - solid_vbuf / 12 / R32G32B32_FLOAT + */ + struct fd_vertex_state solid_vbuf_state; + + /* vertex state for blit_prog: + * - blit_texcoord_vbuf / 8 / R32G32_FLOAT + * - solid_vbuf / 12 / R32G32B32_FLOAT + */ + struct fd_vertex_state blit_vbuf_state; }; static inline struct fd_context * @@ -315,6 +336,9 @@ fd_supported_prim(struct fd_context *ctx, unsigned prim) return (1 << prim) & ctx->primtype_mask; } +void fd_context_setup_common_vbos(struct fd_context *ctx); +void fd_context_cleanup_common_vbos(struct fd_context *ctx); + struct pipe_context * fd_context_init(struct fd_context *ctx, struct pipe_screen *pscreen, const uint8_t *primtypes, void *priv); |