mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-20 12:52:55 +00:00
lib: extract get_render_copyfunc
Otherwise we won't update all the tests if we add new render copyfuncs. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
@@ -63,6 +63,8 @@ typedef void (*render_copyfunc_t)(struct intel_batchbuffer *batch,
|
||||
unsigned width, unsigned height,
|
||||
struct scratch_buf *dst, unsigned dst_x, unsigned dst_y);
|
||||
|
||||
render_copyfunc_t get_render_copyfunc(int devid);
|
||||
|
||||
void gen7_render_copyfunc(struct intel_batchbuffer *batch,
|
||||
struct scratch_buf *src, unsigned src_x, unsigned src_y,
|
||||
unsigned width, unsigned height,
|
||||
|
||||
@@ -227,3 +227,19 @@ void gen2_render_copyfunc(struct intel_batchbuffer *batch,
|
||||
|
||||
intel_batchbuffer_flush(batch);
|
||||
}
|
||||
|
||||
render_copyfunc_t get_render_copyfunc(int devid)
|
||||
{
|
||||
render_copyfunc_t copy = NULL;
|
||||
|
||||
if (IS_GEN2(devid))
|
||||
copy = gen2_render_copyfunc;
|
||||
else if (IS_GEN3(devid))
|
||||
copy = gen3_render_copyfunc;
|
||||
else if (IS_GEN6(devid))
|
||||
copy = gen6_render_copyfunc;
|
||||
else if (IS_GEN7(devid))
|
||||
copy = gen7_render_copyfunc;
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user