Prepare for 64bit relocation addresses
[platform/upstream/intel-gpu-tools.git] / benchmarks / intel_upload_blit_small.c
index 719a8a1..b7d8068 100644 (file)
@@ -54,6 +54,8 @@
 #include "drmtest.h"
 #include "intel_bufmgr.h"
 #include "intel_batchbuffer.h"
+#include "intel_io.h"
+#include "intel_chipset.h"
 
 /* Happens to be 128k, the size of the VBOs used by i965's Mesa driver. */
 #define OBJECT_WIDTH   256
@@ -106,10 +108,7 @@ do_render(drm_intel_bufmgr *bufmgr, struct intel_batchbuffer *batch,
        }
 
        /* Render the junk to the dst. */
-       BEGIN_BATCH(8);
-       OUT_BATCH(XY_SRC_COPY_BLT_CMD |
-                 XY_SRC_COPY_BLT_WRITE_ALPHA |
-                 XY_SRC_COPY_BLT_WRITE_RGB);
+       BLIT_COPY_BATCH_START(batch->devid, 0);
        OUT_BATCH((3 << 24) | /* 32 bits */
                  (0xcc << 16) | /* copy ROP */
                  (width * 4) /* dst pitch */);
@@ -141,7 +140,7 @@ int main(int argc, char **argv)
        bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
        drm_intel_bufmgr_gem_enable_reuse(bufmgr);
 
-       batch = intel_batchbuffer_alloc(bufmgr);
+       batch = intel_batchbuffer_alloc(bufmgr, intel_get_drm_devid(fd));
 
        dst_bo = drm_intel_bo_alloc(bufmgr, "dst", object_size, 4096);