GS-wx: Fix d3d11 blend option, broke during Vulkan merge.

Merge the option with GL/VK.
This commit is contained in:
lightningterror 2022-01-11 14:18:51 +01:00
parent 3c92054a6e
commit 6263c8a0cd
6 changed files with 6 additions and 61 deletions

View File

@ -1235,11 +1235,6 @@ void GSApp::Init()
m_gs_acc_blend_level.push_back(GSSetting(static_cast<u32>(AccBlendLevel::Full), "Full", "Very Slow"));
m_gs_acc_blend_level.push_back(GSSetting(static_cast<u32>(AccBlendLevel::Ultra), "Ultra", "Ultra Slow"));
m_gs_acc_blend_level_d3d11.push_back(GSSetting(static_cast<u32>(AccBlendLevel::Minimum), "Minimum", "Fastest"));
m_gs_acc_blend_level_d3d11.push_back(GSSetting(static_cast<u32>(AccBlendLevel::Basic), "Basic", "Recommended"));
m_gs_acc_blend_level_d3d11.push_back(GSSetting(static_cast<u32>(AccBlendLevel::Medium), "Medium", "Debug"));
m_gs_acc_blend_level_d3d11.push_back(GSSetting(static_cast<u32>(AccBlendLevel::High), "High", "Debug"));
m_gs_tv_shaders.push_back(GSSetting(0, "None", ""));
m_gs_tv_shaders.push_back(GSSetting(1, "Scanline filter", ""));
m_gs_tv_shaders.push_back(GSSetting(2, "Diagonal filter", ""));
@ -1249,9 +1244,8 @@ void GSApp::Init()
// clang-format off
// Avoid to clutter the ini file with useless options
#if defined(ENABLE_VULKAN) || defined(_WIN32)
m_default_configuration["Adapter"] = "";
m_default_configuration["Adapter"] = "";
#endif
#ifdef _WIN32
// Per OS option.
m_default_configuration["CaptureFileName"] = "";

View File

@ -139,7 +139,6 @@ public:
std::vector<GSSetting> m_gs_hw_mipmapping;
std::vector<GSSetting> m_gs_crc_level;
std::vector<GSSetting> m_gs_acc_blend_level;
std::vector<GSSetting> m_gs_acc_blend_level_d3d11;
std::vector<GSSetting> m_gs_tv_shaders;
};

View File

@ -194,20 +194,6 @@ const char* dialog_message(int ID, bool* updateText)
"Off:\nDisables any dithering.\n\n"
"Unscaled:\nNative Dithering / Lowest dithering effect does not increase size of squares when upscaling.\n\n"
"Scaled:\nUpscaling-aware / Highest dithering effect.");
// Windows only options.
#ifdef _WIN32
case IDC_ACCURATE_BLEND_UNIT_D3D11:
return L"Control the accuracy level of the GS blending unit emulation.\n\n"
"Minimum:\nFast but introduces various rendering issues.\n"
"It is intended for slow computer.\n\n"
"Basic:\nEmulate correctly some of the effects with a limited speed penalty.\n"
"This is the recommended setting.\n\n"
"Medium:\nExtend it to color shuffling. Performance impact remains reasonable.\n"
"It is intended for debug.\n\n"
"High:\nExtend it to triangle based primitives. It is ultra slow!\n"
"It is intended for debug.\n\n"
"Note: Direct3D 11 and OpenGL blending options aren't the same, even High blending on Direct3D 11 is like 1/3 of Basic blending on OpenGL.";
#endif
default:
if (updateText)
*updateText = false;

View File

@ -51,9 +51,6 @@ enum
IDC_MIPMAP_HW,
IDC_CRC_LEVEL,
IDC_ACCURATE_BLEND_UNIT,
#ifdef _WIN32
IDC_ACCURATE_BLEND_UNIT_D3D11,
#endif
// Rendering Hacks
IDC_AUTO_FLUSH_HW,
IDC_TC_DEPTH,

View File

