From 13fe1feb627752a0220882b1999bd8597fdbad3b Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sat, 4 Nov 2017 11:14:09 -0400 Subject: freedreno: add image view state tracking It is unfortunate that image state isn't a real CSO, since (at least for a4xx/a5xx) it is a combination of sampler and "SSBO" image state, and it would be useful to pre-compute the state block "register" values rather than doing it at emit time. Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/freedreno_context.h | 8 ++++++++ 1 file changed, 8 insertions(+) (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 f10f7ef4ea5..61f1fb4ba4f 100644 --- a/src/gallium/drivers/freedreno/freedreno_context.h +++ b/src/gallium/drivers/freedreno/freedreno_context.h @@ -78,6 +78,12 @@ struct fd_shaderbuf_stateobj { uint32_t dirty_mask; }; +struct fd_shaderimg_stateobj { + struct pipe_image_view si[PIPE_MAX_SHADER_IMAGES]; + uint32_t enabled_mask; + uint32_t dirty_mask; +}; + struct fd_vertexbuf_stateobj { struct pipe_vertex_buffer vb[PIPE_MAX_ATTRIBS]; unsigned count; @@ -149,6 +155,7 @@ enum fd_dirty_shader_state { FD_DIRTY_SHADER_CONST = BIT(1), FD_DIRTY_SHADER_TEX = BIT(2), FD_DIRTY_SHADER_SSBO = BIT(3), + FD_DIRTY_SHADER_IMAGE = BIT(4), }; struct fd_context { @@ -274,6 +281,7 @@ struct fd_context { struct pipe_viewport_state viewport; struct fd_constbuf_stateobj constbuf[PIPE_SHADER_TYPES]; struct fd_shaderbuf_stateobj shaderbuf[PIPE_SHADER_TYPES]; + struct fd_shaderimg_stateobj shaderimg[PIPE_SHADER_TYPES]; struct fd_streamout_stateobj streamout; struct pipe_clip_state ucp; -- cgit v1.2.3