From afa251af427514510e3b2bf90255305716a9dac6 Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Fri, 12 Aug 2016 13:42:18 +0200 Subject: [PATCH] DriverDetails: Add bug for broken gl_ClipDistance on i965. --- Source/Core/VideoBackends/OGL/Render.cpp | 3 ++- Source/Core/VideoCommon/DriverDetails.cpp | 1 + Source/Core/VideoCommon/DriverDetails.h | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp index 658cc29b3c..77e3356255 100644 --- a/Source/Core/VideoBackends/OGL/Render.cpp +++ b/Source/Core/VideoBackends/OGL/Render.cpp @@ -482,7 +482,8 @@ Renderer::Renderer() GLExtensions::Supports("GL_ARB_shading_language_420pack"); // Clip distance support is useless without a method to clamp the depth range - g_Config.backend_info.bSupportsDepthClamp = GLExtensions::Supports("GL_ARB_depth_clamp"); + g_Config.backend_info.bSupportsDepthClamp = GLExtensions::Supports("GL_ARB_depth_clamp") && + !DriverDetails::HasBug(DriverDetails::BUG_BROKENCLIPDISTANCE); g_ogl_config.bSupportsGLSLCache = GLExtensions::Supports("GL_ARB_get_program_binary"); g_ogl_config.bSupportsGLPinnedMemory = GLExtensions::Supports("GL_AMD_pinned_memory"); diff --git a/Source/Core/VideoCommon/DriverDetails.cpp b/Source/Core/VideoCommon/DriverDetails.cpp index f65f0afa3e..6da311c4e2 100644 --- a/Source/Core/VideoCommon/DriverDetails.cpp +++ b/Source/Core/VideoCommon/DriverDetails.cpp @@ -74,6 +74,7 @@ static BugInfo m_known_bugs[] = { {OS_WINDOWS, VENDOR_INTEL, DRIVER_INTEL, Family::UNKNOWN, BUG_INTELBROKENBUFFERSTORAGE, 101810.3907, 101810.3960, true}, {OS_ALL, VENDOR_ATI, DRIVER_ATI, Family::UNKNOWN, BUG_SLOWGETBUFFERSUBDATA, -1.0, -1.0, true}, + {OS_ALL, VENDOR_MESA, DRIVER_I965, Family::UNKNOWN, BUG_BROKENCLIPDISTANCE, -1.0, -1.0, true}, }; static std::map m_bugs; diff --git a/Source/Core/VideoCommon/DriverDetails.h b/Source/Core/VideoCommon/DriverDetails.h index 9c705694c6..414ef03390 100644 --- a/Source/Core/VideoCommon/DriverDetails.h +++ b/Source/Core/VideoCommon/DriverDetails.h @@ -204,6 +204,14 @@ enum Bug // GPU memory to system memory. Use glMapBufferRange for BBox reads on AMD, and glGetBufferSubData // everywhere else. BUG_SLOWGETBUFFERSUBDATA, + + // Bug: Broken lines in geometry shaders when writing to gl_ClipDistance + // Affected Devices: Mesa i965 + // Started Version: -1 + // Ended Version: -1 + // Mesa hasn't tested geometry shaders on i965 with user-defined clipping planes. + // Causes misrenderings on a large amount of things that draw lines. + BUG_BROKENCLIPDISTANCE, }; // Initializes our internal vendor, device family, and driver version