GSdx: Always enable Unscale Point and Line.

Always enable unscale point and line hack on upscaled resolutions, and
purge the gui option.

It was discussed in the past with Gregoy that it can be enabled without
causing any issues which will be beneficial to getting rid of 1 less
option and fixing a bunch of fmv issues without relying on a gui toggle.
This commit is contained in:
lightningterror 2018-11-25 07:10:36 +01:00
parent 8ff0249213
commit 9899d0d6b7
14 changed files with 16 additions and 52 deletions

View File

@ -437,7 +437,6 @@ void GSdxApp::Init()
m_default_configuration["UserHacks_HalfPixelOffset"] = "0";
m_default_configuration["UserHacks_merge_pp_sprite"] = "0";
m_default_configuration["UserHacks_MSAA"] = "0";
m_default_configuration["UserHacks_unscale_point_line"] = "0";
m_default_configuration["UserHacks_round_sprite_offset"] = "0";
m_default_configuration["UserHacks_SkipDraw"] = "0";
m_default_configuration["UserHacks_SkipDraw_Offset"] = "0";

View File

@ -138,8 +138,7 @@ BEGIN
CONTROL "Memory Wrapping",IDC_MEMORY_WRAPPING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,108,32,75,8
CONTROL "Merge Sprite",IDC_MERGE_PP_SPRITE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,108,45,90,8
CONTROL "Preload Frame Data",IDC_PRELOAD_GS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,108,58,80,8
CONTROL "Unscale Point and Line",IDC_UNSCALE_POINT_LINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,108,71,90,8
CONTROL "Wild Arms Offset",IDC_WILDHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,108,84,70,8
CONTROL "Wild Arms Offset",IDC_WILDHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,108,71,70,8
// Columns end
//
RTEXT "MSAA:",IDC_MSAA_TEXT,54,99,22,8

View File

@ -40,15 +40,6 @@ GSDevice11::GSDevice11()
m_state.bf = -1;
m_mipmap = theApp.GetConfigI("mipmap");
if (theApp.GetConfigB("UserHacks"))
{
UserHacks_unscale_pt_ln = theApp.GetConfigB("UserHacks_unscale_point_line");
}
else
{
UserHacks_unscale_pt_ln = false;
}
}
GSDevice11::~GSDevice11()

View File

@ -54,7 +54,6 @@ class GSDevice11 : public GSDeviceDX
CComPtr<ID3D11Buffer> m_ib_old;
bool m_srv_changed, m_ss_changed;
bool UserHacks_unscale_pt_ln;
float m_hack_topleft_offset;
int m_mipmap;

View File

