Emulator Issues #7006
closedD3D throws vertex shader errors with all games when going ingame after vertex loader cleanup merge.
0%
Description
[READ THIS: https://forums.dolphin-emu.org/showthread.php?pid=276132 <<<
Your answers are there!]
[Leave the questions as they are and answer them in the next line]
[Remove lines written inside brackets [], but nothing else]
Game Name?
All games
Game ID?¶
What's the problem? Describe what went wrong in few words.
When any game loads a level using d3d it throws vertex shader errors.
What did you expect to happen instead?
Not to throw an error.
What steps will reproduce the problem?
[Don't assume we have ever played the game and know any level names. Be as
specific as possible.]
1.Load any game.
2.Try to start/load a game.
3.Get this error http://prntscr.com/2oh8vs
Dolphin 3.5 and 3.5-367 are old versions of Dolphin that have
known issues and bugs, so don't report issues about them and test the
latest Dolphin version first.
Which versions of Dolphin did you test on?
4.0 765
Does using an older version of Dolphin solve your issue? If yes, which
versions of Dolphin used to work?
4.0 758
What are your PC specifications? (including, but not limited to: Operating
System, CPU and GPU)
windows 7 x64, 2500k , 560 ti
Are you using the 32 or the 64 bit version of Dolphin?
64
Is there any other relevant information? (e.g. logs, screenshots,
configuration files)
[Upload big files to a hosting service and post links here!]
[Do not attach files to this issue. Upload them to another site and
link here. Use imgur.com for images and pastie.org for logs.]
http://prntscr.com/2oh8vs
Updated by kostamarino about 10 years ago
uniform float4 cpnmtx[6] : register(c0);
uniform float4 cproj[4] : register(c6);
uniform float4 cmtrl[4] : register(c10);
uniform float4 clights[40] : register(c14);
uniform float4 ctexmtx[24] : register(c54);
uniform float4 ctrmtx[64] : register(c78);
uniform float4 cnmtx[32] : register(c142);
uniform float4 cpostmtx[64] : register(c174);
uniform float4 cDepth : register(c238);
struct VS_OUTPUT {
float4 pos : POSITION;
float4 colors_0 : COLOR0;
float4 colors_1 : COLOR1;
float3 tex0 : TEXCOORD0;
float4 clipPos : TEXCOORD1;
float4 Normal : TEXCOORD2;
};
VS_OUTPUT main(
float3 rawnorm0 : NORMAL0,
float4 color0 : COLOR0,
float2 tex0 : TEXCOORD0,
float4 fposmtx : BLENDINDICES,
float4 rawpos : POSITION) {
VS_OUTPUT o;
int posmtx = int(fposmtx * 255.0);
float4 pos = float4(dot(ctrmtx[posmtx], rawpos), dot(ctrmtx[posmtx+1], rawpos), dot(ctrmtx[posmtx+2], rawpos), 1);
int normidx = posmtx >= 32 ? (posmtx-32) : posmtx;
float3 N0 = cnmtx[normidx].xyz, N1 = cnmtx[normidx+1].xyz, N2 = cnmtx[normidx+2].xyz;
float3 _norm0 = normalize(float3(dot(N0, rawnorm0), dot(N1, rawnorm0), dot(N2, rawnorm0)));
o.pos = float4(dot(cproj[0], pos), dot(cproj[1], pos), dot(cproj[2], pos), dot(cproj[3], pos));
float4 mat, lacc;
float3 ldir, h;
float dist, dist2, attn;
{
mat = color0;
lacc = cmtrl[0];
mat.w = cmtrl[2].w;
lacc.w = 1.0;
o.colors_0 = mat * clamp(lacc, 0.0, 1.0);
}
o.colors_1 = o.colors_0;
float4 coord = float4(0.0, 0.0, 1.0, 1.0);
{
coord = float4(0.0, 0.0, 1.0, 1.0);
coord = float4(tex0.x, tex0.y, 1.0, 1.0);
o.tex0.xyz = float3(dot(coord, ctexmtx[0]), dot(coord, ctexmtx[1]), 1);
float4 P0 = cpostmtx[0];
float4 P1 = cpostmtx[1];
float4 P2 = cpostmtx[2];
o.tex0.xyz = float3(dot(P0.xyz, o.tex0.xyz) + P0.w, dot(P1.xyz, o.tex0.xyz) + P1.w, dot(P2.xyz, o.tex0.xyz) + P2.w);
}
o.clipPos = float4(pos.x,pos.y,o.pos.z,o.pos.w);
o.Normal = float4(_norm0.x,_norm0.y,_norm0.z,pos.z);
o.colors_0 = color0;
o.pos.z = cDepth.x * o.pos.w + o.pos.z * cDepth.y;
return o;
}
Updated by degasus about 10 years ago
Is it fixed on this build?
http://dl.dolphin-emu.org/wips/degasus-dolphin-master-4.0-765+-x64.7z