mirror of https://github.com/PCSX2/pcsx2.git
glsl: set a size to gl_ClipDistance array
The purpose is to avoid issue on MS-Intel driver without a dedicated hack in the compilation. Code doesn't use it so I suspect others implement to discard the statement.
This commit is contained in:
parent
a1957a685d
commit
bdc8038e7e
|
@ -217,16 +217,7 @@ std::string GSShaderOGL::GenGlslHeader(const std::string& entry, GLenum type, co
|
|||
// AMD/nvidia define it to 0
|
||||
// intel window don't define it
|
||||
// intel linux refuse to define it
|
||||
#ifdef _WINDOWS
|
||||
// Intel doesn't suppport properly gl_ClipDistance
|
||||
// (use the existing macro to disable it)
|
||||
if (GLLoader::intel_buggy_driver)
|
||||
header += "#define pGL_ES 1\n";
|
||||
else
|
||||
header += "#define pGL_ES 0\n";
|
||||
#else
|
||||
header += "#define pGL_ES 0\n";
|
||||
#endif
|
||||
|
||||
// Allow to puts several shader in 1 files
|
||||
switch (type) {
|
||||
|
|
|
@ -13,7 +13,7 @@ out gl_PerVertex {
|
|||
vec4 gl_Position;
|
||||
float gl_PointSize;
|
||||
#if !pGL_ES
|
||||
float gl_ClipDistance[];
|
||||
float gl_ClipDistance[1];
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ out gl_PerVertex {
|
|||
vec4 gl_Position;
|
||||
float gl_PointSize;
|
||||
#if !pGL_ES
|
||||
float gl_ClipDistance[];
|
||||
float gl_ClipDistance[1];
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -144,7 +144,7 @@ in gl_PerVertex {
|
|||
vec4 gl_Position;
|
||||
float gl_PointSize;
|
||||
#if !pGL_ES
|
||||
float gl_ClipDistance[];
|
||||
float gl_ClipDistance[1];
|
||||
#endif
|
||||
} gl_in[];
|
||||
//in int gl_PrimitiveIDIn;
|
||||
|
@ -153,7 +153,7 @@ out gl_PerVertex {
|
|||
vec4 gl_Position;
|
||||
float gl_PointSize;
|
||||
#if !pGL_ES
|
||||
float gl_ClipDistance[];
|
||||
float gl_ClipDistance[1];
|
||||
#endif
|
||||
};
|
||||
//out int gl_PrimitiveID;
|
||||
|
|
|
@ -38,7 +38,7 @@ static const char* convert_glsl =
|
|||
" vec4 gl_Position;\n"
|
||||
" float gl_PointSize;\n"
|
||||
"#if !pGL_ES\n"
|
||||
" float gl_ClipDistance[];\n"
|
||||
" float gl_ClipDistance[1];\n"
|
||||
"#endif\n"
|
||||
"};\n"
|
||||
"\n"
|
||||
|
@ -665,7 +665,7 @@ static const char* tfx_vgs_glsl =
|
|||
" vec4 gl_Position;\n"
|
||||
" float gl_PointSize;\n"
|
||||
"#if !pGL_ES\n"
|
||||
" float gl_ClipDistance[];\n"
|
||||
" float gl_ClipDistance[1];\n"
|
||||
"#endif\n"
|
||||
"};\n"
|
||||
"\n"
|
||||
|
@ -751,7 +751,7 @@ static const char* tfx_vgs_glsl =
|
|||
" vec4 gl_Position;\n"
|
||||
" float gl_PointSize;\n"
|
||||
"#if !pGL_ES\n"
|
||||
" float gl_ClipDistance[];\n"
|
||||
" float gl_ClipDistance[1];\n"
|
||||
"#endif\n"
|
||||
"} gl_in[];\n"
|
||||
"//in int gl_PrimitiveIDIn;\n"
|
||||
|
@ -760,7 +760,7 @@ static const char* tfx_vgs_glsl =
|
|||
" vec4 gl_Position;\n"
|
||||
" float gl_PointSize;\n"
|
||||
"#if !pGL_ES\n"
|
||||
" float gl_ClipDistance[];\n"
|
||||
" float gl_ClipDistance[1];\n"
|
||||
"#endif\n"
|
||||
"};\n"
|
||||
"//out int gl_PrimitiveID;\n"
|
||||
|
|
Loading…
Reference in New Issue