[Mesa-dev] [PATCH] r600: use pipe->hw prim convert from radeonsi

Marek Olšák maraeo at gmail.com
Sun May 10 13:26:31 PDT 2015


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Sun, May 10, 2015 at 10:25 PM, Dave Airlie <airlied at gmail.com> wrote:
> This avoids future addition to PIPE_PRIM_ from causing regressions
> on r600g.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/gallium/drivers/r600/r600_state_common.c | 31 ++++++++++++++--------------
>  1 file changed, 16 insertions(+), 15 deletions(-)
>
> diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
> index c50c705..2ec4fb8 100644
> --- a/src/gallium/drivers/r600/r600_state_common.c
> +++ b/src/gallium/drivers/r600/r600_state_common.c
> @@ -95,22 +95,23 @@ static void r600_texture_barrier(struct pipe_context *ctx)
>  static unsigned r600_conv_pipe_prim(unsigned prim)
>  {
>         static const unsigned prim_conv[] = {
> -               V_008958_DI_PT_POINTLIST,
> -               V_008958_DI_PT_LINELIST,
> -               V_008958_DI_PT_LINELOOP,
> -               V_008958_DI_PT_LINESTRIP,
> -               V_008958_DI_PT_TRILIST,
> -               V_008958_DI_PT_TRISTRIP,
> -               V_008958_DI_PT_TRIFAN,
> -               V_008958_DI_PT_QUADLIST,
> -               V_008958_DI_PT_QUADSTRIP,
> -               V_008958_DI_PT_POLYGON,
> -               V_008958_DI_PT_LINELIST_ADJ,
> -               V_008958_DI_PT_LINESTRIP_ADJ,
> -               V_008958_DI_PT_TRILIST_ADJ,
> -               V_008958_DI_PT_TRISTRIP_ADJ,
> -               V_008958_DI_PT_RECTLIST
> +               [PIPE_PRIM_POINTS]                      = V_008958_DI_PT_POINTLIST,
> +               [PIPE_PRIM_LINES]                       = V_008958_DI_PT_LINELIST,
> +               [PIPE_PRIM_LINE_LOOP]                   = V_008958_DI_PT_LINELOOP,
> +               [PIPE_PRIM_LINE_STRIP]                  = V_008958_DI_PT_LINESTRIP,
> +               [PIPE_PRIM_TRIANGLES]                   = V_008958_DI_PT_TRILIST,
> +               [PIPE_PRIM_TRIANGLE_STRIP]              = V_008958_DI_PT_TRISTRIP,
> +               [PIPE_PRIM_TRIANGLE_FAN]                = V_008958_DI_PT_TRIFAN,
> +               [PIPE_PRIM_QUADS]                       = V_008958_DI_PT_QUADLIST,
> +               [PIPE_PRIM_QUAD_STRIP]                  = V_008958_DI_PT_QUADSTRIP,
> +               [PIPE_PRIM_POLYGON]                     = V_008958_DI_PT_POLYGON,
> +               [PIPE_PRIM_LINES_ADJACENCY]             = V_008958_DI_PT_LINELIST_ADJ,
> +               [PIPE_PRIM_LINE_STRIP_ADJACENCY]        = V_008958_DI_PT_LINESTRIP_ADJ,
> +               [PIPE_PRIM_TRIANGLES_ADJACENCY]         = V_008958_DI_PT_TRILIST_ADJ,
> +               [PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY]    = V_008958_DI_PT_TRISTRIP_ADJ,
> +               [R600_PRIM_RECTANGLE_LIST]              = V_008958_DI_PT_RECTLIST
>         };
> +       assert(mode < Elements(prim_conv));
>         return prim_conv[prim];
>  }
>
> --
> 1.9.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list