Further fixes to the formatting change. WX sucks.

This commit is contained in:
Pierre Bourdon 2016-06-24 12:16:10 +02:00
parent 3570c7f03a
commit 5fcb4bb3ab
16 changed files with 59 additions and 48 deletions

View File

@ -650,7 +650,7 @@ PFNDOLGETINTEGER64I_VPROC dolGetInteger64i_v;
PFNDOLDRAWARRAYSINSTANCEDBASEINSTANCEPROC dolDrawArraysInstancedBaseInstance; PFNDOLDRAWARRAYSINSTANCEDBASEINSTANCEPROC dolDrawArraysInstancedBaseInstance;
PFNDOLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC dolDrawElementsInstancedBaseInstance; PFNDOLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC dolDrawElementsInstancedBaseInstance;
PFNDOLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC PFNDOLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC
dolDrawElementsInstancedBaseVertexBaseInstance; dolDrawElementsInstancedBaseVertexBaseInstance;
PFNDOLGETINTERNALFORMATIVPROC dolGetInternalformativ; PFNDOLGETINTERNALFORMATIVPROC dolGetInternalformativ;
PFNDOLGETACTIVEATOMICCOUNTERBUFFERIVPROC dolGetActiveAtomicCounterBufferiv; PFNDOLGETACTIVEATOMICCOUNTERBUFFERIVPROC dolGetActiveAtomicCounterBufferiv;
PFNDOLBINDIMAGETEXTUREPROC dolBindImageTexture; PFNDOLBINDIMAGETEXTUREPROC dolBindImageTexture;

View File

@ -23,9 +23,9 @@
#ifdef _WIN32 #ifdef _WIN32
#include <Windows.h> #include <Windows.h>
#else #else
#include <errno.h>
#include <iconv.h> #include <iconv.h>
#include <locale.h> #include <locale.h>
#include <errno.h>
#endif #endif
#if !defined(_WIN32) && !defined(ANDROID) #if !defined(_WIN32) && !defined(ANDROID)

View File

