From b1503b202043a577720e28969b74cca6f9c954f8 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Mon, 25 May 2015 20:34:09 +0200 Subject: Remove every trailing whitespace from the project (but externals). --- src/video_core/command_processor.cpp | 8 ++++---- src/video_core/debug_utils/debug_utils.cpp | 2 +- src/video_core/math.h | 2 +- src/video_core/pica.h | 8 ++++---- src/video_core/rasterizer.cpp | 2 +- src/video_core/renderer_opengl/generated/gl_3_2_core.c | 16 ++++++++-------- src/video_core/renderer_opengl/gl_rasterizer.cpp | 2 +- src/video_core/renderer_opengl/gl_state.cpp | 2 +- src/video_core/renderer_opengl/gl_state.h | 2 +- src/video_core/renderer_opengl/renderer_opengl.cpp | 2 +- src/video_core/vertex_shader.cpp | 4 ++-- 11 files changed, 25 insertions(+), 25 deletions(-) (limited to 'src/video_core') diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp index 100d8c7c1..29ba6b769 100644 --- a/src/video_core/command_processor.cpp +++ b/src/video_core/command_processor.cpp @@ -136,7 +136,7 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) { input.attr[i][0].ToFloat32(), input.attr[i][1].ToFloat32(), input.attr[i][2].ToFloat32(), input.attr[i][3].ToFloat32()); } - + // Load per-vertex data from the loader arrays for (unsigned int comp = 0; comp < vertex_attribute_elements[i]; ++comp) { const u8* srcdata = Memory::GetPhysicalPointer(vertex_attribute_sources[i] + vertex_attribute_strides[i] * vertex + comp * vertex_attribute_element_size[i]); @@ -193,7 +193,7 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) { const Pica::VertexShader::OutputVertex& v2) { VideoCore::g_renderer->hw_rasterizer->AddTriangle(v0, v1, v2); }; - + primitive_assembler.SubmitVertex(output, AddHWTriangle); } else { // Send to triangle clipper @@ -282,7 +282,7 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) { } break; } - + // Load default vertex input attributes case PICA_REG_INDEX_WORKAROUND(vs_default_attributes_setup.set_value[0], 0x233): case PICA_REG_INDEX_WORKAROUND(vs_default_attributes_setup.set_value[1], 0x234): @@ -306,7 +306,7 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) { } Math::Vec4& attribute = g_state.vs.default_attributes[setup.index]; - + // NOTE: The destination component order indeed is "backwards" attribute.w = float24::FromRawFloat24(default_attr_write_buffer[0] >> 8); attribute.z = float24::FromRawFloat24(((default_attr_write_buffer[0] & 0xFF) << 16) | ((default_attr_write_buffer[1] >> 16) & 0xFFFF)); diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp index 7987b922c..b92cd1a7e 100644 --- a/src/video_core/debug_utils/debug_utils.cpp +++ b/src/video_core/debug_utils/debug_utils.cpp @@ -319,7 +319,7 @@ const Math::Vec4 LookupTexture(const u8* source, int x, int y, const Texture // TODO(neobrain): Fix code design to unify vertical block offsets! source += coarse_y * info.stride; } - + // TODO: Assert that width/height are multiples of block dimensions switch (info.format) { diff --git a/src/video_core/math.h b/src/video_core/math.h index f9a822658..4928c9bf2 100644 --- a/src/video_core/math.h +++ b/src/video_core/math.h @@ -461,7 +461,7 @@ public: // e.g. Vec2 uv() { return Vec2(x,y); } // _DEFINE_SWIZZLER2 defines a single such function - // DEFINE_SWIZZLER2_COMP1 defines one-component functions for all component names (x<->r) + // DEFINE_SWIZZLER2_COMP1 defines one-component functions for all component names (x<->r) // DEFINE_SWIZZLER2_COMP2 defines two component functions for all component names (x<->r) and permutations (xy<->yx) #define _DEFINE_SWIZZLER2(a, b, name) const Vec2 name() const { return Vec2(a, b); } #define DEFINE_SWIZZLER2_COMP1(a, a2) \ diff --git a/src/video_core/pica.h b/src/video_core/pica.h index b67dce1a9..6ebeb08f7 100644 --- a/src/video_core/pica.h +++ b/src/video_core/pica.h @@ -16,7 +16,7 @@ #include "common/common_types.h" #include "common/logging/log.h" -#include "math.h" +#include "math.h" namespace Pica { @@ -337,7 +337,7 @@ struct Regs { return (stage_index < 4) && (update_mask_a & (1 << stage_index)); } } tev_combiner_buffer_input; - + INSERT_PADDING_WORDS(0xf); TevStageConfig tev_stage4; INSERT_PADDING_WORDS(0x3); @@ -703,11 +703,11 @@ struct Regs { struct { // Index of the current default attribute u32 index; - + // Writing to these registers sets the "current" default attribute. u32 set_value[3]; } vs_default_attributes_setup; - + INSERT_PADDING_WORDS(0x28); enum class TriangleTopology : u32 { diff --git a/src/video_core/rasterizer.cpp b/src/video_core/rasterizer.cpp index 767ff4205..6df3a74f2 100644 --- a/src/video_core/rasterizer.cpp +++ b/src/video_core/rasterizer.cpp @@ -104,7 +104,7 @@ static u32 GetDepth(int x, int y) { u8* depth_buffer = Memory::GetPhysicalPointer(addr); y = framebuffer.height - y; - + const u32 coarse_y = y & ~7; u32 bytes_per_pixel = Regs::BytesPerDepthPixel(framebuffer.depth_format); u32 stride = framebuffer.width * bytes_per_pixel; diff --git a/src/video_core/renderer_opengl/generated/gl_3_2_core.c b/src/video_core/renderer_opengl/generated/gl_3_2_core.c index ef29972d7..95fd29c0a 100644 --- a/src/video_core/renderer_opengl/generated/gl_3_2_core.c +++ b/src/video_core/renderer_opengl/generated/gl_3_2_core.c @@ -62,9 +62,9 @@ static int TestPointer(const PROC pTest) ptrdiff_t iTest; if(!pTest) return 0; iTest = (ptrdiff_t)pTest; - + if(iTest == 1 || iTest == 2 || iTest == 3 || iTest == -1) return 0; - + return 1; } @@ -79,7 +79,7 @@ static PROC WinGetProcAddress(const char *name) glMod = GetModuleHandleA("OpenGL32.dll"); return (PROC)GetProcAddress(glMod, (LPCSTR)name); } - + #define IntGetProcAddress(name) WinGetProcAddress(name) #else #if defined(__APPLE__) @@ -1083,7 +1083,7 @@ static ogl_StrToExtMap *FindExtEntry(const char *extensionName) if(strcmp(extensionName, currLoc->extensionName) == 0) return currLoc; } - + return NULL; } @@ -1135,15 +1135,15 @@ int ogl_LoadFunctions() { int numFailed = 0; ClearExtensionVars(); - + _ptrc_glGetIntegerv = (void (CODEGEN_FUNCPTR *)(GLenum, GLint *))IntGetProcAddress("glGetIntegerv"); if(!_ptrc_glGetIntegerv) return ogl_LOAD_FAILED; _ptrc_glGetStringi = (const GLubyte * (CODEGEN_FUNCPTR *)(GLenum, GLuint))IntGetProcAddress("glGetStringi"); if(!_ptrc_glGetStringi) return ogl_LOAD_FAILED; - + ProcExtsFromExtList(); numFailed = Load_Version_3_2(); - + if(numFailed == 0) return ogl_LOAD_SUCCEEDED; else @@ -1177,7 +1177,7 @@ int ogl_IsVersionGEQ(int majorVersion, int minorVersion) { if(g_major_version == 0) GetGLVersion(); - + if(majorVersion > g_major_version) return 1; if(majorVersion < g_major_version) return 0; if(minorVersion >= g_minor_version) return 1; diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 4b7d099a5..bacdb7172 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -350,7 +350,7 @@ void RasterizerOpenGL::NotifyPicaRegisterChanged(u32 id) { case PICA_REG_INDEX(tev_stage5.color_scale): SyncTevMultipliers(5, regs.tev_stage5); break; - + // TEV combiner buffer color case PICA_REG_INDEX(tev_combiner_buffer_color): SyncCombinerColor(); diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp index 1afa58c99..0d7ba1983 100644 --- a/src/video_core/renderer_opengl/gl_state.cpp +++ b/src/video_core/renderer_opengl/gl_state.cpp @@ -82,7 +82,7 @@ void OpenGLState::Apply() { } else { glDisable(GL_STENCIL_TEST); } - } + } if (stencil.test_func != cur_state.stencil.test_func || stencil.test_ref != cur_state.stencil.test_ref || diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h index 281b7cad5..63dba2761 100644 --- a/src/video_core/renderer_opengl/gl_state.h +++ b/src/video_core/renderer_opengl/gl_state.h @@ -61,7 +61,7 @@ public: static const OpenGLState& GetCurState() { return cur_state; } - + /// Apply this state as the current OpenGL state void Apply(); diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 16cf92e20..382aeaa05 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp @@ -157,7 +157,7 @@ void RendererOpenGL::LoadFBToActiveGLTexture(const GPU::Regs::FramebufferConfig& state.texture_units[0].enabled_2d = true; state.texture_units[0].texture_2d = texture.handle; state.Apply(); - + glActiveTexture(GL_TEXTURE0); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint)pixel_stride); diff --git a/src/video_core/vertex_shader.cpp b/src/video_core/vertex_shader.cpp index 7d68998f1..4ebb42429 100644 --- a/src/video_core/vertex_shader.cpp +++ b/src/video_core/vertex_shader.cpp @@ -330,7 +330,7 @@ static void ProcessShaderCode(VertexShaderState& state) { case OpCode::Type::MultiplyAdd: { - if ((instr.opcode.Value().EffectiveOpCode() == OpCode::Id::MAD) || + if ((instr.opcode.Value().EffectiveOpCode() == OpCode::Id::MAD) || (instr.opcode.Value().EffectiveOpCode() == OpCode::Id::MADI)) { const SwizzlePattern& swizzle = *(SwizzlePattern*)&swizzle_data[instr.mad.operand_desc_id]; @@ -547,7 +547,7 @@ OutputVertex RunShader(const InputVertex& input, int num_attributes) { const auto& attribute_register_map = regs.vs_input_register_map; float24 dummy_register; boost::fill(state.input_register_table, &dummy_register); - + if (num_attributes > 0) state.input_register_table[attribute_register_map.attribute0_register] = &input.attr[0].x; if (num_attributes > 1) state.input_register_table[attribute_register_map.attribute1_register] = &input.attr[1].x; if (num_attributes > 2) state.input_register_table[attribute_register_map.attribute2_register] = &input.attr[2].x; -- cgit v1.2.3