Dolphin, the GameCube and Wii emulator - Forums

Full Version: Yet another Failed to Compile vertex shader error.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

taiki

Error here:

Failed to compile vertex shader!
This usually happens when trying to use Dolphin with an outdated GPU or integrated GPU like the Intel GMA series.

If you're sure this is Dolphin's error anyway, post the contents of [path redacted] along with this error message at the forums.

Debug info (ATI Technologies Inc., AMD Radeon HD 6750M OpenGL Engine, 4.1 ATI-1.28.29):
ERROR: 0:54: 'centroid', 'sample' and 'patch' must be directly followed by 'in', 'out' or 'varying'
ERROR: 0:60: Use of undeclared identifier 'o'
ERROR: 0:68: Use of undeclared identifier 'o'
ERROR: 0:70: Use of undeclared identifier 'o'
ERROR: 0:70: Use of undeclared identifier 'o'
ERROR: 0:74: Use of undeclared identifier 'o'
ERROR: 0:78: Use of undeclared identifier 'o'
ERROR: 0:78: Use of undeclared identifier 'o'
ERROR: 0:78: Use of undeclared identifier 'o'
ERROR: 0:78: Use of undeclared identifier 'o'
ERROR: 0:80: Use of undeclared identifier 'o'
ERROR: 0:80: Use of undeclared identifier 'o'
ERROR: 0:80: Use of undeclared identifier 'o'
ERROR: 0:81: Use of undeclared identifier 'o'
ERROR: 0:81: Use of undeclared identifier 'o'
ERROR: 0:81: Use of undeclared identifier 'o'
ERROR: 0:82: Use of undeclared identifier 'o'
ERROR: 0:82: Use of undeclared identifier 'o'
ERROR: 0:83: Use of undeclared identifier 'o'

Dump here:

#version 150




#extension GL_ARB_sample_shading : enable
#define SAMPLER_BINDING(x)

#extension GL_ARB_gpu_shader5 : enable




#define float2 vec2
#define float3 vec3
#define float4 vec4
#define uint2 uvec2
#define uint3 uvec3
#define uint4 uvec4
#define int2 ivec2
#define int3 ivec3
#define int4 ivec4
#define frac fract
#define lerp mix


//Pixel Shader for TEV stages
//1 TEV stages, 1 texgens, 16401 IND stages
int idot(int3 x, int3 y)
{
int3 tmp = x * y;
return tmp.x + tmp.y + tmp.z;
}
int idot(int4 x, int4 y)
{
int4 tmp = x * y;
return tmp.x + tmp.y + tmp.z + tmp.w;
}

int  iround(float  x) { return int (round(x)); }
int2 iround(float2 x) { return int2(round(x)); }
int3 iround(float3 x) { return int3(round(x)); }
int4 iround(float4 x) { return int4(round(x)); }

SAMPLER_BINDING(0) uniform sampler2DArray samp0;
SAMPLER_BINDING(1) uniform sampler2DArray samp1;
SAMPLER_BINDING(2) uniform sampler2DArray samp2;
SAMPLER_BINDING(3) uniform sampler2DArray samp3;
SAMPLER_BINDING(4) uniform sampler2DArray samp4;
SAMPLER_BINDING(5) uniform sampler2DArray samp5;
SAMPLER_BINDING(6) uniform sampler2DArray samp6;
SAMPLER_BINDING(7) uniform sampler2DArray samp7;

