mirror of https://github.com/PCSX2/pcsx2.git
gsdx ogl: automatic setup of geometry shader
* disable it for gallium Mesa driver * Re-enable it for Nvidia driver
This commit is contained in:
parent
70d1719b7d
commit
483b5a75e8
|
@ -124,10 +124,11 @@ PFNGLDEPTHRANGEDNVPROC gl_DepthRangedNV = NULL;
|
||||||
|
|
||||||
namespace GLLoader {
|
namespace GLLoader {
|
||||||
|
|
||||||
bool fglrx_buggy_driver = false;
|
bool fglrx_buggy_driver = false;
|
||||||
bool nvidia_buggy_driver = false;
|
bool mesa_amd_buggy_driver = false;
|
||||||
bool intel_buggy_driver = false;
|
bool nvidia_buggy_driver = false;
|
||||||
bool in_replayer = false;
|
bool intel_buggy_driver = false;
|
||||||
|
bool in_replayer = false;
|
||||||
|
|
||||||
// Optional
|
// Optional
|
||||||
bool found_GL_ARB_separate_shader_objects = false;
|
bool found_GL_ARB_separate_shader_objects = false;
|
||||||
|
@ -139,14 +140,14 @@ namespace GLLoader {
|
||||||
// GL4 hardware
|
// GL4 hardware
|
||||||
bool found_GL_ARB_copy_image = false; // Not sure actually maybe GL3 GPU can do it
|
bool found_GL_ARB_copy_image = false; // Not sure actually maybe GL3 GPU can do it
|
||||||
bool found_GL_ARB_gpu_shader5 = false;
|
bool found_GL_ARB_gpu_shader5 = false;
|
||||||
bool found_GL_ARB_shader_image_load_store = false;
|
bool found_GL_ARB_shader_image_load_store = false; // GLES3.1
|
||||||
bool found_GL_ARB_shader_subroutine = false;
|
bool found_GL_ARB_shader_subroutine = false;
|
||||||
bool found_GL_ARB_bindless_texture = false; // GL5 GPU?
|
bool found_GL_ARB_bindless_texture = false; // GL5 GPU?
|
||||||
// Surely recent hardware
|
// Surely recent hardware
|
||||||
bool found_GL_NV_depth_buffer_float = false;
|
bool found_GL_NV_depth_buffer_float = false;
|
||||||
|
|
||||||
// Mandatory for FULL GL (but optional for GLES)
|
// Mandatory for FULL GL (but optional for GLES)
|
||||||
bool found_GL_ARB_multi_bind = false; // Not yet. Wait Mesa & AMD drivers. Note might be deprecated by bindless_texture
|
bool found_GL_ARB_multi_bind = false; // Not yet. Wait Mesa & AMD drivers.
|
||||||
bool found_GL_ARB_shading_language_420pack = false; // GLES 3.1 ???
|
bool found_GL_ARB_shading_language_420pack = false; // GLES 3.1 ???
|
||||||
|
|
||||||
// Mandatory
|
// Mandatory
|
||||||
|
@ -182,6 +183,7 @@ namespace GLLoader {
|
||||||
|
|
||||||
const char* vendor = (const char*)glGetString(GL_VENDOR);
|
const char* vendor = (const char*)glGetString(GL_VENDOR);
|
||||||
fprintf(stderr, "Supported Opengl version: %s on GPU: %s. Vendor: %s\n", s, glGetString(GL_RENDERER), vendor);
|
fprintf(stderr, "Supported Opengl version: %s on GPU: %s. Vendor: %s\n", s, glGetString(GL_RENDERER), vendor);
|
||||||
|
fprintf(stderr, "Note: the maximal version supported by GSdx is 3.3 (even if you driver support more)!\n");
|
||||||
|
|
||||||
// Name change but driver is still bad!
|
// Name change but driver is still bad!
|
||||||
if (strstr(vendor, "ATI") || strstr(vendor, "Advanced Micro Devices"))
|
if (strstr(vendor, "ATI") || strstr(vendor, "Advanced Micro Devices"))
|
||||||
|
@ -190,6 +192,8 @@ namespace GLLoader {
|
||||||
nvidia_buggy_driver = true;
|
nvidia_buggy_driver = true;
|
||||||
if (strstr(vendor, "Intel"))
|
if (strstr(vendor, "Intel"))
|
||||||
intel_buggy_driver = true;
|
intel_buggy_driver = true;
|
||||||
|
if (strstr(vendor, "X.Org")) // Note: it might actually catch nouveau too, but bug are likely to be the same anyway
|
||||||
|
mesa_amd_buggy_driver = true;
|
||||||
|
|
||||||
GLuint dot = 0;
|
GLuint dot = 0;
|
||||||
while (s[dot] != '\0' && s[dot] != '.') dot++;
|
while (s[dot] != '\0' && s[dot] != '.') dot++;
|
||||||
|
@ -203,7 +207,7 @@ namespace GLLoader {
|
||||||
fprintf(stderr, "Geometry shaders are not supported. Required openGL 3.2\n");
|
fprintf(stderr, "Geometry shaders are not supported. Required openGL 3.2\n");
|
||||||
found_geometry_shader = false;
|
found_geometry_shader = false;
|
||||||
}
|
}
|
||||||
if (nvidia_buggy_driver || intel_buggy_driver) {
|
if (mesa_amd_buggy_driver || intel_buggy_driver) {
|
||||||
fprintf(stderr, "Buggy driver detected. Geometry shaders will be disabled\n");
|
fprintf(stderr, "Buggy driver detected. Geometry shaders will be disabled\n");
|
||||||
found_geometry_shader = false;
|
found_geometry_shader = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -276,6 +276,7 @@ namespace GLLoader {
|
||||||
bool check_gl_supported_extension();
|
bool check_gl_supported_extension();
|
||||||
|
|
||||||
extern bool fglrx_buggy_driver;
|
extern bool fglrx_buggy_driver;
|
||||||
|
extern bool mesa_amd_buggy_driver;
|
||||||
extern bool nvidia_buggy_driver;
|
extern bool nvidia_buggy_driver;
|
||||||
extern bool intel_buggy_driver;
|
extern bool intel_buggy_driver;
|
||||||
extern bool in_replayer;
|
extern bool in_replayer;
|
||||||
|
|
Loading…
Reference in New Issue