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:
Daniel Vetter
2012-11-29 14:59:57 +01:00
parent d79414f64a
commit 64f669f7a9
5 changed files with 27 additions and 28 deletions
+16
View File
@@ -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;
}