From 69fd665b6491ece8c948784014ab52839c3aeb8b Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 26 Jan 2009 16:38:01 -0700 Subject: intel: whitespace changes --- src/mesa/drivers/dri/i915/intel_state.c | 26 ++-- src/mesa/drivers/dri/i965/intel_state.c | 210 ++++++++++++++++---------------- 2 files changed, 118 insertions(+), 118 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915/intel_state.c b/src/mesa/drivers/dri/i915/intel_state.c index 8d96e9baec..4ee742377d 100644 --- a/src/mesa/drivers/dri/i915/intel_state.c +++ b/src/mesa/drivers/dri/i915/intel_state.c @@ -38,30 +38,30 @@ #include "intel_regions.h" #include "swrast/swrast.h" -int -intel_translate_shadow_compare_func( GLenum func ) +int +intel_translate_shadow_compare_func(GLenum func) { - switch(func) { + switch (func) { case GL_NEVER: - return COMPAREFUNC_ALWAYS; + return COMPAREFUNC_ALWAYS; case GL_LESS: - return COMPAREFUNC_LEQUAL; + return COMPAREFUNC_LEQUAL; case GL_LEQUAL: return COMPAREFUNC_LESS; case GL_GREATER: - return COMPAREFUNC_GEQUAL; + return COMPAREFUNC_GEQUAL; case GL_GEQUAL: - return COMPAREFUNC_GREATER; + return COMPAREFUNC_GREATER; case GL_NOTEQUAL: - return COMPAREFUNC_EQUAL; + return COMPAREFUNC_EQUAL; case GL_EQUAL: - return COMPAREFUNC_NOTEQUAL; + return COMPAREFUNC_NOTEQUAL; case GL_ALWAYS: - return COMPAREFUNC_NEVER; + return COMPAREFUNC_NEVER; } fprintf(stderr, "Unknown value in %s: %x\n", __FUNCTION__, func); - return COMPAREFUNC_NEVER; + return COMPAREFUNC_NEVER; } int @@ -198,7 +198,7 @@ intel_translate_logic_op(GLenum opcode) static void -intelClearColor(GLcontext * ctx, const GLfloat color[4]) +intelClearColor(GLcontext *ctx, const GLfloat color[4]) { struct intel_context *intel = intel_context(ctx); GLubyte clear[4]; @@ -218,7 +218,7 @@ intelClearColor(GLcontext * ctx, const GLfloat color[4]) /* Fallback to swrast for select and feedback. */ static void -intelRenderMode(GLcontext * ctx, GLenum mode) +intelRenderMode(GLcontext *ctx, GLenum mode) { struct intel_context *intel = intel_context(ctx); FALLBACK(intel, INTEL_FALLBACK_RENDERMODE, (mode != GL_RENDER)); diff --git a/src/mesa/drivers/dri/i965/intel_state.c b/src/mesa/drivers/dri/i965/intel_state.c index 0c9c6707f9..4ee742377d 100644 --- a/src/mesa/drivers/dri/i965/intel_state.c +++ b/src/mesa/drivers/dri/i965/intel_state.c @@ -39,158 +39,158 @@ #include "swrast/swrast.h" int -intel_translate_shadow_compare_func( GLenum func ) +intel_translate_shadow_compare_func(GLenum func) { - switch(func) { + switch (func) { case GL_NEVER: - return COMPAREFUNC_ALWAYS; + return COMPAREFUNC_ALWAYS; case GL_LESS: - return COMPAREFUNC_LEQUAL; + return COMPAREFUNC_LEQUAL; case GL_LEQUAL: return COMPAREFUNC_LESS; case GL_GREATER: - return COMPAREFUNC_GEQUAL; + return COMPAREFUNC_GEQUAL; case GL_GEQUAL: - return COMPAREFUNC_GREATER; + return COMPAREFUNC_GREATER; case GL_NOTEQUAL: - return COMPAREFUNC_EQUAL; + return COMPAREFUNC_EQUAL; case GL_EQUAL: - return COMPAREFUNC_NOTEQUAL; + return COMPAREFUNC_NOTEQUAL; case GL_ALWAYS: - return COMPAREFUNC_NEVER; + return COMPAREFUNC_NEVER; } fprintf(stderr, "Unknown value in %s: %x\n", __FUNCTION__, func); - return COMPAREFUNC_NEVER; + return COMPAREFUNC_NEVER; } int -intel_translate_compare_func( GLenum func ) +intel_translate_compare_func(GLenum func) { - switch(func) { - case GL_NEVER: - return COMPAREFUNC_NEVER; - case GL_LESS: - return COMPAREFUNC_LESS; - case GL_LEQUAL: - return COMPAREFUNC_LEQUAL; - case GL_GREATER: - return COMPAREFUNC_GREATER; - case GL_GEQUAL: - return COMPAREFUNC_GEQUAL; - case GL_NOTEQUAL: - return COMPAREFUNC_NOTEQUAL; - case GL_EQUAL: - return COMPAREFUNC_EQUAL; - case GL_ALWAYS: - return COMPAREFUNC_ALWAYS; + switch (func) { + case GL_NEVER: + return COMPAREFUNC_NEVER; + case GL_LESS: + return COMPAREFUNC_LESS; + case GL_LEQUAL: + return COMPAREFUNC_LEQUAL; + case GL_GREATER: + return COMPAREFUNC_GREATER; + case GL_GEQUAL: + return COMPAREFUNC_GEQUAL; + case GL_NOTEQUAL: + return COMPAREFUNC_NOTEQUAL; + case GL_EQUAL: + return COMPAREFUNC_EQUAL; + case GL_ALWAYS: + return COMPAREFUNC_ALWAYS; } fprintf(stderr, "Unknown value in %s: %x\n", __FUNCTION__, func); - return COMPAREFUNC_ALWAYS; + return COMPAREFUNC_ALWAYS; } int -intel_translate_stencil_op( GLenum op ) +intel_translate_stencil_op(GLenum op) { - switch(op) { - case GL_KEEP: - return STENCILOP_KEEP; - case GL_ZERO: - return STENCILOP_ZERO; - case GL_REPLACE: - return STENCILOP_REPLACE; - case GL_INCR: + switch (op) { + case GL_KEEP: + return STENCILOP_KEEP; + case GL_ZERO: + return STENCILOP_ZERO; + case GL_REPLACE: + return STENCILOP_REPLACE; + case GL_INCR: return STENCILOP_INCRSAT; - case GL_DECR: + case GL_DECR: return STENCILOP_DECRSAT; case GL_INCR_WRAP: - return STENCILOP_INCR; + return STENCILOP_INCR; case GL_DECR_WRAP: - return STENCILOP_DECR; - case GL_INVERT: - return STENCILOP_INVERT; - default: + return STENCILOP_DECR; + case GL_INVERT: + return STENCILOP_INVERT; + default: return STENCILOP_ZERO; } } int -intel_translate_blend_factor( GLenum factor ) +intel_translate_blend_factor(GLenum factor) { - switch(factor) { - case GL_ZERO: - return BLENDFACT_ZERO; - case GL_SRC_ALPHA: - return BLENDFACT_SRC_ALPHA; - case GL_ONE: - return BLENDFACT_ONE; - case GL_SRC_COLOR: - return BLENDFACT_SRC_COLR; - case GL_ONE_MINUS_SRC_COLOR: - return BLENDFACT_INV_SRC_COLR; - case GL_DST_COLOR: - return BLENDFACT_DST_COLR; - case GL_ONE_MINUS_DST_COLOR: - return BLENDFACT_INV_DST_COLR; + switch (factor) { + case GL_ZERO: + return BLENDFACT_ZERO; + case GL_SRC_ALPHA: + return BLENDFACT_SRC_ALPHA; + case GL_ONE: + return BLENDFACT_ONE; + case GL_SRC_COLOR: + return BLENDFACT_SRC_COLR; + case GL_ONE_MINUS_SRC_COLOR: + return BLENDFACT_INV_SRC_COLR; + case GL_DST_COLOR: + return BLENDFACT_DST_COLR; + case GL_ONE_MINUS_DST_COLOR: + return BLENDFACT_INV_DST_COLR; case GL_ONE_MINUS_SRC_ALPHA: - return BLENDFACT_INV_SRC_ALPHA; - case GL_DST_ALPHA: - return BLENDFACT_DST_ALPHA; + return BLENDFACT_INV_SRC_ALPHA; + case GL_DST_ALPHA: + return BLENDFACT_DST_ALPHA; case GL_ONE_MINUS_DST_ALPHA: - return BLENDFACT_INV_DST_ALPHA; - case GL_SRC_ALPHA_SATURATE: + return BLENDFACT_INV_DST_ALPHA; + case GL_SRC_ALPHA_SATURATE: return BLENDFACT_SRC_ALPHA_SATURATE; case GL_CONSTANT_COLOR: - return BLENDFACT_CONST_COLOR; + return BLENDFACT_CONST_COLOR; case GL_ONE_MINUS_CONSTANT_COLOR: return BLENDFACT_INV_CONST_COLOR; case GL_CONSTANT_ALPHA: - return BLENDFACT_CONST_ALPHA; + return BLENDFACT_CONST_ALPHA; case GL_ONE_MINUS_CONSTANT_ALPHA: return BLENDFACT_INV_CONST_ALPHA; } - + fprintf(stderr, "Unknown value in %s: %x\n", __FUNCTION__, factor); return BLENDFACT_ZERO; } int -intel_translate_logic_op( GLenum opcode ) +intel_translate_logic_op(GLenum opcode) { - switch(opcode) { - case GL_CLEAR: - return LOGICOP_CLEAR; - case GL_AND: - return LOGICOP_AND; - case GL_AND_REVERSE: - return LOGICOP_AND_RVRSE; - case GL_COPY: - return LOGICOP_COPY; - case GL_COPY_INVERTED: - return LOGICOP_COPY_INV; - case GL_AND_INVERTED: - return LOGICOP_AND_INV; - case GL_NOOP: - return LOGICOP_NOOP; - case GL_XOR: - return LOGICOP_XOR; - case GL_OR: - return LOGICOP_OR; - case GL_OR_INVERTED: - return LOGICOP_OR_INV; - case GL_NOR: - return LOGICOP_NOR; - case GL_EQUIV: - return LOGICOP_EQUIV; - case GL_INVERT: - return LOGICOP_INV; - case GL_OR_REVERSE: - return LOGICOP_OR_RVRSE; - case GL_NAND: - return LOGICOP_NAND; - case GL_SET: - return LOGICOP_SET; + switch (opcode) { + case GL_CLEAR: + return LOGICOP_CLEAR; + case GL_AND: + return LOGICOP_AND; + case GL_AND_REVERSE: + return LOGICOP_AND_RVRSE; + case GL_COPY: + return LOGICOP_COPY; + case GL_COPY_INVERTED: + return LOGICOP_COPY_INV; + case GL_AND_INVERTED: + return LOGICOP_AND_INV; + case GL_NOOP: + return LOGICOP_NOOP; + case GL_XOR: + return LOGICOP_XOR; + case GL_OR: + return LOGICOP_OR; + case GL_OR_INVERTED: + return LOGICOP_OR_INV; + case GL_NOR: + return LOGICOP_NOR; + case GL_EQUIV: + return LOGICOP_EQUIV; + case GL_INVERT: + return LOGICOP_INV; + case GL_OR_REVERSE: + return LOGICOP_OR_RVRSE; + case GL_NAND: + return LOGICOP_NAND; + case GL_SET: + return LOGICOP_SET; default: return LOGICOP_SET; } @@ -218,15 +218,15 @@ intelClearColor(GLcontext *ctx, const GLfloat color[4]) /* Fallback to swrast for select and feedback. */ static void -intelRenderMode( GLcontext *ctx, GLenum mode ) +intelRenderMode(GLcontext *ctx, GLenum mode) { struct intel_context *intel = intel_context(ctx); - FALLBACK( intel, INTEL_FALLBACK_RENDERMODE, (mode != GL_RENDER) ); + FALLBACK(intel, INTEL_FALLBACK_RENDERMODE, (mode != GL_RENDER)); } void -intelInitStateFuncs( struct dd_function_table *functions ) +intelInitStateFuncs(struct dd_function_table *functions) { functions->RenderMode = intelRenderMode; functions->ClearColor = intelClearColor; -- cgit v1.2.3