summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_context.h
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2016-05-03 16:54:21 -0400
committerRob Clark <[email protected]>2016-05-04 11:25:55 -0400
commit291ac872a445f3edebd668b27e910a79e1de5a00 (patch)
treec4cefb296120ee62f1a9e61a29f1048c59818443 /src/gallium/drivers/freedreno/freedreno_context.h
parenta48cccacf3c7d655bbca42b51193100b43eeff6e (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_context.h')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_context.h41
1 files changed, 22 insertions, 19 deletions
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;