diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2016-06-24 12:16:10 +0200 |
|---|---|---|
| committer | Pierre Bourdon <delroth@gmail.com> | 2016-06-24 12:16:10 +0200 |
| commit | 5fcb4bb3ab2e19d3ee95c08c6f86ba68656c6357 (patch) | |
| tree | 43fa45c14e8f08dadaf6612045bde3d97fb1931e /Source/Core/VideoCommon | |
| parent | 3570c7f03a2aa90aa634f96c0af1969af610f14d (diff) | |
Further fixes to the formatting change. WX sucks.
Diffstat (limited to 'Source/Core/VideoCommon')
| -rw-r--r-- | Source/Core/VideoCommon/Debugger.cpp | 10 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/PixelShaderGen.cpp | 29 |
2 files changed, 19 insertions, 20 deletions
diff --git a/Source/Core/VideoCommon/Debugger.cpp b/Source/Core/VideoCommon/Debugger.cpp index 86f3f99345..4dbaa1865a 100644 --- a/Source/Core/VideoCommon/Debugger.cpp +++ b/Source/Core/VideoCommon/Debugger.cpp @@ -88,7 +88,7 @@ void GFXDebuggerBase::DumpPixelShader(const std::string& path) { output = "Destination alpha disabled:\n"; /// output += GeneratePixelShaderCode(DSTALPHA_NONE, g_ActiveConfig.backend_info.APIType, - ///g_nativeVertexFmt->m_components); + /// g_nativeVertexFmt->m_components); } else { @@ -96,16 +96,16 @@ void GFXDebuggerBase::DumpPixelShader(const std::string& path) { output = "Using dual source blending for destination alpha:\n"; /// output += GeneratePixelShaderCode(DSTALPHA_DUAL_SOURCE_BLEND, - ///g_ActiveConfig.backend_info.APIType, g_nativeVertexFmt->m_components); + /// g_ActiveConfig.backend_info.APIType, g_nativeVertexFmt->m_components); } else { output = "Using two passes for emulating destination alpha:\n"; /// output += GeneratePixelShaderCode(DSTALPHA_NONE, g_ActiveConfig.backend_info.APIType, - ///g_nativeVertexFmt->m_components); + /// g_nativeVertexFmt->m_components); output += "\n\nDestination alpha pass shader:\n"; /// output += GeneratePixelShaderCode(DSTALPHA_ALPHA_PASS, - ///g_ActiveConfig.backend_info.APIType, g_nativeVertexFmt->m_components); + /// g_ActiveConfig.backend_info.APIType, g_nativeVertexFmt->m_components); } } @@ -119,7 +119,7 @@ void GFXDebuggerBase::DumpVertexShader(const std::string& path) File::CreateEmptyFile(filename); /// File::WriteStringToFile(GenerateVertexShaderCode(g_nativeVertexFmt->m_components, - ///g_ActiveConfig.backend_info.APIType), filename); + /// g_ActiveConfig.backend_info.APIType), filename); } void GFXDebuggerBase::DumpPixelShaderConstants(const std::string& path) diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp index e284e58347..bc5da9a060 100644 --- a/Source/Core/VideoCommon/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/PixelShaderGen.cpp @@ -937,21 +937,20 @@ static void WriteStage(T& out, pixel_shader_uid_data* uid_data, int n, API_TYPE } else { - const char* function_table[] = - { - "((tevin_a.r > tevin_b.r) ? tevin_c.rgb : int3(0,0,0))", // TEVCMP_R8_GT - "((tevin_a.r == tevin_b.r) ? tevin_c.rgb : int3(0,0,0))", // TEVCMP_R8_EQ - "((idot(tevin_a.rgb, comp16) > idot(tevin_b.rgb, comp16)) ? tevin_c.rgb : " - "int3(0,0,0))", // TEVCMP_GR16_GT - "((idot(tevin_a.rgb, comp16) == idot(tevin_b.rgb, comp16)) ? tevin_c.rgb : " - "int3(0,0,0))", // TEVCMP_GR16_EQ - "((idot(tevin_a.rgb, comp24) > idot(tevin_b.rgb, comp24)) ? tevin_c.rgb : " - "int3(0,0,0))", // TEVCMP_BGR24_GT - "((idot(tevin_a.rgb, comp24) == idot(tevin_b.rgb, comp24)) ? tevin_c.rgb : " - "int3(0,0,0))", // TEVCMP_BGR24_EQ - "(max(sign(tevin_a.rgb - tevin_b.rgb), int3(0,0,0)) * tevin_c.rgb)", // TEVCMP_RGB8_GT - "((int3(1,1,1) - sign(abs(tevin_a.rgb - tevin_b.rgb))) * tevin_c.rgb)" // TEVCMP_RGB8_EQ - }; + const char* function_table[] = { + "((tevin_a.r > tevin_b.r) ? tevin_c.rgb : int3(0,0,0))", // TEVCMP_R8_GT + "((tevin_a.r == tevin_b.r) ? tevin_c.rgb : int3(0,0,0))", // TEVCMP_R8_EQ + "((idot(tevin_a.rgb, comp16) > idot(tevin_b.rgb, comp16)) ? tevin_c.rgb : " + "int3(0,0,0))", // TEVCMP_GR16_GT + "((idot(tevin_a.rgb, comp16) == idot(tevin_b.rgb, comp16)) ? tevin_c.rgb : " + "int3(0,0,0))", // TEVCMP_GR16_EQ + "((idot(tevin_a.rgb, comp24) > idot(tevin_b.rgb, comp24)) ? tevin_c.rgb : " + "int3(0,0,0))", // TEVCMP_BGR24_GT + "((idot(tevin_a.rgb, comp24) == idot(tevin_b.rgb, comp24)) ? tevin_c.rgb : " + "int3(0,0,0))", // TEVCMP_BGR24_EQ + "(max(sign(tevin_a.rgb - tevin_b.rgb), int3(0,0,0)) * tevin_c.rgb)", // TEVCMP_RGB8_GT + "((int3(1,1,1) - sign(abs(tevin_a.rgb - tevin_b.rgb))) * tevin_c.rgb)" // TEVCMP_RGB8_EQ + }; int mode = (cc.shift << 1) | cc.op; out.Write(" tevin_d.rgb + "); |
