[Mesa-dev] [PATCH 3/4] gallium: remove pipe_index_buffer and set_index_buffer

Axel Davy axel.davy at normalesup.org
Sun Apr 30 08:23:24 UTC 2017


Hi Marek,

Here is probably the second mistake:
I guess you should change info.start to take into account the offset of 
the index buffer.

Yours,

Axel Davy

On 29/04/2017 01:12, Marek Olšák wrote:
> CSMT_ITEM_NO_WAIT(nine_context_draw_indexed_primitive,
>                     ARG_VAL(D3DPRIMITIVETYPE, PrimitiveType),
> @@ -2588,73 +2572,77 @@ CSMT_ITEM_NO_WAIT(nine_context_draw_indexed_primitive,
>                      ARG_VAL(UINT, NumVertices),
>                      ARG_VAL(UINT, StartIndex),
>                      ARG_VAL(UINT, PrimitiveCount))
>   {
>       struct nine_context *context = &device->context;
>       struct pipe_draw_info info;
>   
>       nine_update_state(device);
>   
>       init_draw_info(&info, device, PrimitiveType, PrimitiveCount);
> -    info.indexed = TRUE;
> +    info.index_size = context->index_size;
>       info.start = StartIndex;
>       info.index_bias = BaseVertexIndex;
>       /* These don't include index bias: */
>       info.min_index = MinVertexIndex;
>       info.max_index = MinVertexIndex + NumVertices - 1;
> +    info.index.resource = context->idxbuf;
>   
>       context->pipe->draw_vbo(context->pipe, &info);
>   }




More information about the mesa-dev mailing list