mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-10 09:26:10 +00:00
gem_stress: add width/height arg to rendercpy functions
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
699d30950f
commit
9f20ecc3b3
@ -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,
|
||||
|
@ -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);
|
||||
|
@ -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));
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user