[PATCH i-g-t v2 2/3] lib/intel_batchbuffer: Select xe2 rendercopy for LunarLake

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Tue Jan 9 13:21:04 UTC 2024


Along with rendercopy xe2 pipeline / shader selection for LunarLake
reorganize if/else conditionals to handle specific selection first.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Cc: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
Cc: Dominik Grzegorzek <dominik.grzegorzek at intel.com>
---
 lib/intel_batchbuffer.c | 38 ++++++++++++++++++++------------------
 1 file changed, 20 insertions(+), 18 deletions(-)

diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
index ccab55cec7..5cd5dd9133 100644
--- a/lib/intel_batchbuffer.c
+++ b/lib/intel_batchbuffer.c
@@ -656,28 +656,30 @@ igt_render_copyfunc_t igt_get_render_copyfunc(int devid)
 {
 	igt_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_GEN4(devid) || IS_GEN5(devid))
-		copy = gen4_render_copyfunc;
-	else if (IS_GEN6(devid))
-		copy = gen6_render_copyfunc;
-	else if (IS_GEN7(devid))
-		copy = gen7_render_copyfunc;
-	else if (IS_GEN8(devid))
-		copy = gen8_render_copyfunc;
-	else if (IS_GEN9(devid) || IS_GEN10(devid))
-		copy = gen9_render_copyfunc;
-	else if (IS_GEN11(devid))
-		copy = gen11_render_copyfunc;
+	if (IS_METEORLAKE(devid))
+		copy = mtl_render_copyfunc;
+	else if (IS_LUNARLAKE(devid))
+		copy = xe2_render_copyfunc;
 	else if (HAS_FLATCCS(devid))
 		copy = gen12p71_render_copyfunc;
-	else if (IS_METEORLAKE(devid))
-		copy = mtl_render_copyfunc;
 	else if (IS_GEN12(devid))
 		copy = gen12_render_copyfunc;
+	else if (IS_GEN11(devid))
+		copy = gen11_render_copyfunc;
+	else if (IS_GEN9(devid) || IS_GEN10(devid))
+		copy = gen9_render_copyfunc;
+	else if (IS_GEN8(devid))
+		copy = gen8_render_copyfunc;
+	else if (IS_GEN7(devid))
+		copy = gen7_render_copyfunc;
+	else if (IS_GEN6(devid))
+		copy = gen6_render_copyfunc;
+	else if (IS_GEN4(devid) || IS_GEN5(devid))
+		copy = gen4_render_copyfunc;
+	else if (IS_GEN3(devid))
+		copy = gen3_render_copyfunc;
+	else if (IS_GEN2(devid))
+		copy = gen2_render_copyfunc;
 
 	return copy;
 }
-- 
2.34.1



More information about the igt-dev mailing list