igt_assert(height <= 1<<16);
if (height) {
- b[0] = COPY_BLT_CMD | BLT_WRITE_ALPHA | BLT_WRITE_RGB;
- b[1] = 0xcc << 16 | 1 << 25 | 1 << 24 | (16*1024);
- b[2] = 0;
- b[3] = height << 16 | (4*1024);
- b[4] = 0;
+ int i = 0;
+ b[i++] = COPY_BLT_CMD | BLT_WRITE_ALPHA | BLT_WRITE_RGB;
+ b[i++] = 0xcc << 16 | 1 << 25 | 1 << 24 | (16*1024);
+ b[i++] = 0;
+ b[i++] = height << 16 | (4*1024);
+ b[i++] = 0;
reloc->offset = (b-batch+4) * sizeof(uint32_t);
reloc->delta = 0;
reloc->target_handle = dst;
reloc->presumed_offset = 0;
reloc++;
- b[5] = 0;
- b[6] = 16*1024;
- b[7] = 0;
+ b[i++] = 0;
+ b[i++] = 16*1024;
+ b[i++] = 0;
reloc->offset = (b-batch+7) * sizeof(uint32_t);
reloc->delta = 0;
reloc->target_handle = src;
}
if (length) {
- b[0] = COPY_BLT_CMD | BLT_WRITE_ALPHA | BLT_WRITE_RGB;
- b[1] = 0xcc << 16 | 1 << 25 | 1 << 24 | (16*1024);
- b[2] = height << 16;
- b[3] = (1+height) << 16 | (length / 4);
- b[4] = 0;
+ int i = 0;
+ b[i++] = COPY_BLT_CMD | BLT_WRITE_ALPHA | BLT_WRITE_RGB;
+ b[i++] = 0xcc << 16 | 1 << 25 | 1 << 24 | (16*1024);
+ b[i++] = height << 16;
+ b[i++] = (1+height) << 16 | (length / 4);
+ b[i++] = 0;
reloc->offset = (b-batch+4) * sizeof(uint32_t);
reloc->delta = 0;
reloc->target_handle = dst;
reloc->presumed_offset = 0;
reloc++;
- b[5] = height << 16;
- b[6] = 16*1024;
- b[7] = 0;
+ b[i++] = height << 16;
+ b[i++] = 16*1024;
+ b[i++] = 0;
reloc->offset = (b-batch+7) * sizeof(uint32_t);
reloc->delta = 0;
reloc->target_handle = src;