diff --git a/plugins/GSdx/GS.cpp b/plugins/GSdx/GS.cpp index df768b8c47..77ccea5ab3 100644 --- a/plugins/GSdx/GS.cpp +++ b/plugins/GSdx/GS.cpp @@ -191,6 +191,13 @@ EXPORT_C GSclose() static int _GSopen(void** dsp, char* title, int renderer, int threads = -1) { + // I really don't know the impact on windows! It could work +#ifdef __linux__ + if (theApp.GetConfig("enable_nvidia_multi_thread", 1)) { + setenv("__GL_THREADED_OPTIMIZATIONS", "1", 0); + } +#endif + GSDevice* dev = NULL; if(renderer == -1) diff --git a/plugins/GSdx/GSLinuxDialog.cpp b/plugins/GSdx/GSLinuxDialog.cpp index 023321fbfe..e48e84e1eb 100644 --- a/plugins/GSdx/GSLinuxDialog.cpp +++ b/plugins/GSdx/GSLinuxDialog.cpp @@ -292,16 +292,20 @@ void populate_hw_table(GtkWidget* hw_table) GtkWidget* acc_blend_check = CreateCheckBox("Accurate Blend", "accurate_blend", false); GtkWidget* acc_date_check = CreateCheckBox("Accurate Date", "accurate_date", false); + GtkWidget* MT_nvidia_check = CreateCheckBox("Nvidia Multi-Thread support", "enable_nvidia_multi_thread", true); + // Some helper string gtk_widget_set_tooltip_text(paltex_check, dialog_message(IDC_PALTEX)); gtk_widget_set_tooltip_text(acc_blend_check, dialog_message(IDC_ACCURATE_BLEND)); gtk_widget_set_tooltip_text(acc_date_check, dialog_message(IDC_ACCURATE_DATE)); + gtk_widget_set_tooltip_text(MT_nvidia_check, "Huge speedup on Nvidia binary driver! No effect otherwise."); s_table_line = 0; InsertWidgetInTable(hw_table, filter_label, filter_combo_box); InsertWidgetInTable(hw_table, af_label, af_combo_box); InsertWidgetInTable(hw_table, paltex_check); InsertWidgetInTable(hw_table, acc_blend_check, acc_date_check); + InsertWidgetInTable(hw_table, MT_nvidia_check); } void populate_gl_table(GtkWidget* gl_table) diff --git a/plugins/GSdx/GSTextureOGL.cpp b/plugins/GSdx/GSTextureOGL.cpp index 4e2727b3e4..9fd7d58f01 100644 --- a/plugins/GSdx/GSTextureOGL.cpp +++ b/plugins/GSdx/GSTextureOGL.cpp @@ -63,7 +63,10 @@ namespace PboPool { // will use DMA CACHED memory as the source for buffer object operations void Init() { gl_GenBuffers(countof(m_pool), m_pool); - m_texture_storage = (theApp.GetConfig("ogl_texture_storage", !GLLoader::fglrx_buggy_driver) == 1) && GLLoader::found_GL_ARB_buffer_storage; + m_texture_storage = GLLoader::found_GL_ARB_buffer_storage; + // Code is really faster on MT driver. So far only nvidia support it + if (!(GLLoader::nvidia_buggy_driver && theApp.GetConfig("enable_nvidia_multi_thread", 1))) + m_texture_storage &= (theApp.GetConfig("ogl_texture_storage", 0) == 1); for (size_t i = 0; i < countof(m_pool); i++) { BindPbo();