summaryrefslogtreecommitdiff
path: root/tests/gem_linear_blits.c
diff options
context:
space:
mode:
authorBen Widawsky <benjamin.widawsky@intel.com>2013-10-09 08:41:52 -0700
committerBen Widawsky <benjamin.widawsky@intel.com>2013-11-06 09:34:35 -0800
commitd3480229341b78952dc1558dd8992d0f12f6998b (patch)
tree8f327dbe16db261fe6fb56d0c6bb6bd37c307d15 /tests/gem_linear_blits.c
parentadc5a41f2b26c9c86b4e31d3fa90d95bceece8cf (diff)
tests/bdw: gem_linear_blits
support gen8 style blits Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Diffstat (limited to 'tests/gem_linear_blits.c')
-rw-r--r--tests/gem_linear_blits.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/gem_linear_blits.c b/tests/gem_linear_blits.c
index 009f40d0..326b44ed 100644
--- a/tests/gem_linear_blits.c
+++ b/tests/gem_linear_blits.c
@@ -56,7 +56,7 @@ static uint32_t linear[WIDTH*HEIGHT];
static void
copy(int fd, uint32_t dst, uint32_t src)
{
- uint32_t batch[10];
+ uint32_t batch[12];
struct drm_i915_gem_relocation_entry reloc[2];
struct drm_i915_gem_exec_object2 obj[3];
struct drm_i915_gem_execbuffer2 exec;
@@ -72,9 +72,13 @@ copy(int fd, uint32_t dst, uint32_t src)
batch[i++] = 0; /* dst x1,y1 */
batch[i++] = (HEIGHT << 16) | WIDTH; /* dst x2,y2 */
batch[i++] = 0; /* dst reloc */
+ if (intel_gen(intel_get_drm_devid(fd)) >= 8)
+ batch[i++] = 0;
batch[i++] = 0; /* src x1,y1 */
batch[i++] = WIDTH*4;
batch[i++] = 0; /* src reloc */
+ if (intel_gen(intel_get_drm_devid(fd)) >= 8)
+ batch[i++] = 0;
batch[i++] = MI_BATCH_BUFFER_END;
batch[i++] = MI_NOOP;