summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe/sp_flush.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-03-22 07:59:35 +1000
committerDave Airlie <airlied@redhat.com>2016-03-31 09:14:16 +1000
commiteb9ad9faa3975fc4f044b81d3b4b793866ef5563 (patch)
treeab644c9094434e86972502d324af0c94d3371b73 /src/gallium/drivers/softpipe/sp_flush.c
parent0d1f679dedfb47944259e846d7f2eadbcf0907ca (diff)
softpipe: add image support to softpipe (v3)
This adds support for ARB_shader_image_load_store to softpipe. v2: add RESQ support (Ilia) v3: constify, cleanup internals, add some comments (Brian). Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_flush.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_flush.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_flush.c b/src/gallium/drivers/softpipe/sp_flush.c
index 5a29e26517d..59b8ad696ec 100644
--- a/src/gallium/drivers/softpipe/sp_flush.c
+++ b/src/gallium/drivers/softpipe/sp_flush.c
@@ -168,3 +168,29 @@ softpipe_flush_resource(struct pipe_context *pipe,
return TRUE;
}
+
+void softpipe_texture_barrier(struct pipe_context *pipe)
+{
+ struct softpipe_context *softpipe = softpipe_context(pipe);
+ uint i, sh;
+
+ for (sh = 0; sh < Elements(softpipe->tex_cache); sh++) {
+ for (i = 0; i < softpipe->num_sampler_views[sh]; i++) {
+ sp_flush_tex_tile_cache(softpipe->tex_cache[sh][i]);
+ }
+ }
+
+ for (i = 0; i < softpipe->framebuffer.nr_cbufs; i++)
+ if (softpipe->cbuf_cache[i])
+ sp_flush_tile_cache(softpipe->cbuf_cache[i]);
+
+ if (softpipe->zsbuf_cache)
+ sp_flush_tile_cache(softpipe->zsbuf_cache);
+
+ softpipe->dirty_render_cache = FALSE;
+}
+
+void softpipe_memory_barrier(struct pipe_context *pipe, unsigned flags)
+{
+ softpipe_texture_barrier(pipe);
+}