summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2017-12-04 21:28:34 -0700
committerBrian Paul <[email protected]>2017-12-05 15:32:24 -0700
commit067f6fc1afbf48a59f2c137a4a489120dd2a5d2f (patch)
treeef1e14f814c3f77b94d5e4ff5527dac6ca33d619 /src/mesa
parente0c6769ef50d5a9d01a378195e95e1b2eae1b10a (diff)
st/mesa: whitespace fixes in st_format.c
Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_format.c18
1 files 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