clang-format: Apply formatting

Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
This commit is contained in:
jp9000
2019-06-22 22:13:45 -07:00
parent 53615ee10f
commit f53df7da64
567 changed files with 34068 additions and 32903 deletions

View File

@@ -18,7 +18,7 @@
#include "gl-subsystem.h"
static bool gl_init_zsbuffer(struct gs_zstencil_buffer *zs, uint32_t width,
uint32_t height)
uint32_t height)
{
glGenRenderbuffers(1, &zs->buffer);
if (!gl_success("glGenRenderbuffers"))
@@ -38,25 +38,31 @@ static bool gl_init_zsbuffer(struct gs_zstencil_buffer *zs, uint32_t width,
static inline GLenum get_attachment(enum gs_zstencil_format format)
{
switch (format) {
case GS_Z16: return GL_DEPTH_ATTACHMENT;
case GS_Z24_S8: return GL_DEPTH_STENCIL_ATTACHMENT;
case GS_Z32F: return GL_DEPTH_ATTACHMENT;
case GS_Z32F_S8X24: return GL_DEPTH_STENCIL_ATTACHMENT;
case GS_ZS_NONE: return 0;
case GS_Z16:
return GL_DEPTH_ATTACHMENT;
case GS_Z24_S8:
return GL_DEPTH_STENCIL_ATTACHMENT;
case GS_Z32F:
return GL_DEPTH_ATTACHMENT;
case GS_Z32F_S8X24:
return GL_DEPTH_STENCIL_ATTACHMENT;
case GS_ZS_NONE:
return 0;
}
return 0;
}
gs_zstencil_t *device_zstencil_create(gs_device_t *device, uint32_t width,
uint32_t height, enum gs_zstencil_format format)
uint32_t height,
enum gs_zstencil_format format)
{
struct gs_zstencil_buffer *zs;
zs = bzalloc(sizeof(struct gs_zstencil_buffer));
zs->format = convert_zstencil_format(format);
zs->format = convert_zstencil_format(format);
zs->attachment = get_attachment(format);
zs->device = device;
zs->device = device;
if (!gl_init_zsbuffer(zs, width, height)) {
blog(LOG_ERROR, "device_zstencil_create (GL) failed");