gallium: remove duplicated st_context_iface::st_context_private
authorMarek Olšák <marek.olsak@amd.com>
Sun, 27 Nov 2022 17:15:41 +0000 (12:15 -0500)
committerMarge Bot <emma+marge@anholt.net>
Fri, 9 Dec 2022 13:14:03 +0000 (13:14 +0000)
It's equal to fscreen, which is almost next to it.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20027>

src/gallium/include/frontend/api.h
src/mesa/state_tracker/st_cb_eglimage.c
src/mesa/state_tracker/st_context.c
src/mesa/state_tracker/st_manager.c

index df7be80..307b15a 100644 (file)
@@ -368,7 +368,6 @@ struct st_context_iface
    /**
     * Available for the gallium frontend and the manager to use.
     */
-   void *st_context_private;
    void *st_manager_private;
 
    /**
index 378313f..7071216 100644 (file)
@@ -171,8 +171,7 @@ st_get_egl_image(struct gl_context *ctx, GLeglImageOES image_handle,
 {
    struct st_context *st = st_context(ctx);
    struct pipe_screen *screen = st->screen;
-   struct pipe_frontend_screen *fscreen =
-      (struct pipe_frontend_screen *) st->iface.st_context_private;
+   struct pipe_frontend_screen *fscreen = st->iface.frontend_screen;
 
    if (!fscreen || !fscreen->get_egl_image)
       return false;
@@ -422,8 +421,7 @@ static GLboolean
 st_validate_egl_image(struct gl_context *ctx, GLeglImageOES image_handle)
 {
    struct st_context *st = st_context(ctx);
-   struct pipe_frontend_screen *fscreen =
-      (struct pipe_frontend_screen *) st->iface.st_context_private;
+   struct pipe_frontend_screen *fscreen = st->iface.frontend_screen;
 
    return fscreen->validate_egl_image(fscreen, (void *)image_handle);
 }
index 493614e..b4d7e57 100644 (file)
@@ -775,8 +775,7 @@ st_set_background_context(struct gl_context *ctx,
                           struct util_queue_monitoring *queue_info)
 {
    struct st_context *st = ctx->st;
-   struct pipe_frontend_screen *fscreen =
-      (struct pipe_frontend_screen *) st->iface.st_context_private;
+   struct pipe_frontend_screen *fscreen = st->iface.frontend_screen;
 
    assert(fscreen->set_background_context);
    fscreen->set_background_context(&st->iface, queue_info);
index e22dcfa..fda5246 100644 (file)
@@ -1136,7 +1136,6 @@ st_api_create_context(struct pipe_frontend_screen *fscreen,
    st->iface.start_thread = st_start_thread;
    st->iface.thread_finish = st_thread_finish;
    st->iface.invalidate_state = st_context_invalidate_state;
-   st->iface.st_context_private = (void *) fscreen;
    st->iface.cso_context = st->cso_context;
    st->iface.pipe = st->pipe;
    st->iface.frontend_screen = fscreen;