@ -178,7 +178,7 @@ void DSPEmitter::cmp(const UDSPInstruction opc)
// s64 res = dsp_convert_long_acc(acc0 - acc1); // s64 res = dsp_convert_long_acc(acc0 - acc1);
SUB(64, R(RAX), R(RDX)); SUB(64, R(RAX), R(RDX));
// Update_SR_Register64(res, isCarry2(acc0, res), isOverflow(acc0, -acc1, res)); // CF -> // Update_SR_Register64(res, isCarry2(acc0, res), isOverflow(acc0, -acc1, res)); // CF ->
//influence on ABS/0xa100 // influence on ABS/0xa100
NEG(64, R(RDX)); NEG(64, R(RDX));
Update_SR_Register64_Carry(EAX, tmp1, true); Update_SR_Register64_Carry(EAX, tmp1, true);
gpr.PutXReg(tmp1); gpr.PutXReg(tmp1);
@ -232,7 +232,7 @@ void DSPEmitter::cmpi(const UDSPInstruction opc)
get_long_acc(reg, tmp1); get_long_acc(reg, tmp1);
MOV(64, R(RAX), R(tmp1)); MOV(64, R(RAX), R(tmp1));
// s64 imm = (s64)(s16)dsp_fetch_code() << 16; // Immediate is considered to be at M level in // s64 imm = (s64)(s16)dsp_fetch_code() << 16; // Immediate is considered to be at M level in
//the 40-bit accumulator. // the 40-bit accumulator.
u16 imm = dsp_imem_read(compilePC + 1); u16 imm = dsp_imem_read(compilePC + 1);
MOV(64, R(RDX), Imm64((s64)(s16)imm << 16)); MOV(64, R(RDX), Imm64((s64)(s16)imm << 16));
// s64 res = dsp_convert_long_acc(val - imm); // s64 res = dsp_convert_long_acc(val - imm);
@ -1172,7 +1172,7 @@ void DSPEmitter::lsr16(const UDSPInstruction opc)
// u64 acc = dsp_get_long_acc(areg); // u64 acc = dsp_get_long_acc(areg);
get_long_acc(areg); get_long_acc(areg);
// acc &= 0x000000FFFFFFFFFFULL; // Lop off the extraneous sign extension our 64-bit fake accum // acc &= 0x000000FFFFFFFFFFULL; // Lop off the extraneous sign extension our 64-bit fake accum
//causes // causes
// acc >>= 16; // acc >>= 16;
SHR(64, R(RAX), Imm8(16)); SHR(64, R(RAX), Imm8(16));
AND(64, R(RAX), Imm32(0xffffff)); AND(64, R(RAX), Imm32(0xffffff));
@ -1252,7 +1252,7 @@ void DSPEmitter::lsr(const UDSPInstruction opc)
if (shift) if (shift)
{ {
// acc &= 0x000000FFFFFFFFFFULL; // Lop off the extraneous sign extension our 64-bit fake // acc &= 0x000000FFFFFFFFFFULL; // Lop off the extraneous sign extension our 64-bit fake
//accum causes // accum causes
SHL(64, R(RAX), Imm8(24)); SHL(64, R(RAX), Imm8(24));
// acc >>= shift; // acc >>= shift;
SHR(64, R(RAX), Imm8(shift + 24)); SHR(64, R(RAX), Imm8(shift + 24));

View File

@ -192,8 +192,8 @@ struct DEntry
// 11 ? maybe ==00? Time Splitters 2 and 3 have it and don't have banner // 11 ? maybe ==00? Time Splitters 2 and 3 have it and don't have banner
// //
u8 Filename[DENTRY_STRLEN]; // 0x08 0x20 Filename u8 Filename[DENTRY_STRLEN]; // 0x08 0x20 Filename
u8 ModTime[4]; // 0x28 0x04 Time of file's last modification in seconds since 12am, u8 ModTime[4]; // 0x28 0x04 Time of file's last modification in seconds since 12am,
// January 1st, 2000 // January 1st, 2000
u8 ImageOffset[4]; // 0x2c 0x04 image data offset u8 ImageOffset[4]; // 0x2c 0x04 image data offset
u8 IconFmt[2]; // 0x30 0x02 icon gfx format (2bits per icon) u8 IconFmt[2]; // 0x30 0x02 icon gfx format (2bits per icon)
// Bits Description // Bits Description

View File

@ -15,8 +15,8 @@
#define NS_ENUM_AVAILABLE(...) #define NS_ENUM_AVAILABLE(...)
// end hack // end hack
#import <IOBluetooth/IOBluetooth.h> #import <IOBluetooth/IOBluetooth.h>
#include <IOKit/pwr_mgt/IOPMLib.h>
#include <IOKit/hid/IOHIDManager.h> #include <IOKit/hid/IOHIDManager.h>
#include <IOKit/pwr_mgt/IOPMLib.h>
#elif defined(__linux__) && HAVE_BLUEZ #elif defined(__linux__) && HAVE_BLUEZ
#include <bluetooth/bluetooth.h> #include <bluetooth/bluetooth.h>
#endif #endif

View File

@ -847,7 +847,7 @@ IPCCommandResult CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
// used for maxcount (allocated mem?) // used for maxcount (allocated mem?)
// called with 1 inbuffer after deleting a titleid // called with 1 inbuffer after deleting a titleid
//_dbg_assert_msg_(WII_IPC_ES, Buffer.NumberPayloadBuffer == 1, "IOCTL_ES_GETSTOREDTMD no out //_dbg_assert_msg_(WII_IPC_ES, Buffer.NumberPayloadBuffer == 1, "IOCTL_ES_GETSTOREDTMD no out
//buffer"); // buffer");
u64 TitleID = Memory::Read_U64(Buffer.InBuffer[0].m_Address); u64 TitleID = Memory::Read_U64(Buffer.InBuffer[0].m_Address);
u32 MaxCount = 0; u32 MaxCount = 0;

View File

@ -12,6 +12,7 @@
#include <thread> #include <thread>
#include <unordered_map> #include <unordered_map>
#include <unordered_set> #include <unordered_set>
#include "Common/FifoQueue.h"
#include "Common/Timer.h" #include "Common/Timer.h"
#include "Common/TraversalClient.h" #include "Common/TraversalClient.h"
#include "Core/NetPlayProto.h" #include "Core/NetPlayProto.h"

View File

@ -179,27 +179,27 @@ static GekkoOPTemplate table31[] = {
{266, &JitIL::addx}, //"addx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}}, {266, &JitIL::addx}, //"addx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}},
{778, &JitIL::addx}, //"addox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}}, {778, &JitIL::addx}, //"addox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT}},
{10, &JitIL::FallBackToInterpreter}, //"addcx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | {10, &JitIL::FallBackToInterpreter}, //"addcx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB |
//FL_SET_CA | FL_RC_BIT}}, // FL_SET_CA | FL_RC_BIT}},
{522, &JitIL::FallBackToInterpreter}, //"addcox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | {522, &JitIL::FallBackToInterpreter}, //"addcox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB |
//FL_SET_CA | FL_RC_BIT}}, // FL_SET_CA | FL_RC_BIT}},
{138, &JitIL::addex}, //"addex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA {138, &JitIL::addex}, //"addex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA
//| FL_RC_BIT}}, //| FL_RC_BIT}},
{650, &JitIL::addex}, //"addeox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA {650, &JitIL::addex}, //"addeox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | FL_SET_CA
//| FL_RC_BIT}}, //| FL_RC_BIT}},
{234, &JitIL::FallBackToInterpreter}, //"addmex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | {234, &JitIL::FallBackToInterpreter}, //"addmex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB |
//FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, // FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
{746, &JitIL::FallBackToInterpreter}, //"addmeox" {746, &JitIL::FallBackToInterpreter}, //"addmeox"
{202, &JitIL::addzex}, //"addzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | {202, &JitIL::addzex}, //"addzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA |
//FL_SET_CA | FL_RC_BIT}}, // FL_SET_CA | FL_RC_BIT}},
{714, &JitIL::addzex}, //"addzeox" {714, &JitIL::addzex}, //"addzeox"
{491, &JitIL::FallBackToInterpreter}, //"divwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | {491, &JitIL::FallBackToInterpreter}, //"divwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB |
//FL_RC_BIT, 39}}, // FL_RC_BIT, 39}},
{1003, &JitIL::FallBackToInterpreter}, //"divwox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | {1003, &JitIL::FallBackToInterpreter}, //"divwox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB |
//FL_RC_BIT, 39}}, // FL_RC_BIT, 39}},
{459, &JitIL::divwux}, //"divwux", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}}, {459, &JitIL::divwux}, //"divwux", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}},
{971, &JitIL::divwux}, //"divwuox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}}, {971, &JitIL::divwux}, //"divwuox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 39}},
{75, &JitIL::FallBackToInterpreter}, //"mulhwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | {75, &JitIL::FallBackToInterpreter}, //"mulhwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB |
//FL_RC_BIT, 4}}, // FL_RC_BIT, 4}},
{11, &JitIL::mulhwux}, //"mulhwux", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}}, {11, &JitIL::mulhwux}, //"mulhwux", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}},
{235, &JitIL::mullwx}, //"mullwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}}, {235, &JitIL::mullwx}, //"mullwx", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}},
{747, &JitIL::mullwx}, //"mullwox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}}, {747, &JitIL::mullwx}, //"mullwox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_RC_BIT, 4}},
@ -212,13 +212,13 @@ static GekkoOPTemplate table31[] = {
{520, {520,
&JitIL::subfcx}, //"subfcox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}}, &JitIL::subfcx}, //"subfcox", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_SET_CA | FL_RC_BIT}},
{136, &JitIL::subfex}, //"subfex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA | {136, &JitIL::subfex}, //"subfex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | FL_READ_CA |
//FL_SET_CA | FL_RC_BIT}}, // FL_SET_CA | FL_RC_BIT}},
{648, &JitIL::subfex}, //"subfeox" {648, &JitIL::subfex}, //"subfeox"
{232, &JitIL::FallBackToInterpreter}, //"subfmex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | {232, &JitIL::FallBackToInterpreter}, //"subfmex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB |
//FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, // FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
{744, &JitIL::FallBackToInterpreter}, //"subfmeox" {744, &JitIL::FallBackToInterpreter}, //"subfmeox"
{200, &JitIL::FallBackToInterpreter}, //"subfzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB | {200, &JitIL::FallBackToInterpreter}, //"subfzex", OPTYPE_INTEGER, FL_OUT_D | FL_IN_AB |
//FL_READ_CA | FL_SET_CA | FL_RC_BIT}}, // FL_READ_CA | FL_SET_CA | FL_RC_BIT}},
{712, &JitIL::FallBackToInterpreter}, //"subfzeox" {712, &JitIL::FallBackToInterpreter}, //"subfzeox"
{28, &JitIL::boolX}, //"andx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}}, {28, &JitIL::boolX}, //"andx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}},
@ -270,7 +270,7 @@ static GekkoOPTemplate table31[] = {
// Conditional load/store (Wii SMP) // Conditional load/store (Wii SMP)
{150, &JitIL::FallBackToInterpreter}, //"stwcxd", OPTYPE_STORE, FL_EVIL | FL_SET_CR0}}, {150, &JitIL::FallBackToInterpreter}, //"stwcxd", OPTYPE_STORE, FL_EVIL | FL_SET_CR0}},
{20, &JitIL::FallBackToInterpreter}, //"lwarx", OPTYPE_LOAD, FL_EVIL | FL_OUT_D | FL_IN_A0B | {20, &JitIL::FallBackToInterpreter}, //"lwarx", OPTYPE_LOAD, FL_EVIL | FL_OUT_D | FL_IN_A0B |
//FL_SET_CR0}}, // FL_SET_CR0}},
// load string (interpret these) // load string (interpret these)
{533, &JitIL::FallBackToInterpreter}, //"lswx", OPTYPE_LOAD, FL_EVIL | FL_IN_A | FL_OUT_D}}, {533, &JitIL::FallBackToInterpreter}, //"lswx", OPTYPE_LOAD, FL_EVIL | FL_IN_A | FL_OUT_D}},

View File

@ -478,7 +478,7 @@ InstLoc IRBuilder::FoldAdd(InstLoc Op1, InstLoc Op2)
// && isImm(*getOp2(Op1)) && isImm(*getOp2(Op2))) // && isImm(*getOp2(Op1)) && isImm(*getOp2(Op2)))
//{ //{
// return FoldMul(getOp1(Op1), EmitIntConst(GetImmValue(getOp2(Op1)) + // return FoldMul(getOp1(Op1), EmitIntConst(GetImmValue(getOp2(Op1)) +
//GetImmValue(getOp2(Op2)))); // GetImmValue(getOp2(Op2))));
//} //}
// x + x * i0 => x * (i0 + 1) // x + x * i0 => x * (i0 + 1)
@ -616,7 +616,7 @@ InstLoc IRBuilder::FoldSub(InstLoc Op1, InstLoc Op2)
// isImm(*getOp2(Op2))) // isImm(*getOp2(Op2)))
//{ //{
// return FoldMul(getOp1(Op1), EmitIntConst(GetImmValue(getOp2(Op1)) + // return FoldMul(getOp1(Op1), EmitIntConst(GetImmValue(getOp2(Op1)) +
//GetImmValue(getOp2(Op2)))); // GetImmValue(getOp2(Op2))));
//} //}
} }

View File

@ -2,12 +2,14 @@
// Licensed under GPLv2+ // Licensed under GPLv2+
// Refer to the license.txt file included. // Refer to the license.txt file included.
// clang-format off
#include <wx/bitmap.h>
#include <wx/aui/auibar.h> #include <wx/aui/auibar.h>
#include <wx/aui/framemanager.h> #include <wx/aui/framemanager.h>
#include <wx/bitmap.h>
#include <wx/image.h> #include <wx/image.h>
#include <wx/listbase.h> #include <wx/listbase.h>
#include <wx/panel.h> #include <wx/panel.h>
// clang-format on
#include "Common/BreakPoints.h" #include "Common/BreakPoints.h"
#include "Common/CommonTypes.h" #include "Common/CommonTypes.h"

View File

@ -5,8 +5,10 @@
#include <cstdio> #include <cstdio>
#include <string> #include <string>
#include <vector> #include <vector>
#include <wx/aui/auibar.h>
// clang-format off
#include <wx/bitmap.h> #include <wx/bitmap.h>
#include <wx/aui/auibar.h>
#include <wx/image.h> #include <wx/image.h>
#include <wx/listbox.h> #include <wx/listbox.h>
#include <wx/menu.h> #include <wx/menu.h>
@ -17,6 +19,7 @@
#include <wx/textdlg.h> #include <wx/textdlg.h>
#include <wx/thread.h> #include <wx/thread.h>
#include <wx/toolbar.h> #include <wx/toolbar.h>
// clang-format on
#include "Common/BreakPoints.h" #include "Common/BreakPoints.h"
#include "Common/CommonTypes.h" #include "Common/CommonTypes.h"

View File

@ -4,9 +4,11 @@
#include <cstddef> #include <cstddef>
#include <wx/aui/auibar.h> // clang-format off
#include <wx/bitmap.h> #include <wx/bitmap.h>
#include <wx/aui/auibar.h>
#include <wx/panel.h> #include <wx/panel.h>
// clang-format on
#include "Common/FileUtil.h" #include "Common/FileUtil.h"
#include "Common/IniFile.h" #include "Common/IniFile.h"

View File

@ -5,6 +5,9 @@
#include <cstddef> #include <cstddef>
#include <string> #include <string>
#include <vector> #include <vector>
// clang-format off
#include <wx/bitmap.h>
#include <wx/aui/auibar.h> #include <wx/aui/auibar.h>
#include <wx/aui/auibook.h> #include <wx/aui/auibook.h>
#include <wx/aui/framemanager.h> #include <wx/aui/framemanager.h>
@ -18,6 +21,7 @@
#include <wx/statusbr.h> #include <wx/statusbr.h>
#include <wx/textdlg.h> #include <wx/textdlg.h>
#include <wx/toplevel.h> #include <wx/toplevel.h>
// clang-format on
#include "Common/CommonTypes.h" #include "Common/CommonTypes.h"
#include "Common/FileUtil.h" #include "Common/FileUtil.h"

View File

@ -669,9 +669,9 @@ void TASInputDlg::GetKeyBoardInput(u8* data, WiimoteEmu::ReportFeatures rptf, in
// u16 y = irData[1] | ((irData[2] >> 6 & 0x3) << 8); // u16 y = irData[1] | ((irData[2] >> 6 & 0x3) << 8);
// SetStickValue(&m_main_stick.x_cont.set_by_keyboard, &m_main_stick.x_cont.value, // SetStickValue(&m_main_stick.x_cont.set_by_keyboard, &m_main_stick.x_cont.value,
//m_main_stick.x_cont.text, x, 561); // m_main_stick.x_cont.text, x, 561);
// SetStickValue(&m_main_stick.y_cont.set_by_keyboard, &m_main_stick.y_cont.value, // SetStickValue(&m_main_stick.y_cont.set_by_keyboard, &m_main_stick.y_cont.value,
//m_main_stick.y_cont.text, y, 486); // m_main_stick.y_cont.text, y, 486);
//} //}
if (extData && ext == 1) if (extData && ext == 1)

View File

@ -88,7 +88,7 @@ void GFXDebuggerBase::DumpPixelShader(const std::string& path)
{ {
output = "Destination alpha disabled:\n"; output = "Destination alpha disabled:\n";
/// output += GeneratePixelShaderCode(DSTALPHA_NONE, g_ActiveConfig.backend_info.APIType, /// output += GeneratePixelShaderCode(DSTALPHA_NONE, g_ActiveConfig.backend_info.APIType,
///g_nativeVertexFmt->m_components); /// g_nativeVertexFmt->m_components);
} }
else else
{ {
@ -96,16 +96,16 @@ void GFXDebuggerBase::DumpPixelShader(const std::string& path)
{ {
output = "Using dual source blending for destination alpha:\n"; output = "Using dual source blending for destination alpha:\n";
/// output += GeneratePixelShaderCode(DSTALPHA_DUAL_SOURCE_BLEND, /// 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 else
{ {
output = "Using two passes for emulating destination alpha:\n"; output = "Using two passes for emulating destination alpha:\n";
/// output += GeneratePixelShaderCode(DSTALPHA_NONE, g_ActiveConfig.backend_info.APIType, /// 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 += "\n\nDestination alpha pass shader:\n";
/// output += GeneratePixelShaderCode(DSTALPHA_ALPHA_PASS, /// 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::CreateEmptyFile(filename);
/// File::WriteStringToFile(GenerateVertexShaderCode(g_nativeVertexFmt->m_components, /// 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) void GFXDebuggerBase::DumpPixelShaderConstants(const std::string& path)

View File

@ -937,21 +937,20 @@ static void WriteStage(T& out, pixel_shader_uid_data* uid_data, int n, API_TYPE
} }
else else
{ {
const char* function_table[] = 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_GT "((tevin_a.r == tevin_b.r) ? tevin_c.rgb : int3(0,0,0))", // TEVCMP_R8_EQ
"((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 : "
"((idot(tevin_a.rgb, comp16) > idot(tevin_b.rgb, comp16)) ? tevin_c.rgb : " "int3(0,0,0))", // TEVCMP_GR16_GT
"int3(0,0,0))", // TEVCMP_GR16_GT "((idot(tevin_a.rgb, comp16) == idot(tevin_b.rgb, comp16)) ? tevin_c.rgb : "
"((idot(tevin_a.rgb, comp16) == idot(tevin_b.rgb, comp16)) ? tevin_c.rgb : " "int3(0,0,0))", // TEVCMP_GR16_EQ
"int3(0,0,0))", // TEVCMP_GR16_EQ "((idot(tevin_a.rgb, comp24) > idot(tevin_b.rgb, comp24)) ? tevin_c.rgb : "
"((idot(tevin_a.rgb, comp24) > idot(tevin_b.rgb, comp24)) ? tevin_c.rgb : " "int3(0,0,0))", // TEVCMP_BGR24_GT
"int3(0,0,0))", // TEVCMP_BGR24_GT "((idot(tevin_a.rgb, comp24) == idot(tevin_b.rgb, comp24)) ? tevin_c.rgb : "
"((idot(tevin_a.rgb, comp24) == idot(tevin_b.rgb, comp24)) ? tevin_c.rgb : " "int3(0,0,0))", // TEVCMP_BGR24_EQ
"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
"(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
"((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; int mode = (cc.shift << 1) | cc.op;
out.Write(" tevin_d.rgb + "); out.Write(" tevin_d.rgb + ");