summaryrefslogtreecommitdiff
path: root/src/video_core
diff options
context:
space:
mode:
authorGravatar bunnei2014-11-19 15:24:46 -0500
committerGravatar bunnei2014-11-19 15:24:46 -0500
commitc0cd0fa78edc37795176c6fb45a52c1d015f3690 (patch)
tree237f15dd9d986309000c995fde07088625e62239 /src/video_core
parentMerge pull request #208 from lioncash/statics (diff)
parentRemove tabs in all files except in skyeye imports and in generated GL code (diff)
downloadyuzu-c0cd0fa78edc37795176c6fb45a52c1d015f3690.tar.gz
yuzu-c0cd0fa78edc37795176c6fb45a52c1d015f3690.tar.xz
yuzu-c0cd0fa78edc37795176c6fb45a52c1d015f3690.zip
Merge pull request #211 from linkmauve/master
Remove trailing spaces from the entire project
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/debug_utils/debug_utils.cpp4
-rw-r--r--src/video_core/debug_utils/debug_utils.h2
-rw-r--r--src/video_core/renderer_base.h2
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.cpp2
-rw-r--r--src/video_core/utils.cpp4
-rw-r--r--src/video_core/utils.h20
6 files changed, 17 insertions, 17 deletions
diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp
index 22b8e9950..275b06b7c 100644
--- a/src/video_core/debug_utils/debug_utils.cpp
+++ b/src/video_core/debug_utils/debug_utils.cpp
@@ -318,9 +318,9 @@ void DumpTexture(const Pica::Regs::TextureConfig& texture_config, u8* data) {
318 return; 318 return;
319 319
320#ifndef HAVE_PNG 320#ifndef HAVE_PNG
321 return; 321 return;
322#else 322#else
323 if (!data) 323 if (!data)
324 return; 324 return;
325 325
326 // Write data to file 326 // Write data to file
diff --git a/src/video_core/debug_utils/debug_utils.h b/src/video_core/debug_utils/debug_utils.h
index 8b1499bf2..b1558cfae 100644
--- a/src/video_core/debug_utils/debug_utils.h
+++ b/src/video_core/debug_utils/debug_utils.h
@@ -41,7 +41,7 @@ void DumpShader(const u32* binary_data, u32 binary_size, const u32* swizzle_data
41// Utility class to log Pica commands. 41// Utility class to log Pica commands.
42struct PicaTrace { 42struct PicaTrace {
43 struct Write : public std::pair<u32,u32> { 43 struct Write : public std::pair<u32,u32> {
44 Write(u32 id, u32 value) : std::pair<u32,u32>(id, value) {} 44 Write(u32 id, u32 value) : std::pair<u32,u32>(id, value) {}
45 45
46 u32& Id() { return first; } 46 u32& Id() { return first; }
47 const u32& Id() const { return first; } 47 const u32& Id() const { return first; }
diff --git a/src/video_core/renderer_base.h b/src/video_core/renderer_base.h
index f1dbc9d17..bce402b88 100644
--- a/src/video_core/renderer_base.h
+++ b/src/video_core/renderer_base.h
@@ -25,7 +25,7 @@ public:
25 /// Swap buffers (render frame) 25 /// Swap buffers (render frame)
26 virtual void SwapBuffers() = 0; 26 virtual void SwapBuffers() = 0;
27 27
28 /** 28 /**
29 * Set the emulator window to use for renderer 29 * Set the emulator window to use for renderer
30 * @param window EmuWindow handle to emulator window to use for rendering 30 * @param window EmuWindow handle to emulator window to use for rendering
31 */ 31 */
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp
index 729e8e73d..abbb4c2cb 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.cpp
+++ b/src/video_core/renderer_opengl/renderer_opengl.cpp
@@ -239,7 +239,7 @@ MathUtil::Rectangle<unsigned> RendererOpenGL::GetViewportExtent() {
239 239
240 MathUtil::Rectangle<unsigned> viewport_extent; 240 MathUtil::Rectangle<unsigned> viewport_extent;
241 if (window_aspect_ratio > emulation_aspect_ratio) { 241 if (window_aspect_ratio > emulation_aspect_ratio) {
242 // Window is narrower than the emulation content => apply borders to the top and bottom 242 // Window is narrower than the emulation content => apply borders to the top and bottom
243 unsigned viewport_height = emulation_aspect_ratio * framebuffer_width; 243 unsigned viewport_height = emulation_aspect_ratio * framebuffer_width;
244 viewport_extent.left = 0; 244 viewport_extent.left = 0;
245 viewport_extent.top = (framebuffer_height - viewport_height) / 2; 245 viewport_extent.top = (framebuffer_height - viewport_height) / 2;
diff --git a/src/video_core/utils.cpp b/src/video_core/utils.cpp
index c1848f923..f1156a493 100644
--- a/src/video_core/utils.cpp
+++ b/src/video_core/utils.cpp
@@ -20,7 +20,7 @@ namespace VideoCore {
20void DumpTGA(std::string filename, short width, short height, u8* raw_data) { 20void DumpTGA(std::string filename, short width, short height, u8* raw_data) {
21 TGAHeader hdr = {0, 0, 2, 0, 0, 0, 0, width, height, 24, 0}; 21 TGAHeader hdr = {0, 0, 2, 0, 0, 0, 0, width, height, 24, 0};
22 FILE* fout = fopen(filename.c_str(), "wb"); 22 FILE* fout = fopen(filename.c_str(), "wb");
23 23
24 fwrite(&hdr, sizeof(TGAHeader), 1, fout); 24 fwrite(&hdr, sizeof(TGAHeader), 1, fout);
25 25
26 for (int y = 0; y < height; y++) { 26 for (int y = 0; y < height; y++) {
@@ -30,7 +30,7 @@ void DumpTGA(std::string filename, short width, short height, u8* raw_data) {
30 putc(raw_data[(3 * (y * width)) + (3 * x) + 2], fout); // r 30 putc(raw_data[(3 * (y * width)) + (3 * x) + 2], fout); // r
31 } 31 }
32 } 32 }
33 33
34 fclose(fout); 34 fclose(fout);
35} 35}
36} // namespace 36} // namespace
diff --git a/src/video_core/utils.h b/src/video_core/utils.h
index 9cb3d4d43..21380a908 100644
--- a/src/video_core/utils.h
+++ b/src/video_core/utils.h
@@ -12,24 +12,24 @@ namespace FormatPrecision {
12 12
13/// Adjust RGBA8 color with RGBA6 precision 13/// Adjust RGBA8 color with RGBA6 precision
14static inline u32 rgba8_with_rgba6(u32 src) { 14static inline u32 rgba8_with_rgba6(u32 src) {
15 u32 color = src; 15 u32 color = src;
16 color &= 0xFCFCFCFC; 16 color &= 0xFCFCFCFC;
17 color |= (color >> 6) & 0x03030303; 17 color |= (color >> 6) & 0x03030303;
18 return color; 18 return color;
19} 19}
20 20
21/// Adjust RGBA8 color with RGB565 precision 21/// Adjust RGBA8 color with RGB565 precision
22static inline u32 rgba8_with_rgb565(u32 src) { 22static inline u32 rgba8_with_rgb565(u32 src) {
23 u32 color = (src & 0xF8FCF8); 23 u32 color = (src & 0xF8FCF8);
24 color |= (color >> 5) & 0x070007; 24 color |= (color >> 5) & 0x070007;
25 color |= (color >> 6) & 0x000300; 25 color |= (color >> 6) & 0x000300;
26 color |= 0xFF000000; 26 color |= 0xFF000000;
27 return color; 27 return color;
28} 28}
29 29
30/// Adjust Z24 depth value with Z16 precision 30/// Adjust Z24 depth value with Z16 precision
31static inline u32 z24_with_z16(u32 src) { 31static inline u32 z24_with_z16(u32 src) {
32 return (src & 0xFFFF00) | (src >> 16); 32 return (src & 0xFFFF00) | (src >> 16);
33} 33}
34 34
35} // namespace 35} // namespace