Remove vertex streaming hack.
NV has buffer_storage, AMD has pinned memory. Both are better than that hack which shouldn't ever have been introduced in the first place.
This commit is contained in:
parent
b49c09c36b
commit
f1adc56a56
|
@ -86,7 +86,6 @@ wxString af_desc = wxTRANSLATE("Enable anisotropic filtering.\nEnhances visual q
|
||||||
wxString aa_desc = wxTRANSLATE("Reduces the amount of aliasing caused by rasterizing 3D graphics.\nThis makes the rendered picture look less blocky.\nHeavily decreases emulation speed and sometimes causes issues.\n\nIf unsure, select None.");
|
wxString aa_desc = wxTRANSLATE("Reduces the amount of aliasing caused by rasterizing 3D graphics.\nThis makes the rendered picture look less blocky.\nHeavily decreases emulation speed and sometimes causes issues.\n\nIf unsure, select None.");
|
||||||
wxString scaled_efb_copy_desc = wxTRANSLATE("Greatly increases quality of textures generated using render to texture effects.\nRaising the internal resolution will improve the effect of this setting.\nSlightly decreases performance and possibly causes issues (although unlikely).\n\nIf unsure, leave this checked.");
|
wxString scaled_efb_copy_desc = wxTRANSLATE("Greatly increases quality of textures generated using render to texture effects.\nRaising the internal resolution will improve the effect of this setting.\nSlightly decreases performance and possibly causes issues (although unlikely).\n\nIf unsure, leave this checked.");
|
||||||
wxString pixel_lighting_desc = wxTRANSLATE("Calculate lighting of 3D graphics per-pixel rather than per vertex.\nDecreases emulation speed by some percent (depending on your GPU).\nThis usually is a safe enhancement, but might cause issues sometimes.\n\nIf unsure, leave this unchecked.");
|
wxString pixel_lighting_desc = wxTRANSLATE("Calculate lighting of 3D graphics per-pixel rather than per vertex.\nDecreases emulation speed by some percent (depending on your GPU).\nThis usually is a safe enhancement, but might cause issues sometimes.\n\nIf unsure, leave this unchecked.");
|
||||||
wxString hacked_buffer_upload_desc = wxTRANSLATE("Uses unsafe operations to speed up vertex streaming in OpenGL. There are no known problems on supported GPUs, but it will cause severe stability and graphical issues otherwise.\n\nIf unsure, leave this unchecked.");
|
|
||||||
wxString fast_depth_calc_desc = wxTRANSLATE("Use a less accurate algorithm to calculate depth values.\nCauses issues in a few games but might give a decent speedup.\n\nIf unsure, leave this checked.");
|
wxString fast_depth_calc_desc = wxTRANSLATE("Use a less accurate algorithm to calculate depth values.\nCauses issues in a few games but might give a decent speedup.\n\nIf unsure, leave this checked.");
|
||||||
wxString force_filtering_desc = wxTRANSLATE("Force texture filtering even if the emulated game explicitly disabled it.\nImproves texture quality slightly but causes glitches in some games.\n\nIf unsure, leave this unchecked.");
|
wxString force_filtering_desc = wxTRANSLATE("Force texture filtering even if the emulated game explicitly disabled it.\nImproves texture quality slightly but causes glitches in some games.\n\nIf unsure, leave this unchecked.");
|
||||||
wxString _3d_vision_desc = wxTRANSLATE("Enable 3D effects via stereoscopy using Nvidia 3D Vision technology if it's supported by your GPU.\nPossibly causes issues.\nRequires fullscreen to work.\n\nIf unsure, leave this unchecked.");
|
wxString _3d_vision_desc = wxTRANSLATE("Enable 3D effects via stereoscopy using Nvidia 3D Vision technology if it's supported by your GPU.\nPossibly causes issues.\nRequires fullscreen to work.\n\nIf unsure, leave this unchecked.");
|
||||||
|
@ -500,7 +499,6 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
|
||||||
szr_other->Add(CreateCheckBox(page_hacks, _("Disable Destination Alpha"), wxGetTranslation(disable_dstalpha_desc), vconfig.bDstAlphaPass));
|
szr_other->Add(CreateCheckBox(page_hacks, _("Disable Destination Alpha"), wxGetTranslation(disable_dstalpha_desc), vconfig.bDstAlphaPass));
|
||||||
szr_other->Add(CreateCheckBox(page_hacks, _("OpenMP Texture Decoder"), wxGetTranslation(omp_desc), vconfig.bOMPDecoder));
|
szr_other->Add(CreateCheckBox(page_hacks, _("OpenMP Texture Decoder"), wxGetTranslation(omp_desc), vconfig.bOMPDecoder));
|
||||||
szr_other->Add(CreateCheckBox(page_hacks, _("Fast Depth Calculation"), wxGetTranslation(fast_depth_calc_desc), vconfig.bFastDepthCalc));
|
szr_other->Add(CreateCheckBox(page_hacks, _("Fast Depth Calculation"), wxGetTranslation(fast_depth_calc_desc), vconfig.bFastDepthCalc));
|
||||||
szr_other->Add(hacked_buffer_upload = CreateCheckBox(page_hacks, _("Vertex Streaming Hack"), wxGetTranslation(hacked_buffer_upload_desc), vconfig.bHackedBufferUpload));
|
|
||||||
|
|
||||||
wxStaticBoxSizer* const group_other = new wxStaticBoxSizer(wxVERTICAL, page_hacks, _("Other"));
|
wxStaticBoxSizer* const group_other = new wxStaticBoxSizer(wxVERTICAL, page_hacks, _("Other"));
|
||||||
group_other->Add(szr_other, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
|
group_other->Add(szr_other, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
|
||||||
|
|
|
@ -167,10 +167,6 @@ protected:
|
||||||
virtual_xfb->Enable(vconfig.bUseXFB);
|
virtual_xfb->Enable(vconfig.bUseXFB);
|
||||||
real_xfb->Enable(vconfig.bUseXFB);
|
real_xfb->Enable(vconfig.bUseXFB);
|
||||||
|
|
||||||
// OGL Hacked buffer
|
|
||||||
hacked_buffer_upload->Enable(Core::GetState() == Core::CORE_UNINITIALIZED && vconfig.backend_info.APIType == API_OPENGL);
|
|
||||||
hacked_buffer_upload->Show(vconfig.backend_info.APIType == API_OPENGL);
|
|
||||||
|
|
||||||
ev.Skip();
|
ev.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,7 +195,6 @@ protected:
|
||||||
SettingRadioButton* efbcopy_ram;
|
SettingRadioButton* efbcopy_ram;
|
||||||
SettingCheckBox* cache_efb_copies;
|
SettingCheckBox* cache_efb_copies;
|
||||||
SettingCheckBox* emulate_efb_format_changes;
|
SettingCheckBox* emulate_efb_format_changes;
|
||||||
SettingCheckBox* hacked_buffer_upload;
|
|
||||||
|
|
||||||
SettingRadioButton* virtual_xfb;
|
SettingRadioButton* virtual_xfb;
|
||||||
SettingRadioButton* real_xfb;
|
SettingRadioButton* real_xfb;
|
||||||
|
|
|
@ -23,14 +23,6 @@ StreamBuffer::StreamBuffer(u32 type, size_t size)
|
||||||
|
|
||||||
bool nvidia = !strcmp(g_ogl_config.gl_vendor, "NVIDIA Corporation");
|
bool nvidia = !strcmp(g_ogl_config.gl_vendor, "NVIDIA Corporation");
|
||||||
|
|
||||||
// TODO: move this to InitBackendInfo
|
|
||||||
if(g_ActiveConfig.bHackedBufferUpload && DriverDetails::HasBug(DriverDetails::BUG_BROKENHACKEDBUFFER))
|
|
||||||
{
|
|
||||||
OSD::AddMessage("Vertex Streaming Hack isn't supported by your GPU.", 10000);
|
|
||||||
g_ActiveConfig.bHackedBufferUpload = false;
|
|
||||||
g_Config.bHackedBufferUpload = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_ogl_config.bSupportsGLBufferStorage &&
|
if (g_ogl_config.bSupportsGLBufferStorage &&
|
||||||
!(DriverDetails::HasBug(DriverDetails::BUG_BROKENBUFFERSTORAGE) && type == GL_ARRAY_BUFFER))
|
!(DriverDetails::HasBug(DriverDetails::BUG_BROKENBUFFERSTORAGE) && type == GL_ARRAY_BUFFER))
|
||||||
m_uploadtype = BUFFERSTORAGE;
|
m_uploadtype = BUFFERSTORAGE;
|
||||||
|
@ -38,8 +30,6 @@ StreamBuffer::StreamBuffer(u32 type, size_t size)
|
||||||
m_uploadtype = BUFFERSUBDATA;
|
m_uploadtype = BUFFERSUBDATA;
|
||||||
else if(!g_ogl_config.bSupportsGLBaseVertex)
|
else if(!g_ogl_config.bSupportsGLBaseVertex)
|
||||||
m_uploadtype = BUFFERDATA;
|
m_uploadtype = BUFFERDATA;
|
||||||
else if(g_ogl_config.bSupportsGLSync && g_ActiveConfig.bHackedBufferUpload)
|
|
||||||
m_uploadtype = MAP_AND_RISK;
|
|
||||||
else if(g_ogl_config.bSupportsGLSync && g_ogl_config.bSupportsGLPinnedMemory &&
|
else if(g_ogl_config.bSupportsGLSync && g_ogl_config.bSupportsGLPinnedMemory &&
|
||||||
!(DriverDetails::HasBug(DriverDetails::BUG_BROKENPINNEDMEMORY) && type == GL_ELEMENT_ARRAY_BUFFER))
|
!(DriverDetails::HasBug(DriverDetails::BUG_BROKENPINNEDMEMORY) && type == GL_ELEMENT_ARRAY_BUFFER))
|
||||||
m_uploadtype = PINNED_MEMORY;
|
m_uploadtype = PINNED_MEMORY;
|
||||||
|
@ -117,11 +107,6 @@ void StreamBuffer::Alloc ( size_t size, u32 stride )
|
||||||
m_free_iterator = iter_end;
|
m_free_iterator = iter_end;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
|
||||||
case MAP_AND_RISK:
|
|
||||||
if(iter_end >= m_size) {
|
|
||||||
m_iterator_aligned = 0;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case BUFFERSUBDATA:
|
case BUFFERSUBDATA:
|
||||||
case BUFFERDATA:
|
case BUFFERDATA:
|
||||||
|
@ -145,7 +130,6 @@ size_t StreamBuffer::Upload ( u8* data, size_t size )
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PINNED_MEMORY:
|
case PINNED_MEMORY:
|
||||||
case MAP_AND_RISK:
|
|
||||||
case BUFFERSTORAGE:
|
case BUFFERSTORAGE:
|
||||||
if (pointer)
|
if (pointer)
|
||||||
memcpy(pointer + m_iterator, data, size);
|
memcpy(pointer + m_iterator, data, size);
|
||||||
|
@ -219,14 +203,6 @@ void StreamBuffer::Init()
|
||||||
ERROR_LOG(VIDEO, "Buffer allocation failed");
|
ERROR_LOG(VIDEO, "Buffer allocation failed");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MAP_AND_RISK:
|
|
||||||
glBindBuffer(m_buffertype, m_buffer);
|
|
||||||
glBufferData(m_buffertype, m_size, NULL, GL_STREAM_DRAW);
|
|
||||||
pointer = (u8*)glMapBufferRange(m_buffertype, 0, m_size, GL_MAP_WRITE_BIT);
|
|
||||||
glUnmapBuffer(m_buffertype);
|
|
||||||
if(!pointer)
|
|
||||||
ERROR_LOG(VIDEO, "Buffer allocation failed");
|
|
||||||
break;
|
|
||||||
case BUFFERDATA:
|
case BUFFERDATA:
|
||||||
glBindBuffer(m_buffertype, m_buffer);
|
glBindBuffer(m_buffertype, m_buffer);
|
||||||
break;
|
break;
|
||||||
|
@ -239,7 +215,6 @@ void StreamBuffer::Shutdown()
|
||||||
case MAP_AND_SYNC:
|
case MAP_AND_SYNC:
|
||||||
DeleteFences();
|
DeleteFences();
|
||||||
break;
|
break;
|
||||||
case MAP_AND_RISK:
|
|
||||||
case MAP_AND_ORPHAN:
|
case MAP_AND_ORPHAN:
|
||||||
case BUFFERSUBDATA:
|
case BUFFERSUBDATA:
|
||||||
case BUFFERDATA:
|
case BUFFERDATA:
|
||||||
|
|
|
@ -20,11 +20,10 @@ namespace OGL
|
||||||
enum StreamType {
|
enum StreamType {
|
||||||
MAP_AND_ORPHAN = (1 << 1),
|
MAP_AND_ORPHAN = (1 << 1),
|
||||||
MAP_AND_SYNC = (1 << 2),
|
MAP_AND_SYNC = (1 << 2),
|
||||||
MAP_AND_RISK = (1 << 3),
|
PINNED_MEMORY = (1 << 3),
|
||||||
PINNED_MEMORY = (1 << 4),
|
BUFFERSUBDATA = (1 << 4),
|
||||||
BUFFERSUBDATA = (1 << 5),
|
BUFFERDATA = (1 << 5),
|
||||||
BUFFERDATA = (1 << 6),
|
BUFFERSTORAGE = (1 << 6),
|
||||||
BUFFERSTORAGE = (1 << 7),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class StreamBuffer {
|
class StreamBuffer {
|
||||||
|
|
|
@ -68,7 +68,6 @@ void VideoConfig::Load(const char *ini_file)
|
||||||
iniFile.Get("Settings", "AnaglyphStereoSeparation", &iAnaglyphStereoSeparation, 200);
|
iniFile.Get("Settings", "AnaglyphStereoSeparation", &iAnaglyphStereoSeparation, 200);
|
||||||
iniFile.Get("Settings", "AnaglyphFocalAngle", &iAnaglyphFocalAngle, 0);
|
iniFile.Get("Settings", "AnaglyphFocalAngle", &iAnaglyphFocalAngle, 0);
|
||||||
iniFile.Get("Settings", "EnablePixelLighting", &bEnablePixelLighting, 0);
|
iniFile.Get("Settings", "EnablePixelLighting", &bEnablePixelLighting, 0);
|
||||||
iniFile.Get("Settings", "HackedBufferUpload", &bHackedBufferUpload, 0);
|
|
||||||
iniFile.Get("Settings", "FastDepthCalc", &bFastDepthCalc, true);
|
iniFile.Get("Settings", "FastDepthCalc", &bFastDepthCalc, true);
|
||||||
|
|
||||||
iniFile.Get("Settings", "MSAA", &iMultisampleMode, 0);
|
iniFile.Get("Settings", "MSAA", &iMultisampleMode, 0);
|
||||||
|
@ -151,7 +150,6 @@ void VideoConfig::GameIniLoad()
|
||||||
CHECK_SETTING("Video_Settings", "AnaglyphStereoSeparation", iAnaglyphStereoSeparation);
|
CHECK_SETTING("Video_Settings", "AnaglyphStereoSeparation", iAnaglyphStereoSeparation);
|
||||||
CHECK_SETTING("Video_Settings", "AnaglyphFocalAngle", iAnaglyphFocalAngle);
|
CHECK_SETTING("Video_Settings", "AnaglyphFocalAngle", iAnaglyphFocalAngle);
|
||||||
CHECK_SETTING("Video_Settings", "EnablePixelLighting", bEnablePixelLighting);
|
CHECK_SETTING("Video_Settings", "EnablePixelLighting", bEnablePixelLighting);
|
||||||
CHECK_SETTING("Video_Settings", "HackedBufferUpload", bHackedBufferUpload);
|
|
||||||
CHECK_SETTING("Video_Settings", "FastDepthCalc", bFastDepthCalc);
|
CHECK_SETTING("Video_Settings", "FastDepthCalc", bFastDepthCalc);
|
||||||
CHECK_SETTING("Video_Settings", "MSAA", iMultisampleMode);
|
CHECK_SETTING("Video_Settings", "MSAA", iMultisampleMode);
|
||||||
int tmp = -9000;
|
int tmp = -9000;
|
||||||
|
@ -250,7 +248,6 @@ void VideoConfig::Save(const char *ini_file)
|
||||||
iniFile.Set("Settings", "AnaglyphStereoSeparation", iAnaglyphStereoSeparation);
|
iniFile.Set("Settings", "AnaglyphStereoSeparation", iAnaglyphStereoSeparation);
|
||||||
iniFile.Set("Settings", "AnaglyphFocalAngle", iAnaglyphFocalAngle);
|
iniFile.Set("Settings", "AnaglyphFocalAngle", iAnaglyphFocalAngle);
|
||||||
iniFile.Set("Settings", "EnablePixelLighting", bEnablePixelLighting);
|
iniFile.Set("Settings", "EnablePixelLighting", bEnablePixelLighting);
|
||||||
iniFile.Set("Settings", "HackedBufferUpload", bHackedBufferUpload);
|
|
||||||
iniFile.Set("Settings", "FastDepthCalc", bFastDepthCalc);
|
iniFile.Set("Settings", "FastDepthCalc", bFastDepthCalc);
|
||||||
|
|
||||||
iniFile.Set("Settings", "ShowEFBCopyRegions", bShowEFBCopyRegions);
|
iniFile.Set("Settings", "ShowEFBCopyRegions", bShowEFBCopyRegions);
|
||||||
|
|
|
@ -119,7 +119,6 @@ struct VideoConfig
|
||||||
float fAspectRatioHackW, fAspectRatioHackH;
|
float fAspectRatioHackW, fAspectRatioHackH;
|
||||||
bool bUseBBox;
|
bool bUseBBox;
|
||||||
bool bEnablePixelLighting;
|
bool bEnablePixelLighting;
|
||||||
bool bHackedBufferUpload;
|
|
||||||
bool bFastDepthCalc;
|
bool bFastDepthCalc;
|
||||||
int iLog; // CONF_ bits
|
int iLog; // CONF_ bits
|
||||||
int iSaveTargetId; // TODO: Should be dropped
|
int iSaveTargetId; // TODO: Should be dropped
|
||||||
|
|
Loading…
Reference in New Issue