From 291ac872a445f3edebd668b27e910a79e1de5a00 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Tue, 3 May 2016 16:54:21 -0400 Subject: freedreno: move shader-stage dirty bits to global dirty flag This was always a bit overly complicated, and had some issues (like ctx->prog.dirty not getting reset at the end of the batch). It also required some special hacks to avoid resetting dirty state on binning pass. So just move it all into ctx->dirty (leaving some free bits for future shader stages), and make FD_DIRTY_PROG just be the union of all FD_SHADER_DIRTY_*. Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/freedreno_context.h | 41 ++++++++++++----------- 1 file changed, 22 insertions(+), 19 deletions(-) (limited to 'src/gallium/drivers/freedreno/freedreno_context.h') diff --git a/src/gallium/drivers/freedreno/freedreno_context.h b/src/gallium/drivers/freedreno/freedreno_context.h index e65688e6c58..80c638a7e38 100644 --- a/src/gallium/drivers/freedreno/freedreno_context.h +++ b/src/gallium/drivers/freedreno/freedreno_context.h @@ -54,10 +54,8 @@ struct fd_texture_stateobj { struct fd_program_stateobj { void *vp, *fp; - enum { - FD_SHADER_DIRTY_VP = (1 << 0), - FD_SHADER_DIRTY_FP = (1 << 1), - } dirty; + + /* rest only used by fd2.. split out: */ uint8_t num_exports; /* Indexed by semantic name or TGSI_SEMANTIC_COUNT + semantic index * for TGSI_SEMANTIC_GENERIC. Special vs exports (position and point- @@ -327,21 +325,26 @@ struct fd_context { FD_DIRTY_FRAGTEX = (1 << 3), FD_DIRTY_VERTTEX = (1 << 4), FD_DIRTY_TEXSTATE = (1 << 5), - FD_DIRTY_PROG = (1 << 6), - FD_DIRTY_BLEND_COLOR = (1 << 7), - FD_DIRTY_STENCIL_REF = (1 << 8), - FD_DIRTY_SAMPLE_MASK = (1 << 9), - FD_DIRTY_FRAMEBUFFER = (1 << 10), - FD_DIRTY_STIPPLE = (1 << 11), - FD_DIRTY_VIEWPORT = (1 << 12), - FD_DIRTY_CONSTBUF = (1 << 13), - FD_DIRTY_VTXSTATE = (1 << 14), - FD_DIRTY_VTXBUF = (1 << 15), - FD_DIRTY_INDEXBUF = (1 << 16), - FD_DIRTY_SCISSOR = (1 << 17), - FD_DIRTY_STREAMOUT = (1 << 18), - FD_DIRTY_UCP = (1 << 19), - FD_DIRTY_BLEND_DUAL = (1 << 20), + + FD_SHADER_DIRTY_VP = (1 << 6), + FD_SHADER_DIRTY_FP = (1 << 7), + /* skip geom/tcs/tes/compute */ + FD_DIRTY_PROG = FD_SHADER_DIRTY_FP | FD_SHADER_DIRTY_VP, + + FD_DIRTY_BLEND_COLOR = (1 << 12), + FD_DIRTY_STENCIL_REF = (1 << 13), + FD_DIRTY_SAMPLE_MASK = (1 << 14), + FD_DIRTY_FRAMEBUFFER = (1 << 15), + FD_DIRTY_STIPPLE = (1 << 16), + FD_DIRTY_VIEWPORT = (1 << 17), + FD_DIRTY_CONSTBUF = (1 << 18), + FD_DIRTY_VTXSTATE = (1 << 19), + FD_DIRTY_VTXBUF = (1 << 20), + FD_DIRTY_INDEXBUF = (1 << 21), + FD_DIRTY_SCISSOR = (1 << 22), + FD_DIRTY_STREAMOUT = (1 << 23), + FD_DIRTY_UCP = (1 << 24), + FD_DIRTY_BLEND_DUAL = (1 << 25), } dirty; struct pipe_blend_state *blend; -- cgit v1.2.3