summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-01-13 15:30:42 -0700
committerBrian Paul <brianp@vmware.com>2010-01-13 15:30:42 -0700
commit12872774461a84f0a7c272aff5aac5e30a78a7c2 (patch)
tree601d8b1b95bf37c724c7248fe7aea06265e0311b /src/gallium/drivers/llvmpipe
parent0b279c5382da021a71cdc8ed3afa09983817539c (diff)
llvmpipe: also check render target textures in lp_setup_is_texture_referenced()
Diffstat (limited to 'src/gallium/drivers/llvmpipe')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup.c9
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 11b1b5f319..ce006bf618 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;
}