From 9b75627fab5bf2ea90f27ddd31b60c54895f6de6 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Wed, 15 Apr 2009 15:53:34 +0200 Subject: gallium: Make sure we flush before some texture / buffer operations. Also implement context member functions to optimize away those flushes whenever possible. Signed-off-by: Thomas Hellstrom --- src/gallium/drivers/softpipe/sp_context.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/gallium/drivers/softpipe') diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c index 06ace27d14..6ae4d1ad7b 100644 --- a/src/gallium/drivers/softpipe/sp_context.c +++ b/src/gallium/drivers/softpipe/sp_context.c @@ -121,6 +121,21 @@ static void softpipe_destroy( struct pipe_context *pipe ) FREE( softpipe ); } +static unsigned int +softpipe_is_texture_referenced( struct pipe_context *pipe, + struct pipe_texture *texture, + unsigned face, unsigned level, + unsigned zslice) +{ + return PIPE_UNREFERENCED; +} + +static unsigned int +softpipe_is_buffer_referenced( struct pipe_context *pipe, + struct pipe_buffer *buf) +{ + return PIPE_UNREFERENCED; +} struct pipe_context * softpipe_create( struct pipe_screen *screen, @@ -190,6 +205,9 @@ softpipe_create( struct pipe_screen *screen, softpipe->pipe.clear = softpipe_clear; softpipe->pipe.flush = softpipe_flush; + softpipe->pipe.is_texture_referenced = softpipe_is_texture_referenced; + softpipe->pipe.is_buffer_referenced = softpipe_is_buffer_referenced; + softpipe_init_query_funcs( softpipe ); softpipe_init_texture_funcs( softpipe ); -- cgit v1.2.3