diff options
author | Brian Paul <[email protected]> | 2010-01-13 15:30:42 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-01-13 15:30:42 -0700 |
commit | 12872774461a84f0a7c272aff5aac5e30a78a7c2 (patch) | |
tree | 601d8b1b95bf37c724c7248fe7aea06265e0311b | |
parent | 0b279c5382da021a71cdc8ed3afa09983817539c (diff) |
llvmpipe: also check render target textures in lp_setup_is_texture_referenced()
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup.c | 9 |
1 files changed, 9 insertions, 0 deletions
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; } |