@ -291,15 +291,11 @@ RendererTab::RendererTab(wxWindow* parent)
m_internal_resolution = m_ui.addComboBoxAndLabel(hw_choice_grid, "Internal Resolution:", "upscale_multiplier", &theApp.m_gs_upscale_multiplier, -1, hw_prereq).first;
m_ui.addComboBoxAndLabel(hw_choice_grid, "Anisotropic Filtering:", "MaxAnisotropy", &theApp.m_gs_max_anisotropy, IDC_AFCOMBO, aniso_prereq);
m_ui.addComboBoxAndLabel(hw_choice_grid, "Dithering (PgDn):", "dithering_ps2", &theApp.m_gs_dithering, IDC_DITHERING, hw_prereq);
m_ui.addComboBoxAndLabel(hw_choice_grid, "Mipmapping:", "mipmap_hw", &theApp.m_gs_hw_mipmapping, IDC_MIPMAP_HW, hw_prereq);
m_ui.addComboBoxAndLabel(hw_choice_grid, "CRC Hack Level:", "crc_hack_level", &theApp.m_gs_crc_level, IDC_CRC_LEVEL, hw_prereq);
m_blend_mode = m_ui.addComboBoxAndLabel(hw_choice_grid, "Blending Accuracy:", "accurate_blending_unit", &theApp.m_gs_acc_blend_level, IDC_ACCURATE_BLEND_UNIT, hw_prereq);
#ifdef _WIN32
m_blend_mode_d3d11 = m_ui.addComboBoxAndLabel(hw_choice_grid, "Blending Accuracy:", "accurate_blending_unit_d3d11", &theApp.m_gs_acc_blend_level_d3d11, IDC_ACCURATE_BLEND_UNIT_D3D11, hw_prereq);
#endif
m_ui.addComboBoxAndLabel(hw_choice_grid, "Anisotropic Filtering:", "MaxAnisotropy", &theApp.m_gs_max_anisotropy, IDC_AFCOMBO, aniso_prereq);
m_ui.addComboBoxAndLabel(hw_choice_grid, "Dithering (PgDn):", "dithering_ps2", &theApp.m_gs_dithering, IDC_DITHERING, hw_prereq);
m_ui.addComboBoxAndLabel(hw_choice_grid, "Mipmapping:", "mipmap_hw", &theApp.m_gs_hw_mipmapping, IDC_MIPMAP_HW, hw_prereq);
m_ui.addComboBoxAndLabel(hw_choice_grid, "CRC Hack Level:", "crc_hack_level", &theApp.m_gs_crc_level, IDC_CRC_LEVEL, hw_prereq);
m_ui.addComboBoxAndLabel(hw_choice_grid, "Blending Accuracy:", "accurate_blending_unit", &theApp.m_gs_acc_blend_level, IDC_ACCURATE_BLEND_UNIT, hw_prereq);
hardware_box->Add(hw_checks_box, wxSizerFlags().Centre());
hardware_box->AddSpacer(space);
@ -324,26 +320,6 @@ RendererTab::RendererTab(wxWindow* parent)
SetSizerAndFit(tab_box.outer);
}
void RendererTab::UpdateBlendMode(GSRendererType renderer)
{
#ifdef _WIN32
if (renderer == GSRendererType::DX11)
{
m_blend_mode_d3d11.first ->Show();
m_blend_mode_d3d11.second->Show();
m_blend_mode.first ->Hide();
m_blend_mode.second->Hide();
}
else
{
m_blend_mode_d3d11.first ->Hide();
m_blend_mode_d3d11.second->Hide();
m_blend_mode.first ->Show();
m_blend_mode.second->Show();
}
#endif
}
HacksTab::HacksTab(wxWindow* parent)
: wxPanel(parent, wxID_ANY)
, m_ui(this)
@ -718,8 +694,6 @@ void Dialog::RendererChange()
m_adapter_select->Enable(!list.adapter_names.empty());
#ifdef _WIN32
m_renderer_panel->UpdateBlendMode(renderer);
m_renderer_panel->Layout(); // The version of wx we use on Windows is dumb and something prevents relayout from happening to notebook pages
#endif
}

View File

@ -105,17 +105,12 @@ namespace GSSettingsDialog
public:
GSUIElementHolder m_ui;
wxChoice* m_internal_resolution;
std::pair<wxChoice*, wxStaticText*> m_blend_mode;
#ifdef _WIN32
std::pair<wxChoice*, wxStaticText*> m_blend_mode_d3d11;
#endif
bool m_is_hardware = false;
bool m_is_native_res = false;
RendererTab(wxWindow* parent);
void Load() { m_ui.Load(); }
void Save() { m_ui.Save(); }
void UpdateBlendMode(GSRendererType renderer);
void DoUpdate() { m_ui.Update(); }
};