vbo: don't call _glapi_set_dispatch for GL_COMPILE_AND_EXECUTE loopback
authorMarek Olšák <marek.olsak@amd.com>
Wed, 10 Aug 2022 04:08:02 +0000 (00:08 -0400)
committerMarge Bot <emma+marge@anholt.net>
Mon, 26 Sep 2022 22:58:16 +0000 (22:58 +0000)
It uses Exec directly, so this didn't do anything.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828>

src/mesa/vbo/vbo_save_api.c

index 50b5551..5abc417 100644 (file)
@@ -972,10 +972,6 @@ end:
    /* Deal with GL_COMPILE_AND_EXECUTE:
     */
    if (ctx->ExecuteFlag) {
-      struct _glapi_table *dispatch = GET_DISPATCH();
-
-      _glapi_set_dispatch(ctx->Exec);
-
       /* _vbo_loopback_vertex_list doesn't use the index buffer, so we have to
        * use buffer_in_ram (which contains all vertices) instead of current_bo
        * (which contains deduplicated vertices *when* UseLoopback is false).
@@ -989,8 +985,6 @@ end:
       vao->BufferBinding[0].Offset = -(GLintptr)(start_offset * stride);
       _vbo_loopback_vertex_list(ctx, node, save->vertex_store->buffer_in_ram);
       vao->BufferBinding[0].Offset = original;
-
-      _glapi_set_dispatch(dispatch);
    }
 
    /* Reset our structures for the next run of vertices: