diff options
author | Rob Clark <[email protected]> | 2014-10-14 12:20:54 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2014-10-15 15:49:48 -0400 |
commit | d5d80b37392c7f15c4fb39b6b1826230239930fd (patch) | |
tree | a70ad7ceaea741ea2040996759c7d982fb875011 /src/gallium/drivers/freedreno/freedreno_state.c | |
parent | 57de9bbb632ed7639d07d37965dcee5a1fe3bf30 (diff) |
freedreno/a3xx: refactor vertex state emit
Get rid of fd3_vertex_buf and use fd_vertex_state directly for all
draws. Removes a tiny bit of CPU overhead for munging around the vertex
state every time it is emitted, but more importantly it cleans things up
for later optimizations, so the emit paths don't have to special case
internal draws (gmem<->mem, clears, etc) with regular draws.
Instead of constructing fd3_vertex_buf array each time for internal
draws, and context init time pre-create solid_vbuf_state and
blit_vbuf_state.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_state.c')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_state.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_state.c b/src/gallium/drivers/freedreno/freedreno_state.c index e7d783a6a56..27869295622 100644 --- a/src/gallium/drivers/freedreno/freedreno_state.c +++ b/src/gallium/drivers/freedreno/freedreno_state.c @@ -177,7 +177,7 @@ fd_set_vertex_buffers(struct pipe_context *pctx, const struct pipe_vertex_buffer *vb) { struct fd_context *ctx = fd_context(pctx); - struct fd_vertexbuf_stateobj *so = &ctx->vertexbuf; + struct fd_vertexbuf_stateobj *so = &ctx->vtx.vertexbuf; int i; /* on a2xx, pitch is encoded in the vtx fetch instruction, so @@ -286,7 +286,7 @@ static void fd_vertex_state_bind(struct pipe_context *pctx, void *hwcso) { struct fd_context *ctx = fd_context(pctx); - ctx->vtx = hwcso; + ctx->vtx.vtx = hwcso; ctx->dirty |= FD_DIRTY_VTXSTATE; } |