[Mesa-dev] [PATCH 1/2] gallium: Drop software-only primitive restart support.

Rob Clark robdclark at gmail.com
Mon Sep 29 17:57:43 PDT 2014


On Thu, Sep 4, 2014 at 7:43 PM, Eric Anholt <eric at anholt.net> wrote:
> The drivers not flagging primitive restart support are r300 swtcl, svga,
> nv30, and vc4.
>
> The point of primitive restart is to slightly reduce draw call overhead
> for apps by batching multiple draws.  If we do an extra pass to read the
> index buffer and split back into multiple draws, we've entirely missed the
> point.  This is particularly bad for drivers that otherwise have hardware
> IB reads, where the readback is probably uncached.

fwiw, I'd even tested this one before I implemented hw primitive
restart for a3xx..

Reviewed-by: Rob Clark <robdclark at gmail.com

> ---
>  src/mesa/state_tracker/st_extensions.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
> index 9db648c..605c5e6 100644
> --- a/src/mesa/state_tracker/st_extensions.c
> +++ b/src/mesa/state_tracker/st_extensions.c
> @@ -714,9 +714,8 @@ void st_init_extensions(struct pipe_screen *screen,
>  #endif
>     }
>
> -   extensions->NV_primitive_restart = GL_TRUE;
> -   if (!screen->get_param(screen, PIPE_CAP_PRIMITIVE_RESTART)) {
> -      consts->PrimitiveRestartInSoftware = GL_TRUE;
> +   if (screen->get_param(screen, PIPE_CAP_PRIMITIVE_RESTART)) {
> +      extensions->NV_primitive_restart = GL_TRUE;
>     }
>
>     /* ARB_color_buffer_float. */
> --
> 2.1.0
>
> _______________________________________________
> 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