X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Ffailover%2Ffo_context.c;h=325a1009541ed8984436de76225be52645026a81;hb=1318848f782cce716d6376ca13aebf68b728e24c;hp=659e40cbf0318b9a66e731bdf91042376bfec442;hpb=2689dd304c6d644b04c941e6da63e466be5de0d6;p=mesa.git diff --git a/src/gallium/drivers/failover/fo_context.c b/src/gallium/drivers/failover/fo_context.c index 659e40cbf03..325a1009541 100644 --- a/src/gallium/drivers/failover/fo_context.c +++ b/src/gallium/drivers/failover/fo_context.c @@ -51,7 +51,7 @@ void failover_fail_over( struct failover_context *failover ) static void failover_draw_elements( struct pipe_context *pipe, - struct pipe_buffer *indexBuffer, + struct pipe_resource *indexResource, unsigned indexSize, unsigned prim, unsigned start, @@ -70,7 +70,7 @@ static void failover_draw_elements( struct pipe_context *pipe, */ if (failover->mode == FO_HW) { failover->hw->draw_elements( failover->hw, - indexBuffer, + indexResource, indexSize, prim, start, @@ -87,7 +87,7 @@ static void failover_draw_elements( struct pipe_context *pipe, } failover->sw->draw_elements( failover->sw, - indexBuffer, + indexResource, indexSize, prim, start, @@ -109,26 +109,15 @@ static void failover_draw_arrays( struct pipe_context *pipe, } static unsigned int -failover_is_texture_referenced( struct pipe_context *_pipe, - struct pipe_texture *texture, - unsigned face, unsigned level) +failover_is_resource_referenced( struct pipe_context *_pipe, + struct pipe_resource *resource, + unsigned face, unsigned level) { struct failover_context *failover = failover_context( _pipe ); struct pipe_context *pipe = (failover->mode == FO_HW) ? failover->hw : failover->sw; - return pipe->is_texture_referenced(pipe, texture, face, level); -} - -static unsigned int -failover_is_buffer_referenced( struct pipe_context *_pipe, - struct pipe_buffer *buf) -{ - struct failover_context *failover = failover_context( _pipe ); - struct pipe_context *pipe = (failover->mode == FO_HW) ? - failover->hw : failover->sw; - - return pipe->is_buffer_referenced(pipe, buf); + return pipe->is_resource_referenced(pipe, resource, face, level); } struct pipe_context *failover_create( struct pipe_context *hw, @@ -175,8 +164,7 @@ struct pipe_context *failover_create( struct pipe_context *hw, #endif failover->pipe.flush = hw->flush; - failover->pipe.is_texture_referenced = failover_is_texture_referenced; - failover->pipe.is_buffer_referenced = failover_is_buffer_referenced; + failover->pipe.is_resource_referenced = failover_is_resource_referenced; failover->dirty = 0;