mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
OGL: Workaround gl_ClipDistance bug on Mesa i965.
This commit is contained in:
@ -7,6 +7,7 @@
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "VideoCommon/BPMemory.h"
|
||||
#include "VideoCommon/DriverDetails.h"
|
||||
#include "VideoCommon/GeometryShaderGen.h"
|
||||
#include "VideoCommon/LightingShaderGen.h"
|
||||
#include "VideoCommon/VideoCommon.h"
|
||||
@ -211,6 +212,15 @@ ShaderCode GenerateGeometryShaderCode(APIType ApiType, const geometry_shader_uid
|
||||
{
|
||||
out.Write("\tVS_OUTPUT f;\n");
|
||||
AssignVSOutputMembers(out, "f", "vs[i]", uid_data->numTexGens, uid_data->pixel_lighting);
|
||||
|
||||
if (g_ActiveConfig.backend_info.bSupportsDepthClamp &&
|
||||
DriverDetails::HasBug(DriverDetails::BUG_BROKENCLIPDISTANCE))
|
||||
{
|
||||
// On certain GPUs we have to consume the clip distance from the vertex shader
|
||||
// or else the other vertex shader outputs will get corrupted.
|
||||
out.Write("\tf.clipDist0 = gl_in[i].gl_ClipDistance[0];\n");
|
||||
out.Write("\tf.clipDist1 = gl_in[i].gl_ClipDistance[1];\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user