aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2009-06-18 13:12:21 +1000
committerDave Airlie <[email protected]>2009-06-18 13:16:06 +1000
commitb165fa7d45e230f9e61fcf3a09babf0c61c67319 (patch)
treefcd0de0cc26dab036deaf982ddb4a8151d41ac8f /src
parent3817a54912a6c51fa0a7ec64787a69007bda44fa (diff)
radeon: don't re-add BOs to validate list
if its on the list its on the list don't go readding it. multitexturing from the same texture could cause this.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index 32fe4d5645b..7bd4a6f14f2 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -999,6 +999,13 @@ void radeon_validate_reset_bos(radeonContextPtr radeon)
void radeon_validate_bo(radeonContextPtr radeon, struct radeon_bo *bo, uint32_t read_domains, uint32_t write_domain)
{
+ int i;
+ for (i = 0; i < radeon->state.validated_bo_count; i++) {
+ if (radeon->state.bos[i].bo == bo &&
+ radeon->state.bos[i].read_domains == read_domains &&
+ radeon->state.bos[i].write_domain == write_domain)
+ return;
+ }
radeon_bo_ref(bo);
radeon->state.bos[radeon->state.validated_bo_count].bo = bo;
radeon->state.bos[radeon->state.validated_bo_count].read_domains = read_domains;