gallium: rename st_context_iface::st_manager_private to frontend_context
authorMarek Olšák <marek.olsak@amd.com>
Sun, 27 Nov 2022 17:21:45 +0000 (12:21 -0500)
committerMarge Bot <emma+marge@anholt.net>
Fri, 9 Dec 2022 13:14:03 +0000 (13:14 +0000)
It's really dri_context for DRI.

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/frontends/dri/dri_context.c
src/gallium/frontends/dri/dri_drawable.c
src/gallium/frontends/dri/dri_screen.c
src/gallium/frontends/glx/xlib/xm_api.c
src/gallium/frontends/hgl/hgl.c
src/gallium/frontends/osmesa/osmesa.c
src/gallium/frontends/wgl/stw_context.c
src/gallium/include/frontend/api.h
src/gallium/targets/haiku-softpipe/GalliumContext.cpp

index 95f701d..6b2b275 100644 (file)
@@ -197,7 +197,7 @@ dri_create_context(struct dri_screen *screen,
       }
       goto fail;
    }
-   ctx->st->st_manager_private = (void *) ctx;
+   ctx->st->frontend_context = (void *) ctx;
 
    if (ctx->st->cso_context) {
       ctx->pp = pp_init(ctx->st->pipe, screen->pp_enabled, ctx->st->cso_context,
@@ -345,7 +345,7 @@ dri_get_current(void)
 {
    struct st_context_iface *st = st_api_get_current();
 
-   return (struct dri_context *) st ? st->st_manager_private : NULL;
+   return (struct dri_context *) st ? st->frontend_context : NULL;
 }
 
 /* vim: set sw=3 ts=8 sts=3 expandtab: */
index 07a9ca0..2de80ac 100644 (file)
@@ -47,7 +47,7 @@ dri_st_framebuffer_validate(struct st_context_iface *stctx,
                             unsigned count,
                             struct pipe_resource **out)
 {
-   struct dri_context *ctx = (struct dri_context *)stctx->st_manager_private;
+   struct dri_context *ctx = (struct dri_context *)stctx->frontend_context;
    struct dri_drawable *drawable =
       (struct dri_drawable *) stfbi->st_manager_private;
    struct dri_screen *screen = drawable->screen;
@@ -114,7 +114,7 @@ dri_st_framebuffer_flush_front(struct st_context_iface *stctx,
                                struct st_framebuffer_iface *stfbi,
                                enum st_attachment_type statt)
 {
-   struct dri_context *ctx = (struct dri_context *)stctx->st_manager_private;
+   struct dri_context *ctx = (struct dri_context *)stctx->frontend_context;
    struct dri_drawable *drawable =
       (struct dri_drawable *) stfbi->st_manager_private;
 
@@ -129,7 +129,7 @@ static bool
 dri_st_framebuffer_flush_swapbuffers(struct st_context_iface *stctx,
                                      struct st_framebuffer_iface *stfbi)
 {
-   struct dri_context *ctx = (struct dri_context *)stctx->st_manager_private;
+   struct dri_context *ctx = (struct dri_context *)stctx->frontend_context;
    struct dri_drawable *drawable =
       (struct dri_drawable *) stfbi->st_manager_private;
 
index 235c991..16c3280 100644 (file)
@@ -811,7 +811,7 @@ static void
 dri_set_background_context(struct st_context_iface *st,
                            struct util_queue_monitoring *queue_info)
 {
-   struct dri_context *ctx = (struct dri_context *)st->st_manager_private;
+   struct dri_context *ctx = (struct dri_context *)st->frontend_context;
    const __DRIbackgroundCallableExtension *backgroundCallable =
       ctx->screen->dri2.backgroundCallable;
 
index fc0987e..cdafc89 100644 (file)
@@ -1009,7 +1009,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list,
    if (c->st == NULL)
       goto no_st;
 
-   c->st->st_manager_private = (void *) c;
+   c->st->frontend_context = (void *) c;
 
    c->hud = hud_create(c->st->cso_context, c->st, NULL);
 
@@ -1318,7 +1318,7 @@ GLboolean XMesaUnbindContext( XMesaContext c )
 XMesaContext XMesaGetCurrentContext( void )
 {
    struct st_context_iface *st = st_api_get_current();
-   return (XMesaContext) (st) ? st->st_manager_private : NULL;
+   return (XMesaContext) (st) ? st->frontend_context : NULL;
 }
 
 
index 2b42795..c3b1cbd 100644 (file)
@@ -36,7 +36,7 @@ hgl_st_context(struct st_context_iface *stctxi)
 {
        struct hgl_context* context;
        assert(stctxi);
-       context = (struct hgl_context*)stctxi->st_manager_private;
+       context = (struct hgl_context*)stctxi->frontend_context;
        assert(context);
        return context;
 }
@@ -345,7 +345,7 @@ hgl_create_display(struct pipe_screen* screen)
        assert(display->fscreen);
        display->fscreen->screen = screen;
        display->fscreen->get_param = hgl_st_manager_get_param;
-       // display->manager->st_manager_private is used by llvmpipe
+       // display->fscreen->st_manager_private is used by llvmpipe
 
        return display;
 }
index fa432fc..aa342c2 100644 (file)
@@ -686,7 +686,7 @@ OSMesaCreateContextAttribs(const int *attribList, OSMesaContext sharelist)
       return NULL;
    }
 
-   osmesa->stctx->st_manager_private = osmesa;
+   osmesa->stctx->frontend_context = osmesa;
 
    osmesa->format = format;
    osmesa->user_row_length = 0;
@@ -822,7 +822,7 @@ GLAPI OSMesaContext GLAPIENTRY
 OSMesaGetCurrentContext(void)
 {
    struct st_context_iface *st = st_api_get_current();
-   return st ? (OSMesaContext) st->st_manager_private : NULL;
+   return st ? (OSMesaContext) st->frontend_context : NULL;
 }
 
 
index 7239d3d..bfb06af 100644 (file)
@@ -56,7 +56,7 @@ stw_current_context(void)
 
    st = (stw_dev) ? st_api_get_current() : NULL;
 
-   return (struct stw_context *) ((st) ? st->st_manager_private : NULL);
+   return (struct stw_context *) ((st) ? st->frontend_context : NULL);
 }
 
 
@@ -246,7 +246,7 @@ stw_create_context_attribs(HDC hdc, INT iLayerPlane, struct stw_context *shareCt
    if (ctx->st == NULL)
       goto no_st_ctx;
 
-   ctx->st->st_manager_private = (void *) ctx;
+   ctx->st->frontend_context = (void *) ctx;
 
    if (ctx->st->cso_context) {
       ctx->hud = hud_create(ctx->st->cso_context, ctx->st, NULL);
index 307b15a..693ea83 100644 (file)
@@ -366,12 +366,12 @@ struct st_framebuffer_iface
 struct st_context_iface
 {
    /**
-    * Available for the gallium frontend and the manager to use.
+    * The frontend context. (such as dri_context)
     */
-   void *st_manager_private;
+   void *frontend_context;
 
    /**
-    * The frontend manager that manages this object.
+    * The frontend screen. (such as dri_screen)
     */
    struct pipe_frontend_screen *frontend_screen;
 
index 6ddb8be..c156e6e 100644 (file)
@@ -213,8 +213,8 @@ GalliumContext::CreateContext(HGLWinsysContext *wsContext)
                return -1;
        }
 
-       assert(!context->st->st_manager_private);
-       context->st->st_manager_private = (void*)context;
+       assert(!context->st->frontend_context);
+       context->st->frontend_context = (void*)context;
 
        struct st_context *stContext = (struct st_context*)context->st;