[Mesa-dev] [PATCH] st/mesa: set the vbuffer to NULL if we are skipping it
Marek Olšák
maraeo at gmail.com
Thu Sep 3 18:27:01 PDT 2015
It's not required to set buffer_offset, because buffer=NULL and
user_buffer=NULL indicate a disabled slot. Anyway:
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Fri, Sep 4, 2015 at 2:25 AM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> If we skip a vbuffer we need to make sure we NULL out
> the contents, otherwise when it gets passed to the driver
> it will get confused.
>
> This was hit by:
> GL41-CTS.gpu_shader_fp64.varyings
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> src/mesa/state_tracker/st_atom_array.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_atom_array.c b/src/mesa/state_tracker/st_atom_array.c
> index 56b8019..0847184 100644
> --- a/src/mesa/state_tracker/st_atom_array.c
> +++ b/src/mesa/state_tracker/st_atom_array.c
> @@ -567,8 +567,12 @@ setup_non_interleaved_attribs(struct st_context *st,
> unsigned src_format;
>
> array = get_client_array(vp, arrays, attr);
> - if (!array)
> + if (!array) {
> + vbuffer[attr].buffer = NULL;
> + vbuffer[attr].user_buffer = NULL;
> + vbuffer[attr].buffer_offset = 0;
> continue;
> + }
>
> stride = array->StrideB;
> bufobj = array->BufferObj;
> --
> 2.4.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