[Mesa-dev] [PATCH] st/nine: Remove code for no USER_INDEX_BUFFERS as these are always on

Vinson Lee vlee at freedesktop.org
Sat Feb 25 07:39:27 UTC 2017


On Fri, Feb 24, 2017 at 9:23 PM, Mike Lothian <mike at fireburn.co.uk> wrote:
> This fixes 4a883966c1f74f43afc145d2c3d27af7b8c5e01a where the pipe cap
> was removed
>
> Now USER_INDEX_BUFFERS are always enabled remove code that checks for
> them and works around them not being available
>
> Signed-off-by: Mike Lothian <mike at fireburn.co.uk>
> Cc: Marek Olšák <marek.olsak at amd.com>
> Cc: Axel Davy <axel.davy at ens.fr>
> ---
>  src/gallium/state_trackers/nine/device9.c | 17 -----------------
>  1 file changed, 17 deletions(-)
>
> diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c
> index b9b7a637d7..2217cc9d0c 100644
> --- a/src/gallium/state_trackers/nine/device9.c
> +++ b/src/gallium/state_trackers/nine/device9.c
> @@ -473,7 +473,6 @@ NineDevice9_ctor( struct NineDevice9 *This,
>      /* Allocate upload helper for drivers that suck (from st pov ;). */
>
>      This->driver_caps.user_vbufs = GET_PCAP(USER_VERTEX_BUFFERS) && !This->csmt_active;
> -    This->driver_caps.user_ibufs = GET_PCAP(USER_INDEX_BUFFERS) && !This->csmt_active;
>      This->driver_caps.user_cbufs = GET_PCAP(USER_CONSTANT_BUFFERS);
>      This->driver_caps.user_sw_vbufs = This->screen_sw->get_param(This->screen_sw, PIPE_CAP_USER_VERTEX_BUFFERS);
>      This->driver_caps.user_sw_cbufs = This->screen_sw->get_param(This->screen_sw, PIPE_CAP_USER_CONSTANT_BUFFERS);
> @@ -488,11 +487,6 @@ NineDevice9_ctor( struct NineDevice9 *This,
>                                                  PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_STREAM);
>      This->vertex_sw_uploader = u_upload_create(This->pipe_sw, 65536,
>                                              PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_STREAM);
> -    if (!This->driver_caps.user_ibufs)
> -        This->index_uploader = u_upload_create(This->csmt_active ?
> -                                                    This->pipe_secondary : This->context.pipe,
> -                                               128 * 1024,
> -                                               PIPE_BIND_INDEX_BUFFER, PIPE_USAGE_STREAM);
>      if (!This->driver_caps.user_cbufs) {
>          This->constbuf_alignment = GET_PCAP(CONSTANT_BUFFER_OFFSET_ALIGNMENT);
>          This->constbuf_uploader = u_upload_create(This->context.pipe, This->vs_const_size,
> @@ -2928,17 +2922,6 @@ NineDevice9_DrawIndexedPrimitiveUP( struct NineDevice9 *This,
>          vbuf.buffer_offset -= base;
>          vbuf.user_buffer = NULL;
>      }
> -    if (!This->driver_caps.user_ibufs) {
> -        u_upload_data(This->index_uploader,
> -                      0,
> -                      (prim_count_to_vertex_count(PrimitiveType, PrimitiveCount)) * ibuf.index_size,
> -                      4,
> -                      ibuf.user_buffer,
> -                      &ibuf.offset,
> -                      &ibuf.buffer);
> -        u_upload_unmap(This->index_uploader);
> -        ibuf.user_buffer = NULL;
> -    }
>
>      NineBeforeDraw(This);
>      nine_context_draw_indexed_primitive_from_vtxbuf_idxbuf(This, PrimitiveType,
> --
> 2.11.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99953
Fixes: 4a883966c1f7 ("gallium: remove PIPE_CAP_USER_INDEX_BUFFERS")

Tested-by: Vinson Lee <vlee at freedesktop.org>


More information about the mesa-dev mailing list