gsdx-gui: Accurate blending unit for Windows.

The following patch merges all the Accurate options related to the blending unit into a single one.
This commit is contained in:
Akash 2015-07-26 09:53:26 +05:30 committed by Gregory Hainaut
parent d191ae4aba
commit 68833e10d1
5 changed files with 36 additions and 49 deletions

View File

@ -135,16 +135,7 @@ const char* dialog_message(int ID, bool* updateText) {
"------------------------------------------------------------------\n"
"Ultra\t: The blending unit will be completely emulated by the shader. It is ultra slow! It is intended for debug\n";
#endif
case IDC_ACCURATE_BLEND:
return "Allow to solve the impossible blending error message.\n\n"
"It could be slower when the effect are used.\n\nNote: it requires the 4.5 OpenGL extension GL_ARB_texture_barrier";
case IDC_ACCURATE_COLCLIP:
return "Implement the wrapping of color after an overflow\n\n"
"It will be slow (half speed) when the effect are used!\n\nNote: it requires the 4.5 OpenGL extension GL_ARB_texture_barrier";
case IDC_ACCURATE_FBMASK:
return "Implement partial color masking\n\n"
"It helps to fix Fifa/Medal of Honors/Fight Night series\nCould slow down a bit the emulation\n\n"
"Note: it requires the 4.5 OpenGL extension GL_ARB_texture_barrier";
case IDC_TC_DEPTH:
return "Allow to convert Depth buffer from/to Color buffer. It is used for blur & depth of field effects";
default:

View File

@ -65,10 +65,7 @@ enum {
IDC_STATIC_TCOFFSETY,
IDC_PALTEX,
IDC_ACCURATE_BLEND_UNIT,
IDC_ACCURATE_BLEND,
IDC_ACCURATE_DATE,
IDC_ACCURATE_COLCLIP,
IDC_ACCURATE_FBMASK,
IDC_TC_DEPTH,
IDC_CRC_LEVEL
};

View File

@ -148,9 +148,11 @@ void GSSettingsDlg::OnInit()
UpdateRenderers();
ComboBoxInit(IDC_INTERLACE, theApp.m_gs_interlace, theApp.GetConfig("Interlace", 7)); // 7 = "auto", detects interlace based on SMODE2 register
ComboBoxInit(IDC_UPSCALE_MULTIPLIER, theApp.m_gs_upscale_multiplier, theApp.GetConfig("upscale_multiplier", 1));
ComboBoxInit(IDC_AFCOMBO, theApp.m_gs_max_anisotropy, theApp.GetConfig("MaxAnisotropy", 0));
ComboBoxInit(IDC_ACCURATE_BLEND_UNIT, theApp.m_gs_acc_blend_level, theApp.GetConfig("accurate_blending_unit", 1));
CheckDlgButton(m_hWnd, IDC_FILTER, theApp.GetConfig("filter", 2));
CheckDlgButton(m_hWnd, IDC_PALTEX, theApp.GetConfig("paltex", 0));
@ -159,11 +161,9 @@ void GSSettingsDlg::OnInit()
CheckDlgButton(m_hWnd, IDC_AA1, theApp.GetConfig("aa1", 0));
CheckDlgButton(m_hWnd, IDC_NATIVERES, theApp.GetConfig("nativeres", 1));
CheckDlgButton(m_hWnd, IDC_ANISOTROPIC, theApp.GetConfig("AnisotropicFiltering", 0));
CheckDlgButton(m_hWnd, IDC_ACCURATE_BLEND, theApp.GetConfig("accurate_blend", 1));
CheckDlgButton(m_hWnd, IDC_ACCURATE_DATE, theApp.GetConfig("accurate_date", 0));
CheckDlgButton(m_hWnd, IDC_ACCURATE_COLCLIP, theApp.GetConfig("accurate_colclip", 0));
CheckDlgButton(m_hWnd, IDC_TC_DEPTH, theApp.GetConfig("texture_cache_depth", 0));
CheckDlgButton(m_hWnd, IDC_ACCURATE_FBMASK, theApp.GetConfig("accurate_fbmask", 0));
// Shade Boost
CheckDlgButton(m_hWnd, IDC_SHADEBOOST, theApp.GetConfig("ShadeBoost", 0));
@ -264,6 +264,11 @@ bool GSSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
theApp.SetConfig("upscale_multiplier", 1);
}
if(ComboBoxGetSelData(IDC_ACCURATE_BLEND_UNIT, data))
{
theApp.SetConfig("accurate_blending_unit", (int)data);
}
if(ComboBoxGetSelData(IDC_AFCOMBO, data))
{
theApp.SetConfig("MaxAnisotropy", (int)data);
@ -279,11 +284,9 @@ bool GSSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
theApp.SetConfig("resy", (int)SendMessage(GetDlgItem(m_hWnd, IDC_RESY), UDM_GETPOS, 0, 0));
theApp.SetConfig("extrathreads", (int)SendMessage(GetDlgItem(m_hWnd, IDC_SWTHREADS), UDM_GETPOS, 0, 0));
theApp.SetConfig("AnisotropicFiltering", (int)IsDlgButtonChecked(m_hWnd, IDC_ANISOTROPIC));
theApp.SetConfig("accurate_blend", (int)IsDlgButtonChecked(m_hWnd, IDC_ACCURATE_BLEND));
theApp.SetConfig("accurate_date", (int)IsDlgButtonChecked(m_hWnd, IDC_ACCURATE_DATE));
theApp.SetConfig("accurate_colclip", (int)IsDlgButtonChecked(m_hWnd, IDC_ACCURATE_COLCLIP));
theApp.SetConfig("texture_cache_depth", (int)IsDlgButtonChecked(m_hWnd, IDC_TC_DEPTH));
theApp.SetConfig("accurate_fbmask", (int)IsDlgButtonChecked(m_hWnd, IDC_ACCURATE_FBMASK));
@ -386,11 +389,10 @@ void GSSettingsDlg::UpdateControls()
EnableWindow(GetDlgItem(m_hWnd, IDC_FBA), dx9 && hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_ANISOTROPIC), (int)IsDlgButtonChecked(m_hWnd, IDC_FILTER) && hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_AFCOMBO), (int)IsDlgButtonChecked(m_hWnd, IDC_FILTER) && (int)IsDlgButtonChecked(m_hWnd, IDC_ANISOTROPIC) && hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_ACCURATE_BLEND), ogl && hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_ACCURATE_DATE), ogl && hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_ACCURATE_COLCLIP), ogl && hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_ACCURATE_BLEND_UNIT), ogl && hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_TC_DEPTH), ogl && hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_ACCURATE_FBMASK), ogl && hw);
//EnableWindow(GetDlgItem(m_hWnd, IDC_AA1), sw); // Let uers set software params regardless of renderer used
//EnableWindow(GetDlgItem(m_hWnd, IDC_SWTHREADS_EDIT), sw);

