From f432d6038e353f98cbe0fa522bd9d6034027246e Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 31 Mar 2013 19:10:21 -0400 Subject: Fix some typos and correct some capitalizations in the log messages. Makes the logging look more orderly and less spammy when spitting out things. --- Source/Core/VideoCommon/Src/VertexShaderManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon/Src/VertexShaderManager.cpp') diff --git a/Source/Core/VideoCommon/Src/VertexShaderManager.cpp b/Source/Core/VideoCommon/Src/VertexShaderManager.cpp index a5e84ee69b..0f5b940580 100644 --- a/Source/Core/VideoCommon/Src/VertexShaderManager.cpp +++ b/Source/Core/VideoCommon/Src/VertexShaderManager.cpp @@ -455,7 +455,7 @@ void VertexShaderManager::SetConstants() break; default: - ERROR_LOG(VIDEO, "unknown projection type: %d", xfregs.projection.type); + ERROR_LOG(VIDEO, "Unknown projection type: %d", xfregs.projection.type); } PRIM_LOG("Projection: %f %f %f %f %f %f\n", rawProjection[0], rawProjection[1], rawProjection[2], rawProjection[3], rawProjection[4], rawProjection[5]); -- cgit v1.2.3 From 195336021f7890cc4a308b4437bd0f3e083cfc0a Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 7 Apr 2013 17:11:29 -0400 Subject: Fix a few typos in the comments/logging in VideoDX9, VideoCommon, and VideoSoftware projects. See Render.cpp, PixelShaderGen.cpp, and PixelShaderManager.cpp for most of the changes. See VertexShaderManager.cpp for a logging typo fix. See SWRenderer.cpp for a small typo fix for a message that gets swprintf'd in DrawDebugText. See SWVertexLoader.cpp for a typo fix of an assert message. Should slightly improve the readability of some of those files. --- Source/Core/VideoCommon/Src/VertexShaderManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoCommon/Src/VertexShaderManager.cpp') diff --git a/Source/Core/VideoCommon/Src/VertexShaderManager.cpp b/Source/Core/VideoCommon/Src/VertexShaderManager.cpp index 0f5b940580..b8c9b7d5a3 100644 --- a/Source/Core/VideoCommon/Src/VertexShaderManager.cpp +++ b/Source/Core/VideoCommon/Src/VertexShaderManager.cpp @@ -122,7 +122,7 @@ void UpdateProjectionHack(int iPhackvalue[], std::string sPhackvalue[]) if (iPhackvalue[0] == 1) { - NOTICE_LOG(VIDEO, "\t\t--- Ortographic Projection Hack ON ---"); + NOTICE_LOG(VIDEO, "\t\t--- Orthographic Projection Hack ON ---"); fhacksign1 *= (iPhackvalue[1] == 1) ? -1.0f : fhacksign1; sTemp[0] = (iPhackvalue[1] == 1) ? " * (-1)" : ""; @@ -191,7 +191,7 @@ void VertexShaderManager::Dirty() } // Syncs the shader constant buffers with xfmem -// TODO: A cleaner way to control the matricies without making a mess in the parameters field +// TODO: A cleaner way to control the matrices without making a mess in the parameters field void VertexShaderManager::SetConstants() { if (g_ActiveConfig.backend_info.APIType == API_OPENGL && !g_ActiveConfig.backend_info.bSupportsGLSLUBO) -- cgit v1.2.3 From bab9963b00953d60bdd6fabe265d5daa45a27661 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 17 Apr 2013 23:09:55 -0400 Subject: New license header introduced for DiscIO, AudioCommon, InputCommon, VideoCommon, and Common projects. --- Source/Core/VideoCommon/Src/VertexShaderManager.cpp | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'Source/Core/VideoCommon/Src/VertexShaderManager.cpp') diff --git a/Source/Core/VideoCommon/Src/VertexShaderManager.cpp b/Source/Core/VideoCommon/Src/VertexShaderManager.cpp index b8c9b7d5a3..6682125570 100644 --- a/Source/Core/VideoCommon/Src/VertexShaderManager.cpp +++ b/Source/Core/VideoCommon/Src/VertexShaderManager.cpp @@ -1,19 +1,6 @@ -// Copyright (C) 2003 Dolphin Project. - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, version 2.0. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License 2.0 for more details. - -// A copy of the GPL 2.0 should have been included with the program. -// If not, see http://www.gnu.org/licenses/ - -// Official SVN repository and contact information can be found at -// http://code.google.com/p/dolphin-emu/ +// Copyright 2013 Dolphin Emulator Project +// Licensed under GPLv2 +// Refer to the license.txt file included. #include "Common.h" #include "VideoConfig.h" -- cgit v1.2.3 From 8da425b008b46ef90d649e55c6c0d4a0bc2b556b Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 24 Apr 2013 09:21:54 -0400 Subject: Formatting cleanup for VideoCommon. Block braces on new lines. Also killed off trailing whitespace and dangling elses. Spaced some things out to make them more readable (only in places where it looked like a bit of a clusterfuck). --- Source/Core/VideoCommon/Src/VertexShaderManager.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'Source/Core/VideoCommon/Src/VertexShaderManager.cpp') diff --git a/Source/Core/VideoCommon/Src/VertexShaderManager.cpp b/Source/Core/VideoCommon/Src/VertexShaderManager.cpp index 6682125570..75e6735577 100644 --- a/Source/Core/VideoCommon/Src/VertexShaderManager.cpp +++ b/Source/Core/VideoCommon/Src/VertexShaderManager.cpp @@ -86,15 +86,18 @@ float PHackValue(std::string sValue) c[i] = '\0'; break; } + c[i] = (cStr[i] == ',') ? '.' : *(cStr+i); if (c[i] == '.') fp = true; } + cStr = c; sTof.str(cStr); sTof >> f; - if (!fp) f /= 0xF4240; + if (!fp) + f /= 0xF4240; delete [] c; return f; @@ -183,6 +186,7 @@ void VertexShaderManager::SetConstants() { if (g_ActiveConfig.backend_info.APIType == API_OPENGL && !g_ActiveConfig.backend_info.bSupportsGLSLUBO) Dirty(); + if (nTransformMatricesChanged[0] >= 0) { int startn = nTransformMatricesChanged[0] / 4; @@ -191,6 +195,7 @@ void VertexShaderManager::SetConstants() SetMultiVSConstant4fv(C_TRANSFORMMATRICES + startn, endn - startn, pstart); nTransformMatricesChanged[0] = nTransformMatricesChanged[1] = -1; } + if (nNormalMatricesChanged[0] >= 0) { int startn = nNormalMatricesChanged[0] / 3; @@ -238,7 +243,9 @@ void VertexShaderManager::SetConstants() SetVSConstant4f(C_LIGHTS+5*i+j+1, 0.00001f, xfmemptr[1], xfmemptr[2], 0); } else + { SetVSConstant4fv(C_LIGHTS+5*i+j+1, xfmemptr); + } } } @@ -479,21 +486,24 @@ void VertexShaderManager::InvalidateXFRange(int start, int end) if (((u32)start >= (u32)MatrixIndexA.PosNormalMtxIdx * 4 && (u32)start < (u32)MatrixIndexA.PosNormalMtxIdx * 4 + 12) || ((u32)start >= XFMEM_NORMALMATRICES + ((u32)MatrixIndexA.PosNormalMtxIdx & 31) * 3 && - (u32)start < XFMEM_NORMALMATRICES + ((u32)MatrixIndexA.PosNormalMtxIdx & 31) * 3 + 9)) { + (u32)start < XFMEM_NORMALMATRICES + ((u32)MatrixIndexA.PosNormalMtxIdx & 31) * 3 + 9)) + { bPosNormalMatrixChanged = true; } if (((u32)start >= (u32)MatrixIndexA.Tex0MtxIdx*4 && (u32)start < (u32)MatrixIndexA.Tex0MtxIdx*4+12) || ((u32)start >= (u32)MatrixIndexA.Tex1MtxIdx*4 && (u32)start < (u32)MatrixIndexA.Tex1MtxIdx*4+12) || ((u32)start >= (u32)MatrixIndexA.Tex2MtxIdx*4 && (u32)start < (u32)MatrixIndexA.Tex2MtxIdx*4+12) || - ((u32)start >= (u32)MatrixIndexA.Tex3MtxIdx*4 && (u32)start < (u32)MatrixIndexA.Tex3MtxIdx*4+12)) { + ((u32)start >= (u32)MatrixIndexA.Tex3MtxIdx*4 && (u32)start < (u32)MatrixIndexA.Tex3MtxIdx*4+12)) + { bTexMatricesChanged[0] = true; } if (((u32)start >= (u32)MatrixIndexB.Tex4MtxIdx*4 && (u32)start < (u32)MatrixIndexB.Tex4MtxIdx*4+12) || ((u32)start >= (u32)MatrixIndexB.Tex5MtxIdx*4 && (u32)start < (u32)MatrixIndexB.Tex5MtxIdx*4+12) || ((u32)start >= (u32)MatrixIndexB.Tex6MtxIdx*4 && (u32)start < (u32)MatrixIndexB.Tex6MtxIdx*4+12) || - ((u32)start >= (u32)MatrixIndexB.Tex7MtxIdx*4 && (u32)start < (u32)MatrixIndexB.Tex7MtxIdx*4+12)) { + ((u32)start >= (u32)MatrixIndexB.Tex7MtxIdx*4 && (u32)start < (u32)MatrixIndexB.Tex7MtxIdx*4+12)) + { bTexMatricesChanged[1] = true; } -- cgit v1.2.3