diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-01-18 17:46:00 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-01-18 17:46:00 +0100 |
commit | 9f20ecc3b3e80b2893646817926f2e090abf757a (patch) | |
tree | 3ceff3b723654bd83abc15a212213c6b88714550 /tests | |
parent | 699d30950f1d91cd017364765c14fdc4cb63cd14 (diff) |
gem_stress: add width/height arg to rendercpy functions
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gem_stress.c | 3 | ||||
-rw-r--r-- | tests/gem_stress.h | 3 | ||||
-rw-r--r-- | tests/gem_stress_gen6.c | 11 | ||||
-rw-r--r-- | tests/gem_stress_i830.c | 13 | ||||
-rw-r--r-- | tests/gem_stress_i915.c | 13 |
5 files changed, 26 insertions, 17 deletions
diff --git a/tests/gem_stress.c b/tests/gem_stress.c index ec669760..5b9b9a6b 100644 --- a/tests/gem_stress.c +++ b/tests/gem_stress.c @@ -305,14 +305,17 @@ static void render_copyfunc(struct scratch_buf *src, unsigned src_x, unsigned sr if (IS_GEN2(devid)) gen2_render_copyfunc(batch, src, src_x, src_y, + options.tile_size, options.tile_size, dst, dst_x, dst_y); else if (IS_GEN3(devid)) gen3_render_copyfunc(batch, src, src_x, src_y, + options.tile_size, options.tile_size, dst, dst_x, dst_y); else if (IS_GEN6(devid)) gen6_render_copyfunc(batch, src, src_x, src_y, + options.tile_size, options.tile_size, dst, dst_x, dst_y); else blitter_copyfunc(src, src_x, src_y, diff --git a/tests/gem_stress.h b/tests/gem_stress.h index 057ae29b..82e8a574 100644 --- a/tests/gem_stress.h +++ b/tests/gem_stress.h @@ -84,10 +84,13 @@ static inline unsigned buf_height(struct scratch_buf *buf) void gen6_render_copyfunc(struct intel_batchbuffer *batch, struct scratch_buf *src, unsigned src_x, unsigned src_y, + unsigned width, unsigned height, struct scratch_buf *dst, unsigned dst_x, unsigned dst_y); void gen3_render_copyfunc(struct intel_batchbuffer *batch, struct scratch_buf *src, unsigned src_x, unsigned src_y, + unsigned width, unsigned height, struct scratch_buf *dst, unsigned dst_x, unsigned dst_y); void gen2_render_copyfunc(struct intel_batchbuffer *batch, struct scratch_buf *src, unsigned src_x, unsigned src_y, + unsigned width, unsigned height, struct scratch_buf *dst, unsigned dst_x, unsigned dst_y); diff --git a/tests/gem_stress_gen6.c b/tests/gem_stress_gen6.c index 9f2e6780..e6cdd559 100644 --- a/tests/gem_stress_gen6.c +++ b/tests/gem_stress_gen6.c @@ -530,6 +530,7 @@ static uint32_t gen6_emit_primitive(struct intel_batchbuffer *batch) void gen6_render_copyfunc(struct intel_batchbuffer *batch, struct scratch_buf *src, unsigned src_x, unsigned src_y, + unsigned width, unsigned height, struct scratch_buf *dst, unsigned dst_x, unsigned dst_y) { uint32_t wm_state, wm_kernel, wm_table; @@ -581,13 +582,13 @@ void gen6_render_copyfunc(struct intel_batchbuffer *batch, *(uint32_t*)(batch->buffer + offset) = batch_round_upto(batch, VERTEX_SIZE)/VERTEX_SIZE; - emit_vertex_2s(batch, dst_x + options.tile_size, dst_y + options.tile_size); - emit_vertex_normalized(batch, src_x + options.tile_size, buf_width(src)); - emit_vertex_normalized(batch, src_y + options.tile_size, buf_height(src)); + emit_vertex_2s(batch, dst_x + width, dst_y + height); + emit_vertex_normalized(batch, src_x + width, buf_width(src)); + emit_vertex_normalized(batch, src_y + height, buf_height(src)); - emit_vertex_2s(batch, dst_x, dst_y + options.tile_size); + emit_vertex_2s(batch, dst_x, dst_y + height); emit_vertex_normalized(batch, src_x, buf_width(src)); - emit_vertex_normalized(batch, src_y + options.tile_size, buf_height(src)); + emit_vertex_normalized(batch, src_y + height, buf_height(src)); emit_vertex_2s(batch, dst_x, dst_y); emit_vertex_normalized(batch, src_x, buf_width(src)); diff --git a/tests/gem_stress_i830.c b/tests/gem_stress_i830.c index d336e696..dfd706cf 100644 --- a/tests/gem_stress_i830.c +++ b/tests/gem_stress_i830.c @@ -54,6 +54,7 @@ void gen2_render_copyfunc(struct intel_batchbuffer *batch, struct scratch_buf *src, unsigned src_x, unsigned src_y, + unsigned width, unsigned height, struct scratch_buf *dst, unsigned dst_x, unsigned dst_y) { static unsigned keep_gpu_busy_counter = 0; @@ -330,15 +331,15 @@ void gen2_render_copyfunc(struct intel_batchbuffer *batch, } OUT_BATCH(PRIM3D_INLINE | PRIM3D_RECTLIST | (3*4 -1)); - emit_vertex(batch, dst_x + options.tile_size); - emit_vertex(batch, dst_y + options.tile_size); - emit_vertex_normalized(batch, src_x + options.tile_size, buf_width(src)); - emit_vertex_normalized(batch, src_y + options.tile_size, buf_height(src)); + emit_vertex(batch, dst_x + width); + emit_vertex(batch, dst_y + height); + emit_vertex_normalized(batch, src_x + width, buf_width(src)); + emit_vertex_normalized(batch, src_y + height, buf_height(src)); emit_vertex(batch, dst_x); - emit_vertex(batch, dst_y + options.tile_size); + emit_vertex(batch, dst_y + height); emit_vertex_normalized(batch, src_x, buf_width(src)); - emit_vertex_normalized(batch, src_y + options.tile_size, buf_height(src)); + emit_vertex_normalized(batch, src_y + height, buf_height(src)); emit_vertex(batch, dst_x); emit_vertex(batch, dst_y); diff --git a/tests/gem_stress_i915.c b/tests/gem_stress_i915.c index e202ff34..75d797fe 100644 --- a/tests/gem_stress_i915.c +++ b/tests/gem_stress_i915.c @@ -4,6 +4,7 @@ void gen3_render_copyfunc(struct intel_batchbuffer *batch, struct scratch_buf *src, unsigned src_x, unsigned src_y, + unsigned width, unsigned height, struct scratch_buf *dst, unsigned dst_x, unsigned dst_y) { static unsigned keep_gpu_busy_counter = 0; @@ -166,15 +167,15 @@ void gen3_render_copyfunc(struct intel_batchbuffer *batch, } OUT_BATCH(PRIM3D_RECTLIST | (3*4 - 1)); - emit_vertex(batch, dst_x + options.tile_size); - emit_vertex(batch, dst_y + options.tile_size); - emit_vertex(batch, src_x + options.tile_size); - emit_vertex(batch, src_y + options.tile_size); + emit_vertex(batch, dst_x + width); + emit_vertex(batch, dst_y + height); + emit_vertex(batch, src_x + width); + emit_vertex(batch, src_y + height); emit_vertex(batch, dst_x); - emit_vertex(batch, dst_y + options.tile_size); + emit_vertex(batch, dst_y + height); emit_vertex(batch, src_x); - emit_vertex(batch, src_y + options.tile_size); + emit_vertex(batch, src_y + height); emit_vertex(batch, dst_x); emit_vertex(batch, dst_y); |