layout(std140) uniform PSBlock {
int4 color[4];
int4 k[4];
int4 alphaRef;
float4 texdim[8];
int4 czbias[2];
int4 cindscale[2];
int4 cindmtx[6];
int4 cfogcolor;
int4 cfogi;
float4 cfogf[2];
};
struct VS_OUTPUT {
 float4 pos;
 float4 colors_0;
 float4 colors_1;
 float3 tex0;
 float4 clipPos;
};
out vec4 ocol0;
in VertexData {
centroid VS_OUTPUT o;
};
void main()
{
float3 uv0 = o.tex0;
float4 clipPos = o.clipPos;
float4 colors_0 = o.colors_0;
float4 colors_1 = o.colors_1;
float4 rawpos = gl_FragCoord;
int4 c0 = color[1], c1 = color[2], c2 = color[3], prev = color[0];
int4 rastemp = int4(0, 0, 0, 0), textemp = int4(0, 0, 0, 0), konsttemp = int4(0, 0, 0, 0);
int3 comp16 = int3(1, 256, 0), comp24 = int3(1, 256, 256*256);
int alphabump=0;
int3 tevcoord=int3(0, 0, 0);
int2 wrappedcoord=int2(0,0), tempcoord=int2(0,0);
int4 tevin_a=int4(0,0,0,0),tevin_b=int4(0,0,0,0),tevin_c=int4(0,0,0,0),tevin_d=int4(0,0,0,0);

int2 fixpoint_uv0 = iround(uv0.xy * texdim[0].zw * 128.0);

// TEV stage 0
textemp = int4(255, 255, 255, 255);
konsttemp = int4(k[0].rgb, k[0].a);
tevin_a = int4(int3(0,0,0), 0)&255;
tevin_b = int4(int3(0,0,0), 0)&255;
tevin_c = int4(int3(0,0,0), 0)&255;
tevin_d = int4(konsttemp.rgb, konsttemp.a);
// color combine
prev.rgb = clamp((((tevin_d.rgb)) + (((((tevin_a.rgb<<8) + (tevin_b.rgb-tevin_a.rgb)*(tevin_c.rgb+(tevin_c.rgb>>7)))) + 128)>>8)), int3(0,0,0), int3(255,255,255));
// alpha combine
prev.a = clamp((((tevin_d.a)) + (((((tevin_a.a<<8) + (tevin_b.a-tevin_a.a)*(tevin_c.a+(tevin_c.a>>7)))) + 128)>>8)), 0, 255);
prev = prev & 255;
if(!( (prev.a >  alphaRef.r) && (prev.a >  alphaRef.g))) {
ocol0 = float4(0.0, 0.0, 0.0, 0.0);
}
int zCoord = iround(rawpos.z * float(0xFFFFFF));
float ze = (cfogf[1].x * 16777215.0) / float(cfogi.y - (zCoord >> cfogi.w));
float fog = clamp(ze - cfogf[1].z, 0.0, 1.0);
fog = 1.0 - exp2(-8.0 * fog);
int ifog = iround(fog * 256.0);
prev.rgb = (prev.rgb * (256 - ifog) + cfogcolor.rgb * ifog) >> 8;
ocol0 = float4(prev) / 255.0;
}
ERROR: 0:75: 'centroid', 'sample' and 'patch' must be directly followed by 'in', 'out' or 'varying'
ERROR: 0:79: Use of undeclared identifier 'o'
ERROR: 0:80: Use of undeclared identifier 'o'
ERROR: 0:81: Use of undeclared identifier 'o'
ERROR: 0:82: Use of undeclared identifier 'o'
ERROR: 0:92: Use of undeclared identifier 'uv0'


I'm on a 17 inch early 2011 MacBook pro with 16 gigs of RAM. This machine has an AMD 6750M GPU. It's a little older but it should support modern pixel and vertex shaders.

Am I just not able to run Dolphin or is there something else wrong? I haven't tried a reboot yet because that seems ridiculous but I'm going to reboot after this post and update if it fixed anything.

(You never know)
(12-19-2014, 02:06 PM)taiki Wrote: [ -> ]Error here:

Failed to compile vertex shader!
This usually happens when trying to use Dolphin with an outdated GPU or integrated GPU like the Intel GMA series.

If you're sure this is Dolphin's error anyway, post the contents of [path redacted] along with this error message at the forums.

Debug info (ATI Technologies Inc., AMD Radeon HD 6750M OpenGL Engine, 4.1 ATI-1.28.29):
ERROR: 0:54: 'centroid', 'sample' and 'patch' must be directly followed by 'in', 'out' or 'varying'

Likely a regression from https://github.com/dolphin-emu/dolphin/pull/1706; try a slightly older build, and if that works, please file a bug.
It's another Apple Driver problem, it seems, due to our line-width emulation being upgraded.