r300g: implement the texture barrier
authorMarek Olšák <maraeo@gmail.com>
Tue, 8 Mar 2011 10:34:28 +0000 (11:34 +0100)
committerMarek Olšák <maraeo@gmail.com>
Tue, 15 Mar 2011 14:58:12 +0000 (15:58 +0100)
src/gallium/drivers/r300/r300_state.c

index d449265b66418fd4b811194c4f1c46564252ba64..ecb4fc691cc8ff0355f20d2c54c87e0d283e8c42 100644 (file)
@@ -1870,6 +1870,14 @@ static void r300_set_constant_buffer(struct pipe_context *pipe,
     }
 }
 
+static void r300_texture_barrier(struct pipe_context *pipe)
+{
+    struct r300_context *r300 = r300_context(pipe);
+
+    r300_mark_atom_dirty(r300, &r300->gpu_flush);
+    r300_mark_atom_dirty(r300, &r300->texture_cache_inval);
+}
+
 void r300_init_state_functions(struct r300_context* r300)
 {
     r300->context.create_blend_state = r300_create_blend_state;
@@ -1925,4 +1933,6 @@ void r300_init_state_functions(struct r300_context* r300)
     r300->context.create_vs_state = r300_create_vs_state;
     r300->context.bind_vs_state = r300_bind_vs_state;
     r300->context.delete_vs_state = r300_delete_vs_state;
+
+    r300->context.texture_barrier = r300_texture_barrier;
 }