gallium: move st function declarations from api.h into st_context.h
authorMarek Olšák <marek.olsak@amd.com>
Sun, 27 Nov 2022 19:40:28 +0000 (14:40 -0500)
committerMarge Bot <emma+marge@anholt.net>
Fri, 9 Dec 2022 13:14:03 +0000 (13:14 +0000)
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_context.h
src/mesa/state_tracker/st_manager.c

index 4f99cfb..eda81a5 100644 (file)
@@ -406,55 +406,4 @@ struct pipe_frontend_screen
    void *st_manager_private;
 };
 
-/**
- * The following st_api_* functions represent the OpenGL rendering API.
- *
- * Implemented by the gallium frontend and used by the frontend manager.
- */
-
-/**
- * Query supported OpenGL versions. (if applicable)
- * The format is (major*10+minor).
- */
-void
-st_api_query_versions(struct pipe_frontend_screen *fscreen,
-                      struct st_config_options *options,
-                      int *gl_core_version,
-                      int *gl_compat_version,
-                      int *gl_es1_version,
-                      int *gl_es2_version);
-
-/**
- * Create a rendering context.
- */
-struct st_context *
-st_api_create_context(struct pipe_frontend_screen *fscreen,
-                      const struct st_context_attribs *attribs,
-                      enum st_context_error *error,
-                      struct st_context *shared_ctx);
-
-/**
- * Bind the context to the calling thread with draw and read as drawables.
- *
- * The framebuffers might be NULL, or might have different visuals than the
- * context does.
- */
-bool
-st_api_make_current(struct st_context *st,
-                    struct st_framebuffer_iface *stdrawi,
-                    struct st_framebuffer_iface *streadi);
-
-/**
- * Get the currently bound context in the calling thread.
- */
-struct st_context *
-st_api_get_current(void);
-
-/**
- * Notify the st manager the framebuffer interface object
- * is no longer valid.
- */
-void
-st_api_destroy_drawable(struct st_framebuffer_iface *stfbi);
-
 #endif /* _API_H_ */
index 3185de0..b3c3ef4 100644 (file)
@@ -453,6 +453,32 @@ st_get_nir_compiler_options(struct st_context *st, gl_shader_stage stage);
 void st_invalidate_state(struct gl_context *ctx);
 void st_set_background_context(struct gl_context *ctx,
                                struct util_queue_monitoring *queue_info);
+
+void
+st_api_query_versions(struct pipe_frontend_screen *fscreen,
+                      struct st_config_options *options,
+                      int *gl_core_version,
+                      int *gl_compat_version,
+                      int *gl_es1_version,
+                      int *gl_es2_version);
+
+struct st_context *
+st_api_create_context(struct pipe_frontend_screen *fscreen,
+                      const struct st_context_attribs *attribs,
+                      enum st_context_error *error,
+                      struct st_context *shared_ctx);
+
+bool
+st_api_make_current(struct st_context *st,
+                    struct st_framebuffer_iface *stdrawi,
+                    struct st_framebuffer_iface *streadi);
+
+struct st_context *
+st_api_get_current(void);
+
+void
+st_api_destroy_drawable(struct st_framebuffer_iface *stfbi);
+
 #ifdef __cplusplus
 }
 #endif
index edee3ff..28b370c 100644 (file)
@@ -931,6 +931,9 @@ st_manager_destroy(struct pipe_frontend_screen *fscreen)
 }
 
 
+/**
+ * Create a rendering context.
+ */
 struct st_context *
 st_api_create_context(struct pipe_frontend_screen *fscreen,
                       const struct st_context_attribs *attribs,
@@ -1071,6 +1074,9 @@ st_api_create_context(struct pipe_frontend_screen *fscreen,
 }
 
 
+/**
+ * Get the currently bound context in the calling thread.
+ */
 struct st_context *
 st_api_get_current(void)
 {
@@ -1124,6 +1130,11 @@ st_framebuffer_reuse_or_create(struct st_context *st,
 }
 
 
+/**
+ * Bind the context to the calling thread with draw and read as drawables.
+ *
+ * The framebuffers might be NULL, meaning the context is surfaceless.
+ */
 bool
 st_api_make_current(struct st_context *st,
                     struct st_framebuffer_iface *stdrawi,
@@ -1350,6 +1361,10 @@ get_version(struct pipe_screen *screen,
 }
 
 
+/**
+ * Query supported OpenGL versions. (if applicable)
+ * The format is (major*10+minor).
+ */
 void
 st_api_query_versions(struct pipe_frontend_screen *fscreen,
                       struct st_config_options *options,