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

Matthew Auld matthew.william.auld at gmail.com
Wed Jan 10 12:33:03 UTC 2024


On Wed, 10 Jan 2024 at 12:25, Zbigniew Kempczyński
<zbigniew.kempczynski at intel.com> wrote:
>
> 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>
> Cc: Matthew Auld <matthew.william.auld at gmail.com>
> ---
> v3: Drop feature selection toward direct ver/platform (Matt)
> ---
>  lib/intel_batchbuffer.c | 40 +++++++++++++++++++++-------------------
>  1 file changed, 21 insertions(+), 19 deletions(-)
>
> diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
> index ccab55cec7..85023f9e6f 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;
> -       else if (HAS_FLATCCS(devid))
> -               copy = gen12p71_render_copyfunc;
> -       else if (IS_METEORLAKE(devid))
> +       if (IS_METEORLAKE(devid))
>                 copy = mtl_render_copyfunc;
> +       else if (IS_DG2(devid))
> +               copy = gen12p71_render_copyfunc;
> +       else if (IS_GEN(devid, 20))
> +               copy = xe2_render_copyfunc;

Nit: Maybe keep this sorted by platform. i.e xe2 at the top.

Reviewed-by: Matthew Auld <matthew.auld at Intel.com>

>         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