View File

@ -186,13 +186,13 @@ BEGIN
END
IDD_CONFIG DIALOGEX 0, 0, 187, 418
IDD_CONFIG DIALOGEX 0, 0, 187, 402
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Settings..."
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
CONTROL IDB_LOGO10,IDC_LOGO11,"Static",SS_BITMAP | SS_CENTERIMAGE,6,6,173,42
DEFPUSHBUTTON "OK",IDOK,40,394,50,14
DEFPUSHBUTTON "OK",IDOK,40,378,50,14
LTEXT "Renderer:",IDC_STATIC,6,72,34,8
COMBOBOX IDC_RENDERER,70,70,111,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Interlacing (F5):",IDC_STATIC,6,101,53,8
@ -203,40 +203,39 @@ BEGIN
EDITTEXT IDC_RESY_EDIT,130,161,35,13,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_RESY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,154,161,11,14
CONTROL "Native",IDC_NATIVERES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,134,33,10
LTEXT "Extra rendering threads:",IDC_STATIC,11,351,80,8
EDITTEXT IDC_SWTHREADS_EDIT,94,349,35,13,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_SWTHREADS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,129,340,11,14
LTEXT "Extra rendering threads:",IDC_STATIC,11,335,80,8
EDITTEXT IDC_SWTHREADS_EDIT,94,333,35,13,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_SWTHREADS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,129,324,11,14
COMBOBOX IDC_UPSCALE_MULTIPLIER,92,146,74,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Or use Scaling:",IDC_STATIC,38,148,49,8
LTEXT "Original PS2 Resolution:",IDC_STATIC,10,134,80,8
CONTROL "Edge Anti-aliasing (AA1)",IDC_AA1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,367,93,10
PUSHBUTTON "Cancel",IDCANCEL,95,394,50,14
CONTROL "Edge Anti-aliasing (AA1)",IDC_AA1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,351,93,10
PUSHBUTTON "Cancel",IDCANCEL,95,378,50,14
CONTROL IDB_LOGO9,IDC_LOGO9,"Static",SS_BITMAP | SS_CENTERIMAGE,6,6,175,44
CONTROL IDB_LOGOGL,IDC_LOGOGL,"Static",SS_BITMAP | SS_CENTERIMAGE,6,6,175,42
GROUPBOX "Internal Resolution (can cause glitches)",IDC_STATIC,6,116,175,64,BS_CENTER
GROUPBOX "Software Mode Settings",IDC_STATIC,6,338,175,50,BS_CENTER
GROUPBOX "Hardware Mode Settings",IDC_STATIC,6,214,175,124,BS_CENTER
GROUPBOX "Software Mode Settings",IDC_STATIC,6,322,175,50,BS_CENTER
GROUPBOX "Hardware Mode Settings",IDC_STATIC,6,214,175,108,BS_CENTER
CONTROL "Logarithmic Z",IDC_LOGZ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,227,58,10
CONTROL "Alpha Correction (FBA)",IDC_FBA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,243,87,10
CONTROL "Allow 8-Bit Textures",IDC_PALTEX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,243,82,10
CONTROL "Texture Filtering",IDC_FILTER,"Button",BS_AUTO3STATE | WS_TABSTOP,10,227,67,10
CONTROL "Enable Shade Boost",IDC_SHADEBOOST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,186,79,10
CONTROL "Accurate Blend",IDC_ACCURATE_BLEND,"Button",BS_AUTO3STATE | WS_TABSTOP,10,259,67,10
CONTROL "Accurate Date",IDC_ACCURATE_DATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,259,67,10
CONTROL "Accurate Color Clip",IDC_ACCURATE_COLCLIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,275,74,10
CONTROL "Accurate Date",IDC_ACCURATE_DATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,273,67,10
PUSHBUTTON "Settings...",IDC_SHADEBUTTON,92,183,75,14
CONTROL "Enable HW Hacks",IDC_HACKS_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,307,71,10
PUSHBUTTON "Configure...",IDC_HACKSBUTTON,92,304,75,14
CONTROL "Enable HW Hacks",IDC_HACKS_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,291,71,10
PUSHBUTTON "Configure...",IDC_HACKSBUTTON,92,288,75,14
LTEXT "Adapter:",IDC_STATIC,6,57,30,8
COMBOBOX IDC_ADAPTER,70,55,111,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Enable FXAA",IDC_FXAA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,201,80,10
CONTROL "Enable FX Shader",IDC_SHADER_FX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,201,80,10
CONTROL "Anisotropic Filtering",IDC_ANISOTROPIC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,322,77,8
COMBOBOX IDC_AFCOMBO,93,320,35,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Anisotropic Filtering",IDC_ANISOTROPIC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,306,77,8
COMBOBOX IDC_AFCOMBO,93,304,35,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "OpenCL Device:",IDC_STATIC,6,86,52,8
COMBOBOX IDC_OPENCL_DEVICE,70,84,111,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "HW OGL Depth",IDC_TC_DEPTH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,273,72,13
CONTROL "Accurate FB Mask",IDC_ACCURATE_FBMASK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,291,79,13
CONTROL "HW OGL Depth",IDC_TC_DEPTH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,273,72,13
COMBOBOX IDC_ACCURATE_BLEND_UNIT,97,259,75,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Blending Unit Accuracy:",IDC_STATIC,10,259,87,10
END

View File

@ -73,15 +73,13 @@
#define IDC_ANISOTROPIC 2089
#define IDC_AFCOMBO 2090
#define IDC_OPENCL_DEVICE 2091
#define IDC_ACCURATE_BLEND 2092
#define IDC_ACCURATE_BLEND_UNIT 2092
#define IDC_ACCURATE_DATE 2093
#define IDC_ACCURATE_COLCLIP 2094
#define IDC_ACCURATE_FBMASK 2095
#define IDC_ROUND_SPRITE 2096
#define IDC_ALIGN_SPRITE 2097
#define IDC_CRC_LEVEL 2098
#define IDC_CHECK1 2099
#define IDC_TC_DEPTH 2100
#define IDC_ROUND_SPRITE 2094
#define IDC_ALIGN_SPRITE 2095
#define IDC_CRC_LEVEL 2096
#define IDC_CHECK1 2097
#define IDC_TC_DEPTH 2098
#define IDC_COLORSPACE 3000
#define IDR_CONVERT_FX 10000
#define IDR_TFX_FX 10001