summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2014-02-17 08:55:19 +0100
committerPierre Bourdon <delroth@gmail.com>2014-02-17 08:55:19 +0100
commit73691a8587e5f09ef138384d2ff97e4059ba9380 (patch)
tree1b5509192851cdd3e6c09251c0051b33d8d3ca15 /Source/Core/VideoBackends
parenta8ca2c6cc2ed6177bd26b6c022b919179a8ce37a (diff)
parent3fd87a7636ff434118a5d7f7334550be8db55c0b (diff)
Merge pull request #86 from lioncash/vertical-alignments2-electric-boogaloo
Second and final pass of clearing out tabs.
Diffstat (limited to 'Source/Core/VideoBackends')
-rw-r--r--Source/Core/VideoBackends/D3D/D3DUtil.h2
-rw-r--r--Source/Core/VideoBackends/D3D/Render.cpp13
-rw-r--r--Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp8
-rw-r--r--Source/Core/VideoBackends/OGL/Render.cpp16
-rw-r--r--Source/Core/VideoBackends/OGL/TextureConverter.cpp4
-rw-r--r--Source/Core/VideoBackends/Software/BPMemLoader.cpp2
-rw-r--r--Source/Core/VideoBackends/Software/EfbInterface.cpp14
-rw-r--r--Source/Core/VideoBackends/Software/OpcodeDecoder.cpp4
-rw-r--r--Source/Core/VideoBackends/Software/SWPixelEngine.cpp10
-rw-r--r--Source/Core/VideoBackends/Software/SWRenderer.h2
10 files changed, 37 insertions, 38 deletions
diff --git a/Source/Core/VideoBackends/D3D/D3DUtil.h b/Source/Core/VideoBackends/D3D/D3DUtil.h
index ff789a1cb9..653b32a273 100644
--- a/Source/Core/VideoBackends/D3D/D3DUtil.h
+++ b/Source/Core/VideoBackends/D3D/D3DUtil.h
@@ -2,7 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
-#pragma once
+#pragma once
#include <d3d11.h>
#include <MathUtil.h>
diff --git a/Source/Core/VideoBackends/D3D/Render.cpp b/Source/Core/VideoBackends/D3D/Render.cpp
index 4220e4c87d..f9b40dddbd 100644
--- a/Source/Core/VideoBackends/D3D/Render.cpp
+++ b/Source/Core/VideoBackends/D3D/Render.cpp
@@ -465,9 +465,9 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
D3D::context->OMSetRenderTargets(1, &FramebufferManager::GetEFBColorTexture()->GetRTV(), NULL);
D3D::drawColorQuad(rgbaColor, (float)RectToLock.left * 2.f / (float)Renderer::GetTargetWidth() - 1.f,
- - (float)RectToLock.top * 2.f / (float)Renderer::GetTargetHeight() + 1.f,
- (float)RectToLock.right * 2.f / (float)Renderer::GetTargetWidth() - 1.f,
- - (float)RectToLock.bottom * 2.f / (float)Renderer::GetTargetHeight() + 1.f);
+ - (float)RectToLock.top * 2.f / (float)Renderer::GetTargetHeight() + 1.f,
+ (float)RectToLock.right * 2.f / (float)Renderer::GetTargetWidth() - 1.f,
+ - (float)RectToLock.bottom * 2.f / (float)Renderer::GetTargetHeight() + 1.f);
RestoreAPIState();
return 0;
@@ -514,10 +514,9 @@ void Renderer::SetViewport()
Ht = (Y + Ht <= GetTargetHeight()) ? Ht : (GetTargetHeight() - Y);
// Some games set invalid values for z-min and z-max so fix them to the max and min allowed and let the shaders do this work
- D3D11_VIEWPORT vp = CD3D11_VIEWPORT(X, Y,
- Wd, Ht,
- 0.f, // (xfregs.viewport.farZ - xfregs.viewport.zRange) / 16777216.0f;
- 1.f); // xfregs.viewport.farZ / 16777216.0f;
+ D3D11_VIEWPORT vp = CD3D11_VIEWPORT(X, Y, Wd, Ht,
+ 0.f, // (xfregs.viewport.farZ - xfregs.viewport.zRange) / 16777216.0f;
+ 1.f); // xfregs.viewport.farZ / 16777216.0f;
D3D::context->RSSetViewports(1, &vp);
}
diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp b/Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp
index 5716130276..44fea1b369 100644
--- a/Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp
+++ b/Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp
@@ -1571,9 +1571,9 @@ namespace GLExtensions
bool _isES;
u32 _GLVersion;
std::unordered_map<std::string, bool> m_extension_list;
-
+
// Private initialization functions
- bool InitFunctionPointers();
+ bool InitFunctionPointers();
// Initializes the extension list the old way
void InitExtensionList21()
@@ -1767,7 +1767,7 @@ namespace GLExtensions
// Grab a few functions for initial checking
// We need them to grab the extension list
// Also to check if there is an error grabbing the version
- // If it fails then the user's drivers don't support GL 3.0
+ // If it fails then the user's drivers don't support GL 3.0
if (GetFuncAddress ("glGetIntegerv", (void**)&glGetIntegerv) == NULL)
return false;
if (GetFuncAddress("glGetString", (void**)&glGetString) == NULL)
@@ -1781,7 +1781,7 @@ namespace GLExtensions
InitExtensionList();
return InitFunctionPointers();
- }
+ }
// Private initialization functions
bool HasFeatures(const std::string& extensions)
diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp
index 8fe0f0931a..8a07165a13 100644
--- a/Source/Core/VideoBackends/OGL/Render.cpp
+++ b/Source/Core/VideoBackends/OGL/Render.cpp
@@ -924,15 +924,15 @@ void Renderer::UpdateEFBCache(EFBAccessType type, u32 cacheRectIdx, const EFBRec
// and EFB pokes (which will change the color or depth of a pixel).
//
// The behavior of EFB peeks can only be modified by:
-// - GX_PokeAlphaRead
+// - GX_PokeAlphaRead
// The behavior of EFB pokes can be modified by:
-// - GX_PokeAlphaMode (TODO)
-// - GX_PokeAlphaUpdate (TODO)
-// - GX_PokeBlendMode (TODO)
-// - GX_PokeColorUpdate (TODO)
-// - GX_PokeDither (TODO)
-// - GX_PokeDstAlpha (TODO)
-// - GX_PokeZMode (TODO)
+// - GX_PokeAlphaMode (TODO)
+// - GX_PokeAlphaUpdate (TODO)
+// - GX_PokeBlendMode (TODO)
+// - GX_PokeColorUpdate (TODO)
+// - GX_PokeDither (TODO)
+// - GX_PokeDstAlpha (TODO)
+// - GX_PokeZMode (TODO)
u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
{
u32 cacheRectIdx = (y / EFB_CACHE_RECT_SIZE) * EFB_CACHE_WIDTH
diff --git a/Source/Core/VideoBackends/OGL/TextureConverter.cpp b/Source/Core/VideoBackends/OGL/TextureConverter.cpp
index bf36523929..08ebde398c 100644
--- a/Source/Core/VideoBackends/OGL/TextureConverter.cpp
+++ b/Source/Core/VideoBackends/OGL/TextureConverter.cpp
@@ -26,8 +26,8 @@ namespace TextureConverter
using OGL::TextureCache;
static GLuint s_texConvFrameBuffer[2] = {0,0};
-static GLuint s_srcTexture = 0; // for decoding from RAM
-static GLuint s_dstTexture = 0; // for encoding to RAM
+static GLuint s_srcTexture = 0; // for decoding from RAM
+static GLuint s_dstTexture = 0; // for encoding to RAM
const int renderBufferWidth = 1024;
const int renderBufferHeight = 1024;
diff --git a/Source/Core/VideoBackends/Software/BPMemLoader.cpp b/Source/Core/VideoBackends/Software/BPMemLoader.cpp
index f6f810791d..946e792b3f 100644
--- a/Source/Core/VideoBackends/Software/BPMemLoader.cpp
+++ b/Source/Core/VideoBackends/Software/BPMemLoader.cpp
@@ -151,7 +151,7 @@ void SWBPWritten(int address, int newvalue)
}
}
}
- break;
+ break;
case BPMEM_TEV_REGISTER_L: // Reg 1
case BPMEM_TEV_REGISTER_L+2: // Reg 2
diff --git a/Source/Core/VideoBackends/Software/EfbInterface.cpp b/Source/Core/VideoBackends/Software/EfbInterface.cpp
index 8fdcb5fa04..c5c7724462 100644
--- a/Source/Core/VideoBackends/Software/EfbInterface.cpp
+++ b/Source/Core/VideoBackends/Software/EfbInterface.cpp
@@ -72,9 +72,9 @@ namespace EfbInterface
u32 src = *(u32*)rgb;
u32 *dst = (u32*)&efb[offset];
u32 val = *dst & 0xff00003f;
- val |= (src >> 4) & 0x00000fc0; // blue
- val |= (src >> 6) & 0x0003f000; // green
- val |= (src >> 8) & 0x00fc0000; // red
+ val |= (src >> 4) & 0x00000fc0; // blue
+ val |= (src >> 6) & 0x0003f000; // green
+ val |= (src >> 8) & 0x00fc0000; // red
*dst = val;
}
break;
@@ -112,10 +112,10 @@ namespace EfbInterface
u32 src = *(u32*)color;
u32 *dst = (u32*)&efb[offset];
u32 val = *dst & 0xff000000;
- val |= (src >> 2) & 0x0000003f; // alpha
- val |= (src >> 4) & 0x00000fc0; // blue
- val |= (src >> 6) & 0x0003f000; // green
- val |= (src >> 8) & 0x00fc0000; // red
+ val |= (src >> 2) & 0x0000003f; // alpha
+ val |= (src >> 4) & 0x00000fc0; // blue
+ val |= (src >> 6) & 0x0003f000; // green
+ val |= (src >> 8) & 0x00fc0000; // red
*dst = val;
}
break;
diff --git a/Source/Core/VideoBackends/Software/OpcodeDecoder.cpp b/Source/Core/VideoBackends/Software/OpcodeDecoder.cpp
index 21f0a97abd..ea2b220d53 100644
--- a/Source/Core/VideoBackends/Software/OpcodeDecoder.cpp
+++ b/Source/Core/VideoBackends/Software/OpcodeDecoder.cpp
@@ -191,8 +191,8 @@ void DecodeStandard(u32 bufferSize)
// zelda 4 swords calls it and checks the metrics registers after that
break;
- case GX_CMD_INVL_VC:// Invalidate (vertex cache?)
- DEBUG_LOG(VIDEO, "Invalidate (vertex cache?)");
+ case GX_CMD_INVL_VC:// Invalidate (vertex cache?)
+ DEBUG_LOG(VIDEO, "Invalidate (vertex cache?)");
break;
case GX_LOAD_BP_REG: //0x61
diff --git a/Source/Core/VideoBackends/Software/SWPixelEngine.cpp b/Source/Core/VideoBackends/Software/SWPixelEngine.cpp
index 335a9cb012..e32384982e 100644
--- a/Source/Core/VideoBackends/Software/SWPixelEngine.cpp
+++ b/Source/Core/VideoBackends/Software/SWPixelEngine.cpp
@@ -78,13 +78,13 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
MMIO::ComplexWrite<u16>([](u32, u16 val) {
UPECtrlReg tmpCtrl(val);
- if (tmpCtrl.PEToken) g_bSignalTokenInterrupt = false;
- if (tmpCtrl.PEFinish) g_bSignalFinishInterrupt = false;
+ if (tmpCtrl.PEToken) g_bSignalTokenInterrupt = false;
+ if (tmpCtrl.PEFinish) g_bSignalFinishInterrupt = false;
pereg.ctrl.PETokenEnable = tmpCtrl.PETokenEnable;
pereg.ctrl.PEFinishEnable = tmpCtrl.PEFinishEnable;
- pereg.ctrl.PEToken = 0; // this flag is write only
- pereg.ctrl.PEFinish = 0; // this flag is write only
+ pereg.ctrl.PEToken = 0; // this flag is write only
+ pereg.ctrl.PEFinish = 0; // this flag is write only
UpdateInterrupts();
})
@@ -99,7 +99,7 @@ bool AllowIdleSkipping()
void UpdateInterrupts()
{
// check if there is a token-interrupt
- if (g_bSignalTokenInterrupt & pereg.ctrl.PETokenEnable)
+ if (g_bSignalTokenInterrupt & pereg.ctrl.PETokenEnable)
ProcessorInterface::SetInterrupt(INT_CAUSE_PE_TOKEN, true);
else
ProcessorInterface::SetInterrupt(INT_CAUSE_PE_TOKEN, false);
diff --git a/Source/Core/VideoBackends/Software/SWRenderer.h b/Source/Core/VideoBackends/Software/SWRenderer.h
index 97b65566dd..83330d772a 100644
--- a/Source/Core/VideoBackends/Software/SWRenderer.h
+++ b/Source/Core/VideoBackends/Software/SWRenderer.h
@@ -9,7 +9,7 @@
#include "Thread.h"
namespace SWRenderer
-{
+{
void Init();
void Prepare();
void Shutdown();