From b3a0b6def442561e768eeeceaea356b0294d5401 Mon Sep 17 00:00:00 2001 From: Justin Chadwick Date: Wed, 8 Jul 2015 16:06:11 -0400 Subject: Disables assert messages that seem to be invalid. --- Source/Core/VideoCommon/VertexShaderGen.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoCommon/VertexShaderGen.cpp') diff --git a/Source/Core/VideoCommon/VertexShaderGen.cpp b/Source/Core/VideoCommon/VertexShaderGen.cpp index 97ac15e887..b495e62a93 100644 --- a/Source/Core/VideoCommon/VertexShaderGen.cpp +++ b/Source/Core/VideoCommon/VertexShaderGen.cpp @@ -241,7 +241,8 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ switch (texinfo.sourcerow) { case XF_SRCGEOM_INROW: - _assert_(texinfo.inputform == XF_TEXINPUT_ABC1); + // The following assert was triggered in Super Smash Bros. Project M 3.6. + //_assert_(texinfo.inputform == XF_TEXINPUT_ABC1); out.Write("coord = rawpos;\n"); // pos.w is 1 break; case XF_SRCNORMAL_INROW: @@ -291,7 +292,8 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ } else { - _assert_(0); // should have normals + // The following assert was triggered in House of the Dead Overkill and Star Wars Rogue Squadron 2 + //_assert_(0); // should have normals uid_data->texMtxInfo[i].embosssourceshift = xfmem.texMtxInfo[i].embosssourceshift; out.Write("o.tex%d.xyz = o.tex%d.xyz;\n", i, texinfo.embosssourceshift); } -- cgit v1.2.3 From 961873827853891aba6bc43243c01bf70e2c1f4b Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Fri, 4 Sep 2015 23:45:35 -0500 Subject: Remove all of our workarounds for Qualcomm devices we don't support anymore. --- Source/Core/VideoCommon/VertexShaderGen.cpp | 43 ++++------------------------- 1 file changed, 5 insertions(+), 38 deletions(-) (limited to 'Source/Core/VideoCommon/VertexShaderGen.cpp') diff --git a/Source/Core/VideoCommon/VertexShaderGen.cpp b/Source/Core/VideoCommon/VertexShaderGen.cpp index b495e62a93..6fe58bd422 100644 --- a/Source/Core/VideoCommon/VertexShaderGen.cpp +++ b/Source/Core/VideoCommon/VertexShaderGen.cpp @@ -32,29 +32,6 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ _assert_(bpmem.genMode.numtexgens == xfmem.numTexGen.numTexGens); _assert_(bpmem.genMode.numcolchans == xfmem.numChan.numColorChans); - if (DriverDetails::HasBug(DriverDetails::BUG_BROKENIVECSHIFTS)) - { - // Add functions to do shifts on scalars and ivecs. - // This is included in the vertex shader for lighting shader generation. - out.Write("int ilshift(int a, int b) { return a << b; }\n" - "int irshift(int a, int b) { return a >> b; }\n" - - "int2 ilshift(int2 a, int2 b) { return int2(a.x << b.x, a.y << b.y); }\n" - "int2 ilshift(int2 a, int b) { return int2(a.x << b, a.y << b); }\n" - "int2 irshift(int2 a, int2 b) { return int2(a.x >> b.x, a.y >> b.y); }\n" - "int2 irshift(int2 a, int b) { return int2(a.x >> b, a.y >> b); }\n" - - "int3 ilshift(int3 a, int3 b) { return int3(a.x << b.x, a.y << b.y, a.z << b.z); }\n" - "int3 ilshift(int3 a, int b) { return int3(a.x << b, a.y << b, a.z << b); }\n" - "int3 irshift(int3 a, int3 b) { return int3(a.x >> b.x, a.y >> b.y, a.z >> b.z); }\n" - "int3 irshift(int3 a, int b) { return int3(a.x >> b, a.y >> b, a.z >> b); }\n" - - "int4 ilshift(int4 a, int4 b) { return int4(a.x << b.x, a.y << b.y, a.z << b.z, a.w << b.w); }\n" - "int4 ilshift(int4 a, int b) { return int4(a.x << b, a.y << b, a.z << b, a.w << b); }\n" - "int4 irshift(int4 a, int4 b) { return int4(a.x >> b.x, a.y >> b.y, a.z >> b.z, a.w >> b.w); }\n" - "int4 irshift(int4 a, int b) { return int4(a.x >> b, a.y >> b, a.z >> b, a.w >> b); }\n\n"); - } - out.Write("%s", s_lighting_struct); // uniforms @@ -156,22 +133,12 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ // transforms if (components & VB_HAS_POSMTXIDX) { - if (is_writing_shadercode && (DriverDetails::HasBug(DriverDetails::BUG_NODYNUBOACCESS) && !DriverDetails::HasBug(DriverDetails::BUG_ANNIHILATEDUBOS))) - { - // This'll cause issues, but it can't be helped - out.Write("float4 pos = float4(dot(" I_TRANSFORMMATRICES"[0], rawpos), dot(" I_TRANSFORMMATRICES"[1], rawpos), dot(" I_TRANSFORMMATRICES"[2], rawpos), 1);\n"); - if (components & VB_HAS_NRMALL) - out.Write("float3 N0 = " I_NORMALMATRICES"[0].xyz, N1 = " I_NORMALMATRICES"[1].xyz, N2 = " I_NORMALMATRICES"[2].xyz;\n"); - } - else - { - out.Write("float4 pos = float4(dot(" I_TRANSFORMMATRICES"[posmtx], rawpos), dot(" I_TRANSFORMMATRICES"[posmtx+1], rawpos), dot(" I_TRANSFORMMATRICES"[posmtx+2], rawpos), 1);\n"); + out.Write("float4 pos = float4(dot(" I_TRANSFORMMATRICES"[posmtx], rawpos), dot(" I_TRANSFORMMATRICES"[posmtx+1], rawpos), dot(" I_TRANSFORMMATRICES"[posmtx+2], rawpos), 1);\n"); - if (components & VB_HAS_NRMALL) - { - out.Write("int normidx = posmtx >= 32 ? (posmtx-32) : posmtx;\n"); - out.Write("float3 N0 = " I_NORMALMATRICES"[normidx].xyz, N1 = " I_NORMALMATRICES"[normidx+1].xyz, N2 = " I_NORMALMATRICES"[normidx+2].xyz;\n"); - } + if (components & VB_HAS_NRMALL) + { + out.Write("int normidx = posmtx >= 32 ? (posmtx-32) : posmtx;\n"); + out.Write("float3 N0 = " I_NORMALMATRICES"[normidx].xyz, N1 = " I_NORMALMATRICES"[normidx+1].xyz, N2 = " I_NORMALMATRICES"[normidx+2].xyz;\n"); } if (components & VB_HAS_NRM0) -- cgit v1.2.3 From 1c0366993a582e76333ed18421e92424261901f2 Mon Sep 17 00:00:00 2001 From: degasus Date: Sun, 6 Sep 2015 13:58:18 +0200 Subject: VideoBackends: Reimplement SSAA, now for D3D + OGL --- Source/Core/VideoCommon/VertexShaderGen.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Source/Core/VideoCommon/VertexShaderGen.cpp') diff --git a/Source/Core/VideoCommon/VertexShaderGen.cpp b/Source/Core/VideoCommon/VertexShaderGen.cpp index 6fe58bd422..63f80488e4 100644 --- a/Source/Core/VideoCommon/VertexShaderGen.cpp +++ b/Source/Core/VideoCommon/VertexShaderGen.cpp @@ -77,7 +77,7 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ if (g_ActiveConfig.backend_info.bSupportsGeometryShaders) { out.Write("out VertexData {\n"); - GenerateVSOutputMembers(out, api_type, g_ActiveConfig.backend_info.bSupportsBindingLayout ? "centroid" : "centroid out"); + GenerateVSOutputMembers(out, api_type, GetInterpolationQualifier(api_type, false, true)); out.Write("} vs;\n"); } else @@ -87,17 +87,17 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ { if (i < xfmem.numTexGen.numTexGens) { - out.Write("centroid out float3 uv%d;\n", i); + out.Write("%s out float3 uv%d;\n", GetInterpolationQualifier(api_type), i); } } - out.Write("centroid out float4 clipPos;\n"); + out.Write("%s out float4 clipPos;\n", GetInterpolationQualifier(api_type)); if (g_ActiveConfig.bEnablePixelLighting) { - out.Write("centroid out float3 Normal;\n"); - out.Write("centroid out float3 WorldPos;\n"); + out.Write("%s out float3 Normal;\n", GetInterpolationQualifier(api_type)); + out.Write("%s out float3 WorldPos;\n", GetInterpolationQualifier(api_type)); } - out.Write("centroid out float4 colors_0;\n"); - out.Write("centroid out float4 colors_1;\n"); + out.Write("%s out float4 colors_0;\n", GetInterpolationQualifier(api_type)); + out.Write("%s out float4 colors_1;\n", GetInterpolationQualifier(api_type)); } out.Write("void main()\n{\n"); -- cgit v1.2.3