diff options
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_blit.c | 12 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_blit.c | 12 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r600/r600_blit.c | 14 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_blit.c | 12 |
4 files changed, 32 insertions, 18 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_blit.c b/src/mesa/drivers/dri/r200/r200_blit.c index e446d532cf7..56b08a21bd5 100644 --- a/src/mesa/drivers/dri/r200/r200_blit.c +++ b/src/mesa/drivers/dri/r200/r200_blit.c @@ -211,11 +211,15 @@ static GLboolean validate_buffers(struct r200_context *r200, struct radeon_bo *dst_bo) { int ret; - radeon_cs_space_add_persistent_bo(r200->radeon.cmdbuf.cs, - src_bo, RADEON_GEM_DOMAIN_VRAM, 0); + ret = radeon_cs_space_check_with_bo(r200->radeon.cmdbuf.cs, + src_bo, RADEON_GEM_DOMAIN_VRAM, 0); + if (ret) + return GL_FALSE; - radeon_cs_space_add_persistent_bo(r200->radeon.cmdbuf.cs, - dst_bo, 0, RADEON_GEM_DOMAIN_VRAM); + ret = radeon_cs_space_check_with_bo(r200->radeon.cmdbuf.cs, + dst_bo, 0, RADEON_GEM_DOMAIN_VRAM); + if (ret) + return GL_FALSE; ret = radeon_cs_space_check_with_bo(r200->radeon.cmdbuf.cs, first_elem(&r200->radeon.dma.reserved)->bo, diff --git a/src/mesa/drivers/dri/r300/r300_blit.c b/src/mesa/drivers/dri/r300/r300_blit.c index 54ac2510e7a..35fd06734f8 100644 --- a/src/mesa/drivers/dri/r300/r300_blit.c +++ b/src/mesa/drivers/dri/r300/r300_blit.c @@ -373,11 +373,15 @@ static GLboolean validate_buffers(struct r300_context *r300, struct radeon_bo *dst_bo) { int ret; - radeon_cs_space_add_persistent_bo(r300->radeon.cmdbuf.cs, - src_bo, RADEON_GEM_DOMAIN_VRAM, 0); + ret = radeon_cs_space_check_with_bo(r300->radeon.cmdbuf.cs, + src_bo, RADEON_GEM_DOMAIN_VRAM, 0); + if (ret) + return GL_FALSE; - radeon_cs_space_add_persistent_bo(r300->radeon.cmdbuf.cs, - dst_bo, 0, RADEON_GEM_DOMAIN_VRAM); + ret = radeon_cs_space_check_with_bo(r300->radeon.cmdbuf.cs, + dst_bo, 0, RADEON_GEM_DOMAIN_VRAM); + if (ret) + return GL_FALSE; ret = radeon_cs_space_check_with_bo(r300->radeon.cmdbuf.cs, first_elem(&r300->radeon.dma.reserved)->bo, 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, diff --git a/src/mesa/drivers/dri/radeon/radeon_blit.c b/src/mesa/drivers/dri/radeon/radeon_blit.c index 0df4fbb33c5..34b9af40636 100644 --- a/src/mesa/drivers/dri/radeon/radeon_blit.c +++ b/src/mesa/drivers/dri/radeon/radeon_blit.c @@ -204,11 +204,15 @@ static GLboolean validate_buffers(struct r100_context *r100, struct radeon_bo *dst_bo) { int ret; - radeon_cs_space_add_persistent_bo(r100->radeon.cmdbuf.cs, - src_bo, RADEON_GEM_DOMAIN_VRAM, 0); + ret = radeon_cs_space_check_with_bo(r100->radeon.cmdbuf.cs, + src_bo, RADEON_GEM_DOMAIN_VRAM, 0); + if (ret) + return GL_FALSE; - radeon_cs_space_add_persistent_bo(r100->radeon.cmdbuf.cs, - dst_bo, 0, RADEON_GEM_DOMAIN_VRAM); + ret = radeon_cs_space_check_with_bo(r100->radeon.cmdbuf.cs, + dst_bo, 0, RADEON_GEM_DOMAIN_VRAM); + if (ret) + return GL_FALSE; ret = radeon_cs_space_check_with_bo(r100->radeon.cmdbuf.cs, first_elem(&r100->radeon.dma.reserved)->bo, |