1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-07 03:13:49 +00:00

Disable usage of *_fragment_shader_interlock with tegra

It causes lockups with at least Tegra X1.
This commit is contained in:
fzurita 2018-04-16 00:46:35 -04:00 committed by Sergey Lipskiy
parent 7bad64ce70
commit e958eca3ed
2 changed files with 7 additions and 2 deletions

View File

@ -40,6 +40,8 @@ void GLInfo::init() {
renderer = Renderer::Intel; renderer = Renderer::Intel;
else if (strstr((const char*)strRenderer, "PowerVR") != nullptr) else if (strstr((const char*)strRenderer, "PowerVR") != nullptr)
renderer = Renderer::PowerVR; renderer = Renderer::PowerVR;
else if (strstr((const char*)strRenderer, "NVIDIA Tegra") != nullptr)
renderer = Renderer::Tegra;
LOG(LOG_VERBOSE, "OpenGL renderer: %s\n", strRenderer); LOG(LOG_VERBOSE, "OpenGL renderer: %s\n", strRenderer);
int numericVersion = majorVersion * 10 + minorVersion; int numericVersion = majorVersion * 10 + minorVersion;
@ -55,8 +57,10 @@ void GLInfo::init() {
msaa = true; msaa = true;
} }
fragment_interlock = Utils::isExtensionSupported(*this, "GL_ARB_fragment_shader_interlock"); //Tegra has a buggy implementation of fragment_shader_interlock that causes graphics lockups
fragment_interlockNV = Utils::isExtensionSupported(*this, "GL_NV_fragment_shader_interlock") && !fragment_interlock; bool hasBuggyFragmentShaderInterlock = renderer == Renderer::Tegra;
fragment_interlock = Utils::isExtensionSupported(*this, "GL_ARB_fragment_shader_interlock") && !hasBuggyFragmentShaderInterlock;
fragment_interlockNV = Utils::isExtensionSupported(*this, "GL_NV_fragment_shader_interlock") && !fragment_interlock && !hasBuggyFragmentShaderInterlock;
fragment_ordering = Utils::isExtensionSupported(*this, "GL_INTEL_fragment_shader_ordering") && !fragment_interlock && !fragment_interlockNV; fragment_ordering = Utils::isExtensionSupported(*this, "GL_INTEL_fragment_shader_ordering") && !fragment_interlock && !fragment_interlockNV;
imageTextures = imageTextures && (fragment_interlock || fragment_interlockNV || fragment_ordering); imageTextures = imageTextures && (fragment_interlock || fragment_interlockNV || fragment_ordering);

View File

@ -10,6 +10,7 @@ enum class Renderer {
VideoCore, VideoCore,
Intel, Intel,
PowerVR, PowerVR,
Tegra,
Other Other
}; };