Enable compilation on non-Intel, non-DRM systems.

A few of the tools can be performed post-mortem from a different system,
so it is useful to be able to compile those tools on those foreign
systems. Obviously, any program to interact with the PCI device or talk
to GEM will fail on a non-Intel system.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson
2010-04-08 11:56:57 +01:00
parent cd64e19329
commit 95374225e8
29 changed files with 309 additions and 246 deletions
+7 -6
View File
@@ -131,9 +131,10 @@ main(int argc, char **argv)
drm_intel_bo *src1, *src2, *bo;
uint32_t start1 = 0;
uint32_t start2 = 1024 * 1024 / 4;
uint32_t devid;
fd = drm_open_any();
intel_get_drm_devid(fd);
devid = intel_get_drm_devid(fd);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
@@ -146,21 +147,21 @@ main(int argc, char **argv)
/* First, do a full-buffer read after blitting */
printf("Large read after blit 1\n");
intel_copy_bo(batch, bo, src1, width, height);
intel_copy_bo(batch, bo, src1, width, height, devid);
verify_large_read(bo, start1);
printf("Large read after blit 2\n");
intel_copy_bo(batch, bo, src2, width, height);
intel_copy_bo(batch, bo, src2, width, height, devid);
verify_large_read(bo, start2);
printf("Small reads after blit 1\n");
intel_copy_bo(batch, bo, src1, width, height);
intel_copy_bo(batch, bo, src1, width, height, devid);
verify_small_read(bo, start1);
printf("Small reads after blit 2\n");
intel_copy_bo(batch, bo, src2, width, height);
intel_copy_bo(batch, bo, src2, width, height, devid);
verify_small_read(bo, start2);
printf("Large read after blit 3\n");
intel_copy_bo(batch, bo, src1, width, height);
intel_copy_bo(batch, bo, src1, width, height, devid);
verify_large_read(bo, start1);
drm_intel_bo_unreference(src1);