From 12872774461a84f0a7c272aff5aac5e30a78a7c2 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 13 Jan 2010 15:30:42 -0700 Subject: llvmpipe: also check render target textures in lp_setup_is_texture_referenced() --- src/gallium/drivers/llvmpipe/lp_setup.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/gallium/drivers/llvmpipe') diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c index 11b1b5f319f..ce006bf618e 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_setup.c @@ -487,6 +487,15 @@ lp_setup_is_texture_referenced( const struct setup_context *setup, return PIPE_REFERENCED_FOR_READ; } } + + /* check the render targets */ + for (i = 0; i < setup->fb.nr_cbufs; i++) { + if (setup->fb.cbufs[i]->texture == texture) + return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE; + } + if (setup->fb.zsbuf && setup->fb.zsbuf->texture == texture) + return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE; + return PIPE_UNREFERENCED; } -- cgit v1.2.3