From cacb88490a98af2d9abc582acef385c7b9d1a372 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 10 Nov 2017 11:05:01 -0700 Subject: [PATCH] st/mesa: whitespace fixes in st_manager.c Trivial. --- src/mesa/state_tracker/st_manager.c | 36 +++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index 1121b5cfc42..380b05c53f5 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -106,6 +106,7 @@ attachment_to_buffer_index(enum st_attachment_type statt) return index; } + /** * Map a buffer index to an attachment. */ @@ -141,6 +142,7 @@ buffer_index_to_attachment(gl_buffer_index index) return statt; } + /** * Make sure a context picks up the latest cached state of the * drawables it binds to. @@ -169,6 +171,7 @@ st_context_validate(struct st_context *st, } } + /** * Validate a framebuffer to make sure up-to-date pipe_textures are used. * The context is only used for creating pipe surfaces and for calling @@ -258,6 +261,7 @@ st_framebuffer_validate(struct st_framebuffer *stfb, } } + /** * Update the attachments to validate by looping the existing renderbuffers. */ @@ -283,6 +287,7 @@ st_framebuffer_update_attachments(struct st_framebuffer *stfb) stfb->stamp++; } + /** * Add a renderbuffer to the framebuffer. The framebuffer is one that * corresponds to a window and is not a user-created FBO. @@ -346,6 +351,7 @@ st_framebuffer_add_renderbuffer(struct st_framebuffer *stfb, return TRUE; } + /** * Intialize a struct gl_config from a visual. */ @@ -357,6 +363,7 @@ st_visual_to_context_mode(const struct st_visual *visual, if (st_visual_have_buffers(visual, ST_ATTACHMENT_BACK_LEFT_MASK)) mode->doubleBufferMode = GL_TRUE; + if (st_visual_have_buffers(visual, ST_ATTACHMENT_FRONT_RIGHT_MASK | ST_ATTACHMENT_BACK_RIGHT_MASK)) mode->stereoMode = GL_TRUE; @@ -417,6 +424,7 @@ st_visual_to_context_mode(const struct st_visual *visual, } } + /** * Create a framebuffer from a manager interface. */ @@ -491,6 +499,7 @@ st_framebuffer_create(struct st_context *st, return stfb; } + /** * Reference a framebuffer. */ @@ -624,6 +633,7 @@ st_framebuffers_purge(struct st_context *st) } } + static void st_context_flush(struct st_context_iface *stctxi, unsigned flags, struct pipe_fence_handle **fence) @@ -751,6 +761,7 @@ st_context_teximage(struct st_context_iface *stctxi, return TRUE; } + static void st_context_copy(struct st_context_iface *stctxi, struct st_context_iface *stsrci, unsigned mask) @@ -761,6 +772,7 @@ st_context_copy(struct st_context_iface *stctxi, _mesa_copy_context(src->ctx, st->ctx, mask); } + static boolean st_context_share(struct st_context_iface *stctxi, struct st_context_iface *stsrci) @@ -771,6 +783,7 @@ st_context_share(struct st_context_iface *stctxi, return _mesa_share_state(st->ctx, src->ctx); } + static void st_context_destroy(struct st_context_iface *stctxi) { @@ -778,6 +791,7 @@ st_context_destroy(struct st_context_iface *stctxi) st_destroy_context(st); } + static void st_start_thread(struct st_context_iface *stctxi) { @@ -786,6 +800,7 @@ st_start_thread(struct st_context_iface *stctxi) _mesa_glthread_init(st->ctx); } + static void st_thread_finish(struct st_context_iface *stctxi) { @@ -872,7 +887,8 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi, } st_visual_to_context_mode(&attribs->visual, &mode); - st = st_create_context(api, pipe, &mode, shared_ctx, &attribs->options, no_error); + st = st_create_context(api, pipe, &mode, shared_ctx, + &attribs->options, no_error); if (!st) { *error = ST_CONTEXT_ERROR_NO_MEMORY; pipe->destroy(pipe); @@ -936,15 +952,17 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi, return &st->iface; } + static struct st_context_iface * st_api_get_current(struct st_api *stapi) { GET_CURRENT_CONTEXT(ctx); - struct st_context *st = (ctx) ? ctx->st : NULL; + struct st_context *st = ctx ? ctx->st : NULL; - return (st) ? &st->iface : NULL; + return st ? &st->iface : NULL; } + static struct st_framebuffer * st_framebuffer_reuse_or_create(struct st_context *st, struct gl_framebuffer *fb, @@ -953,7 +971,7 @@ st_framebuffer_reuse_or_create(struct st_context *st, struct st_framebuffer *cur = NULL, *stfb = NULL; if (!stfbi) - return NULL; + return NULL; /* Check if there is already a framebuffer object for the specified * framebuffer interface in this context. If there is one, use it. @@ -988,6 +1006,7 @@ st_framebuffer_reuse_or_create(struct st_context *st, return stfb; } + static boolean st_api_make_current(struct st_api *stapi, struct st_context_iface *stctxi, struct st_framebuffer_iface *stdrawi, @@ -1046,11 +1065,13 @@ st_api_make_current(struct st_api *stapi, struct st_context_iface *stctxi, return ret; } + static void st_api_destroy(struct st_api *stapi) { } + /** * Flush the front buffer if the current context renders to the front buffer. */ @@ -1061,7 +1082,8 @@ st_manager_flush_frontbuffer(struct st_context *st) struct st_renderbuffer *strb = NULL; if (stfb) - strb = st_renderbuffer(stfb->Base.Attachment[BUFFER_FRONT_LEFT].Renderbuffer); + strb = st_renderbuffer(stfb->Base.Attachment[BUFFER_FRONT_LEFT]. + Renderbuffer); /* Do we have a front color buffer and has it been drawn to since last * frontbuffer flush? @@ -1076,6 +1098,7 @@ st_manager_flush_frontbuffer(struct st_context *st) } } + /** * Re-validate the framebuffers. */ @@ -1185,6 +1208,7 @@ get_version(struct pipe_screen *screen, return _mesa_get_version(&extensions, &consts, api); } + static void st_api_query_versions(struct st_api *stapi, struct st_manager *sm, struct st_config_options *options, @@ -1199,6 +1223,7 @@ st_api_query_versions(struct st_api *stapi, struct st_manager *sm, *gl_es2_version = get_version(sm->screen, options, API_OPENGLES2); } + static const struct st_api st_gl_api = { .name = "Mesa " PACKAGE_VERSION, .api = ST_API_OPENGL, @@ -1216,6 +1241,7 @@ static const struct st_api st_gl_api = { .destroy_drawable = st_api_destroy_drawable, }; + struct st_api * st_gl_api_create(void) { -- 2.30.2