diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rendercopy.h | 2 | ||||
-rw-r--r-- | lib/rendercopy_i830.c | 16 |
2 files changed, 18 insertions, 0 deletions
diff --git a/lib/rendercopy.h b/lib/rendercopy.h index 5989d503..b03c1472 100644 --- a/lib/rendercopy.h +++ b/lib/rendercopy.h @@ -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, diff --git a/lib/rendercopy_i830.c b/lib/rendercopy_i830.c index 28c3e99e..20f3dc6e 100644 --- a/lib/rendercopy_i830.c +++ b/lib/rendercopy_i830.c @@ -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; +} |