@ -27,14 +27,6 @@
GSRendererDX11::GSRendererDX11()
: GSRendererDX(new GSTextureCache11(this), GSVector2(-0.5f))
{
if (theApp.GetConfigB("UserHacks"))
{
UserHacks_unscale_pt_ln = theApp.GetConfigB("UserHacks_unscale_point_line");
}
else
{
UserHacks_unscale_pt_ln = false;
}
}
bool GSRendererDX11::CreateDevice(GSDevice* dev)
@ -188,12 +180,12 @@ void GSRendererDX11::SetupIA(const float& sx, const float& sy)
D3D11_PRIMITIVE_TOPOLOGY t;
bool unscale_hack = UserHacks_unscale_pt_ln && (GetUpscaleMultiplier() != 1);
bool unscale_pt_ln = (GetUpscaleMultiplier() != 1);
switch (m_vt.m_primclass)
{
case GS_POINT_CLASS:
if (unscale_hack)
if (unscale_pt_ln)
{
m_gs_sel.point = 1;
gs_cb.PointSize = GSVector2(16.0f * sx, 16.0f * sy);
@ -202,7 +194,7 @@ void GSRendererDX11::SetupIA(const float& sx, const float& sy)
t = D3D11_PRIMITIVE_TOPOLOGY_POINTLIST;
break;
case GS_LINE_CLASS:
if (unscale_hack)
if (unscale_pt_ln)
{
m_gs_sel.line = 1;
gs_cb.PointSize = GSVector2(16.0f * sx, 16.0f * sy);

View File

@ -27,8 +27,6 @@
class GSRendererDX11 : public GSRendererDX
{
bool UserHacks_unscale_pt_ln;
protected:
void EmulateTextureShuffleAndFbmask();
void SetupIA(const float& sx, const float& sy);

View File

@ -157,7 +157,7 @@ void GSDevice11::SetupGS(GSSelector sel, const GSConstantBuffer* cb)
{
CComPtr<ID3D11GeometryShader> gs;
bool Unscale_GSShader = (sel.point == 1 || sel.line == 1) && UserHacks_unscale_pt_ln;
bool Unscale_GSShader = (sel.point == 1 || sel.line == 1);
if((sel.prim > 0 && (sel.iip == 0 || sel.prim == 3)) || Unscale_GSShader) // geometry shader works in every case, but not needed
{
auto i = std::as_const(m_gs).find(sel);

View File

@ -34,7 +34,6 @@ GSRendererOGL::GSRendererOGL()
// Hope nothing requires too many draw calls.
m_drawlist.reserve(2048);
UserHacks_unscale_pt_ln = theApp.GetConfigB("UserHacks_unscale_point_line");
UserHacks_HPO = theApp.GetConfigI("UserHacks_HalfPixelOffset");
UserHacks_tri_filter = static_cast<TriFiltering>(theApp.GetConfigI("UserHacks_TriFilter"));
@ -42,7 +41,6 @@ GSRendererOGL::GSRendererOGL()
ResetStates();
if (!theApp.GetConfigB("UserHacks")) {
UserHacks_unscale_pt_ln = false;
UserHacks_HPO = 0;
UserHacks_tri_filter = TriFiltering::None;
}
@ -66,12 +64,12 @@ void GSRendererOGL::SetupIA(const float& sx, const float& sy)
}
GLenum t = 0;
bool unscale_hack = UserHacks_unscale_pt_ln && (GetUpscaleMultiplier() != 1) && GLLoader::found_geometry_shader;
bool unscale_pt_ln = (GetUpscaleMultiplier() != 1) && GLLoader::found_geometry_shader;
switch(m_vt.m_primclass)
{
case GS_POINT_CLASS:
if (unscale_hack) {
if (unscale_pt_ln) {
m_gs_sel.point = 1;
vs_cb.PointSize = GSVector2(16.0f * sx, 16.0f * sy);
}
@ -80,7 +78,7 @@ void GSRendererOGL::SetupIA(const float& sx, const float& sy)
break;
case GS_LINE_CLASS:
if (unscale_hack) {
if (unscale_pt_ln) {
m_gs_sel.line = 1;
vs_cb.PointSize = GSVector2(16.0f * sx, 16.0f * sy);
}

View File

@ -50,7 +50,6 @@ class GSRendererOGL final : public GSRendererHW
PRIM_OVERLAP m_prim_overlap;
std::vector<size_t> m_drawlist;
bool UserHacks_unscale_pt_ln;
int UserHacks_HPO;
TriFiltering UserHacks_tri_filter;

View File

@ -445,7 +445,6 @@ void populate_hack_table(GtkWidget* hack_table)
GtkWidget* hack_depth_check = CreateCheckBox("Disable Depth Emulation", "UserHacks_DisableDepthSupport");
GtkWidget* hack_cpu_fbcv = CreateCheckBox("Frame Buffer Conversion", "UserHacks_CPU_FB_Conversion");
GtkWidget* hack_auto_flush = CreateCheckBox("Auto Flush", "UserHacks_AutoFlush");
GtkWidget* hack_unscale_prim = CreateCheckBox("Unscale Point and Line", "UserHacks_unscale_point_line");
GtkWidget* hack_merge_sprite = CreateCheckBox("Merge Sprite", "UserHacks_merge_pp_sprite");
GtkWidget* hack_wrap_mem = CreateCheckBox("Memory Wrapping", "wrap_gs_mem");
@ -474,7 +473,6 @@ void populate_hack_table(GtkWidget* hack_table)
AddTooltip(hack_depth_check, IDC_TC_DEPTH);
AddTooltip(hack_cpu_fbcv, IDC_CPU_FB_CONVERSION);
AddTooltip(hack_auto_flush, IDC_AUTO_FLUSH);
AddTooltip(hack_unscale_prim, IDC_UNSCALE_POINT_LINE);
AddTooltip(hack_merge_sprite, IDC_MERGE_PP_SPRITE);
AddTooltip(hack_wrap_mem, IDC_MEMORY_WRAPPING);
AddTooltip(trilinear_box, IDC_TRI_FILTER);
@ -487,8 +485,8 @@ void populate_hack_table(GtkWidget* hack_table)
InsertWidgetInTable(hack_table , align_sprite_check , hack_wrap_mem);
InsertWidgetInTable(hack_table , hack_auto_flush , hack_merge_sprite);
InsertWidgetInTable(hack_table , hack_depth_check , preload_gs_check);
InsertWidgetInTable(hack_table , hack_fast_inv , hack_unscale_prim);
InsertWidgetInTable(hack_table , hack_cpu_fbcv , hack_wild_check);
InsertWidgetInTable(hack_table , hack_fast_inv , hack_wild_check);
InsertWidgetInTable(hack_table , hack_cpu_fbcv);
// Other upscaling hacks
InsertWidgetInTable(hack_table , trilinear_label , trilinear_box);
InsertWidgetInTable(hack_table , hack_offset_label , hack_offset_box);

View File

@ -144,9 +144,6 @@ const char* dialog_message(int ID, bool* updateText) {
"Fixes some processing effects such as the shadows in the Jak series and radiosity in GTA:SA.\n"
"Warning: it's very costly on the performance.\n\n"
"Note: OpenGL HW renderer is able to handle Jak shadows at full speed without this option.";
case IDC_UNSCALE_POINT_LINE:
return "Increases the width of lines at higher than native resolutions. This ensures that the lines will keep the correct proportions and prevents aliasing. "
"Avoids empty lines on the screen in games such as Ridge Racer V, and clears FMVs obscured by a grid in games like the Silent Hill series and Dirge of Cerberus.";
case IDC_MEMORY_WRAPPING:
return "Emulates GS memory wrapping accurately. This fixes issues where part of the image is cut-off by block shaped sections such as the FMVs in Wallace & Gromit: The Curse of the Were-Rabbit and Thrillville.\n\n"
"Note: This hack can have a small impact on performance.";

View File

@ -80,7 +80,6 @@ enum {
IDC_LARGE_FB,
IDC_LINEAR_PRESENT,
IDC_AUTO_FLUSH,
IDC_UNSCALE_POINT_LINE,
IDC_MEMORY_WRAPPING,
IDC_MERGE_PP_SPRITE,
IDC_GEOMETRY_SHADER_OVERRIDE,

View File

@ -695,7 +695,6 @@ void GSHacksDlg::OnInit()
CheckDlgButton(m_hWnd, IDC_CPU_FB_CONVERSION, theApp.GetConfigB("UserHacks_CPU_FB_Conversion"));
CheckDlgButton(m_hWnd, IDC_FAST_TC_INV, theApp.GetConfigB("UserHacks_DisablePartialInvalidation"));
CheckDlgButton(m_hWnd, IDC_AUTO_FLUSH, theApp.GetConfigB("UserHacks_AutoFlush"));
CheckDlgButton(m_hWnd, IDC_UNSCALE_POINT_LINE, theApp.GetConfigB("UserHacks_unscale_point_line"));
CheckDlgButton(m_hWnd, IDC_MEMORY_WRAPPING, theApp.GetConfigB("wrap_gs_mem"));
CheckDlgButton(m_hWnd, IDC_MERGE_PP_SPRITE, theApp.GetConfigB("UserHacks_merge_pp_sprite"));
@ -729,7 +728,6 @@ void GSHacksDlg::OnInit()
EnableWindow(GetDlgItem(m_hWnd, IDC_TRI_FILTER_TEXT), ogl);
// Upscaling hacks:
EnableWindow(GetDlgItem(m_hWnd, IDC_UNSCALE_POINT_LINE), !dx9 && !native);
EnableWindow(GetDlgItem(m_hWnd, IDC_SPRITEHACK), !native);
EnableWindow(GetDlgItem(m_hWnd, IDC_WILDHACK), !native);
EnableWindow(GetDlgItem(m_hWnd, IDC_ALIGN_SPRITE), !native);
@ -767,7 +765,6 @@ void GSHacksDlg::OnInit()
AddTooltip(IDC_CPU_FB_CONVERSION);
AddTooltip(IDC_FAST_TC_INV);
AddTooltip(IDC_AUTO_FLUSH);
AddTooltip(IDC_UNSCALE_POINT_LINE);
AddTooltip(IDC_MEMORY_WRAPPING);
AddTooltip(IDC_TRI_FILTER);
AddTooltip(IDC_MERGE_PP_SPRITE);
@ -867,7 +864,6 @@ bool GSHacksDlg::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
theApp.SetConfig("UserHacks_CPU_FB_Conversion", (int)IsDlgButtonChecked(m_hWnd, IDC_CPU_FB_CONVERSION));
theApp.SetConfig("UserHacks_DisablePartialInvalidation", (int)IsDlgButtonChecked(m_hWnd, IDC_FAST_TC_INV));
theApp.SetConfig("UserHacks_AutoFlush", (int)IsDlgButtonChecked(m_hWnd, IDC_AUTO_FLUSH));
theApp.SetConfig("UserHacks_unscale_point_line", (int)IsDlgButtonChecked(m_hWnd, IDC_UNSCALE_POINT_LINE));
theApp.SetConfig("wrap_gs_mem", (int)IsDlgButtonChecked(m_hWnd, IDC_MEMORY_WRAPPING));
theApp.SetConfig("UserHacks_merge_pp_sprite", (int)IsDlgButtonChecked(m_hWnd, IDC_MERGE_PP_SPRITE));
theApp.SetConfig("UserHacks_TCOffsetX", SendMessage(GetDlgItem(m_hWnd, IDC_TCOFFSETX), UDM_GETPOS, 0, 0));

View File

@ -98,13 +98,12 @@
#define IDC_MEMORY_WRAPPING 2122
#define IDC_TRI_FILTER 2123
#define IDC_TRI_FILTER_TEXT 2124
#define IDC_UNSCALE_POINT_LINE 2125
#define IDC_MERGE_PP_SPRITE 2126
#define IDC_CPU_FB_CONVERSION 2127
#define IDC_SKIPDRAWHACK 2128
#define IDC_SKIPDRAWHACKEDIT 2129
#define IDC_SKIPDRAWOFFSET 2130
#define IDC_SKIPDRAWOFFSETEDIT 2131
#define IDC_MERGE_PP_SPRITE 2125
#define IDC_CPU_FB_CONVERSION 2126
#define IDC_SKIPDRAWHACK 2127
#define IDC_SKIPDRAWHACKEDIT 2128
#define IDC_SKIPDRAWOFFSET 2129
#define IDC_SKIPDRAWOFFSETEDIT 2130
// Shader:
#define IDC_SHADEBOOST 2140
#define IDC_FXAA 2141