I have a recollection of wanting to do something similar in the past.
However I also have a record of the test passing before (circa 2015).
OTOH we do things differently on GM107+, so ... who knows. My guess is
that it was the splitting out of is_user_buffer changed how the code
behaved somehow - perhaps wrt how it was set in the "there is nothing"
case. Can you do a bit of archaeology to see what's different now?On
Mon, Oct 8, 2018 at 12:20 PM Rhys Perry <pendingchao...@gmail.com>
wrote:
>
> Fixes crash in piglit's gl-3.1-vao-broken-attrib.
>
> Signed-off-by: Rhys Perry <pendingchao...@gmail.com>
> ---
>  src/gallium/drivers/nouveau/nvc0/nvc0_state.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c 
> b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c
> index f2393cb27b..86a8bebc25 100644
> --- a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c
> +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c
> @@ -972,7 +972,13 @@ nvc0_set_vertex_buffers(struct pipe_context *pipe,
>      for (i = 0; i < count; ++i) {
>         unsigned dst_index = start_slot + i;
>
> -       if (vb[i].is_user_buffer) {
> +       /* user buffers without any data are treated as resource buffers
> +        * without a resource
> +        */
> +       if (vb[i].is_user_buffer && !vb[i].buffer.user)
> +          nvc0->vtxbuf[i].is_user_buffer = false;
> +
> +       if (nvc0->vtxbuf[i].is_user_buffer) {
>            nvc0->vbo_user |= 1 << dst_index;
>            if (!vb[i].stride && nvc0->screen->eng3d->oclass < GM107_3D_CLASS)
>               nvc0->constant_vbos |= 1 << dst_index;
> --
> 2.17.1
>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to