r300: allow src and dst BOs to be placed in GTT during blit
authorMaciej Cencora <m.cencora@gmail.com>
Thu, 4 Mar 2010 17:35:55 +0000 (18:35 +0100)
committerAlex Deucher <alexdeucher@gmail.com>
Mon, 8 Mar 2010 16:49:09 +0000 (11:49 -0500)
Fixes some relocation failures

src/mesa/drivers/dri/r300/r300_blit.c

index f9c085e2832f3e0460a985839cc266271b04acc3..d870c7f852a7cf21fd9e70854b505c8cb0a2ed2c 100644 (file)
@@ -385,18 +385,12 @@ static GLboolean validate_buffers(struct r300_context *r300,
     radeon_cs_space_reset_bos(r300->radeon.cmdbuf.cs);
 
     ret = radeon_cs_space_check_with_bo(r300->radeon.cmdbuf.cs,
-                                        src_bo, RADEON_GEM_DOMAIN_VRAM, 0);
+                                        src_bo, RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT, 0);
     if (ret)
         return GL_FALSE;
 
     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,
-                                        RADEON_GEM_DOMAIN_GTT, 0);
+                                        dst_bo, 0, RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT);
     if (ret)
         return GL_FALSE;