diff options
author | Dave Airlie <[email protected]> | 2010-03-03 16:27:21 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2010-03-03 16:28:53 +1000 |
commit | daf85c460875c944d6918fdf4041467d97cba41e (patch) | |
tree | df46b197b3fc27a9eafce3b7b884a6843c05f805 /src/mesa/drivers/dri/r600 | |
parent | 4cb7642ff3ba390e2918d71220625a837bf8a7b9 (diff) |
radeon/r200/r300/r600: fix blit BO buffer validation
there is no need for these to be persistent since we flush the CS
at the end of the blit, and we don't reuse these buffers at all.
on my r600 the Wine DX9 test suite doesn't crash at least anymore.
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/r600')
-rw-r--r-- | src/mesa/drivers/dri/r600/r600_blit.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/r600/r600_blit.c b/src/mesa/drivers/dri/r600/r600_blit.c index 4bb77a398f9..8eafd42e8fb 100644 --- a/src/mesa/drivers/dri/r600/r600_blit.c +++ b/src/mesa/drivers/dri/r600/r600_blit.c @@ -1532,14 +1532,16 @@ static GLboolean validate_buffers(context_t *rmesa, struct radeon_bo *dst_bo) { int ret; - radeon_cs_space_add_persistent_bo(rmesa->radeon.cmdbuf.cs, - src_bo, RADEON_GEM_DOMAIN_VRAM, 0); - radeon_cs_space_add_persistent_bo(rmesa->radeon.cmdbuf.cs, - dst_bo, 0, RADEON_GEM_DOMAIN_VRAM); + ret = radeon_cs_space_check_with_bo(rmesa->radeon.cmdbuf.cs, + src_bo, RADEON_GEM_DOMAIN_VRAM, 0); + if (ret) + return GL_FALSE; - radeon_cs_space_add_persistent_bo(rmesa->radeon.cmdbuf.cs, - rmesa->blit_bo, RADEON_GEM_DOMAIN_GTT, 0); + ret = radeon_cs_space_check_with_bo(rmesa->radeon.cmdbuf.cs, + dst_bo, 0, RADEON_GEM_DOMAIN_VRAM); + if (ret) + return GL_FALSE; ret = radeon_cs_space_check_with_bo(rmesa->radeon.cmdbuf.cs, rmesa->blit_bo, |