From 25485f4b69447514ab8b595aced90c75606a99bd Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Mon, 7 Mar 2011 22:35:49 +0100 Subject: gallium: kill is_resource_referenced Only st/xorg used it and even incorrectly with regards to pipelined transfers. --- src/gallium/state_trackers/xorg/xorg_renderer.c | 4 ---- src/gallium/state_trackers/xorg/xorg_xv.c | 16 ---------------- 2 files changed, 20 deletions(-) (limited to 'src/gallium/state_trackers/xorg') diff --git a/src/gallium/state_trackers/xorg/xorg_renderer.c b/src/gallium/state_trackers/xorg/xorg_renderer.c index 3b3ae455c0..3e82fa8fdc 100644 --- a/src/gallium/state_trackers/xorg/xorg_renderer.c +++ b/src/gallium/state_trackers/xorg/xorg_renderer.c @@ -519,10 +519,6 @@ renderer_clone_texture(struct xorg_renderer *r, struct pipe_resource *pt; struct pipe_resource templ; - if (pipe->is_resource_referenced(pipe, src, 0, 0) & - PIPE_REFERENCED_FOR_WRITE) - pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL); - /* the coming in texture should already have that invariance */ debug_assert(screen->is_format_supported(screen, src->format, PIPE_TEXTURE_2D, 0, diff --git a/src/gallium/state_trackers/xorg/xorg_xv.c b/src/gallium/state_trackers/xorg/xorg_xv.c index c72ba9ef8d..234574b968 100644 --- a/src/gallium/state_trackers/xorg/xorg_xv.c +++ b/src/gallium/state_trackers/xorg/xorg_xv.c @@ -461,20 +461,6 @@ bind_shaders(struct xorg_xv_port_priv *port) cso_set_fragment_shader_handle(port->r->cso, shader.fs); } -static INLINE void -conditional_flush(struct pipe_context *pipe, struct pipe_resource **tex, - int num) -{ - int i; - for (i = 0; i < num; ++i) { - if (tex[i] && pipe->is_resource_referenced(pipe, tex[i], 0, 0) & - PIPE_REFERENCED_FOR_WRITE) { - pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL); - return; - } - } -} - static void bind_samplers(struct xorg_xv_port_priv *port) { @@ -485,8 +471,6 @@ bind_samplers(struct xorg_xv_port_priv *port) memset(&sampler, 0, sizeof(struct pipe_sampler_state)); - conditional_flush(port->r->pipe, dst, 3); - sampler.wrap_s = PIPE_TEX_WRAP_CLAMP; sampler.wrap_t = PIPE_TEX_WRAP_CLAMP; sampler.min_img_filter = PIPE_TEX_FILTER_LINEAR; -- cgit v1.2.3