From 067f6fc1afbf48a59f2c137a4a489120dd2a5d2f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 4 Dec 2017 21:28:34 -0700 Subject: [PATCH] st/mesa: whitespace fixes in st_format.c MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Ilia Mirkin Reviewed-by: Marek Olšák --- src/mesa/state_tracker/st_format.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index 1ae677d33c5..da8b5e23a31 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -58,7 +58,8 @@ * Translate Mesa format to Gallium format. */ enum pipe_format -st_mesa_format_to_pipe_format(const struct st_context *st, mesa_format mesaFormat) +st_mesa_format_to_pipe_format(const struct st_context *st, + mesa_format mesaFormat) { switch (mesaFormat) { case MESA_FORMAT_A8B8G8R8_UNORM: @@ -1687,7 +1688,7 @@ static const struct format_mapping format_map[] = { { PIPE_FORMAT_R8G8B8A8_SINT, 0 } }, { - { GL_RGB_INTEGER_EXT, + { GL_RGB_INTEGER_EXT, GL_BGR_INTEGER_EXT, GL_RGB8I_EXT, GL_BLUE_INTEGER_EXT, 0 }, @@ -2005,6 +2006,7 @@ find_supported_format(struct pipe_screen *screen, return PIPE_FORMAT_NONE; } + struct exact_format_mapping { GLenum format; @@ -2040,6 +2042,7 @@ static const struct exact_format_mapping rgbx8888_tbl[] = { 0, 0, 0 } }; + /** * For unsized/base internal formats, we may choose a convenient effective * internal format for {format, type}. If one exists, return that, otherwise @@ -2074,6 +2077,7 @@ find_exact_format(GLint internalFormat, GLenum format, GLenum type) return PIPE_FORMAT_NONE; } + /** * Given an OpenGL internalFormat value for a texture or surface, return * the best matching PIPE_FORMAT_x, or PIPE_FORMAT_NONE if there's no match. @@ -2173,7 +2177,7 @@ st_choose_renderbuffer_format(struct st_context *st, */ enum pipe_format st_choose_matching_format(struct st_context *st, unsigned bind, - GLenum format, GLenum type, GLboolean swapBytes) + GLenum format, GLenum type, GLboolean swapBytes) { struct pipe_screen *screen = st->pipe->screen; mesa_format mesa_format; @@ -2253,7 +2257,7 @@ st_ChooseTextureFormat(struct gl_context *ctx, GLenum target, internalFormat == GL_RGBA16F || internalFormat == GL_RGB32F || internalFormat == GL_RGBA32F) - bindings |= PIPE_BIND_RENDER_TARGET; + bindings |= PIPE_BIND_RENDER_TARGET; /* GLES allows the driver to choose any format which matches * the format+type combo, because GLES only supports unsized internal @@ -2279,7 +2283,9 @@ st_ChooseTextureFormat(struct gl_context *ctx, GLenum target, return st_pipe_format_to_mesa_format(pFormat); if (!is_renderbuffer) { - /* try choosing format again, this time without render target bindings */ + /* try choosing format again, this time without render + * target bindings. + */ pFormat = st_choose_matching_format(st, PIPE_BIND_SAMPLER_VIEW, format, type, ctx->Unpack.SwapBytes); @@ -2369,6 +2375,7 @@ st_QuerySamplesForFormat(struct gl_context *ctx, GLenum target, return num_sample_counts; } + /** * ARB_internalformat_query2 driver hook. */ @@ -2428,6 +2435,7 @@ st_QueryInternalFormat(struct gl_context *ctx, GLenum target, } } + /** * This is used for translating texture border color and the clear * color. For example, the clear color is interpreted according to -- 2.30.2