[Mesa-dev] [PATCH V3 2/4] r600g: add MAX_VERTEX_ATTRIB_STRIDE

Ilia Mirkin imirkin at alum.mit.edu
Tue Aug 19 22:53:15 PDT 2014


On Wed, Aug 20, 2014 at 1:46 AM, Timothy Arceri <t_arceri at yahoo.com.au> wrote:
> Signed-off-by: Timothy Arceri <t_arceri at yahoo.com.au>
> ---
>
>  Note: I have not tested that this patch works as I dont
>  have access to the hardware.
>
>  src/gallium/drivers/r600/r600_pipe.c   | 3 +++
>  src/gallium/include/pipe/p_defines.h   | 1 +
>  src/mesa/state_tracker/st_extensions.c | 3 +++
>  3 files changed, 7 insertions(+)
>
> diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
> index e02c053..2e134b0 100644
> --- a/src/gallium/drivers/r600/r600_pipe.c
> +++ b/src/gallium/drivers/r600/r600_pipe.c
> @@ -339,6 +339,9 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
>         case PIPE_CAP_MAX_VERTEX_STREAMS:
>                 return 1;
>
> +       case PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE;
> +               return 2047;
> +
>         /* Texturing. */
>         case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
>         case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
> diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
> index 04e4798..aae8229 100644
> --- a/src/gallium/include/pipe/p_defines.h
> +++ b/src/gallium/include/pipe/p_defines.h
> @@ -569,6 +569,7 @@ enum pipe_cap {
>     PIPE_CAP_VIDEO_MEMORY = 106,
>     PIPE_CAP_UMA = 107,
>     PIPE_CAP_CONDITIONAL_RENDER_INVERTED = 108,
> +   PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE = 109,

Need to add this to src/gallium/docs/.../screen.rst

>  };
>
>  #define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)
> diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
> index 4110eb5..9db648c 100644
> --- a/src/mesa/state_tracker/st_extensions.c
> +++ b/src/mesa/state_tracker/st_extensions.c
> @@ -289,6 +289,9 @@ void st_init_limits(struct pipe_screen *screen,
>     /* The vertex stream must fit into pipe_stream_output_info::stream */
>     assert(c->MaxVertexStreams <= 4);
>
> +   c->MaxVertexAttribStride
> +      = screen->get_param(screen, PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE);

This will cause it to get set to 0 for all the drivers you didn't add
this to... (and also compile warnings for many of them). The usual
thing when adding a new PIPE_CAP is to update all the drivers, giving
them whatever the default value is (in this case, I guess 2048).

> +
>     c->StripTextureBorder = GL_TRUE;
>
>     c->GLSLSkipStrictMaxUniformLimitCheck =
> --
> 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