diff options
| author | Mai M <mathew1800@gmail.com> | 2021-09-08 03:59:45 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-08 03:59:45 -0400 |
| commit | 5538e90ebf52645bf7389ad6b3e487b6d9e1b82b (patch) | |
| tree | 8745fba2ca0705b0abb12750e0b8e29c5e9de2dd /Source/Core/VideoCommon/UberShaderVertex.cpp | |
| parent | 282fda1530545ad49c11a6093476be44785b4d14 (diff) | |
| parent | 52c82733f6ba606de5d877c25b95828b73e668bd (diff) | |
Merge pull request #10090 from Pokechu22/d3d-isnan-replacement
Use custom isnan implementation to avoid HLSL optimizer issues
Diffstat (limited to 'Source/Core/VideoCommon/UberShaderVertex.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/UberShaderVertex.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/UberShaderVertex.cpp b/Source/Core/VideoCommon/UberShaderVertex.cpp index 5b02b1f989..70b434b786 100644 --- a/Source/Core/VideoCommon/UberShaderVertex.cpp +++ b/Source/Core/VideoCommon/UberShaderVertex.cpp @@ -50,6 +50,7 @@ ShaderCode GenVertexShader(APIType api_type, const ShaderHostConfig& host_config out.Write("}};\n\n"); WriteUberShaderCommonHeader(out, api_type, host_config); + WriteIsNanHeader(out, api_type); WriteLightingFunction(out); if (api_type == APIType::OpenGL || api_type == APIType::Vulkan) @@ -438,9 +439,9 @@ static void GenVertexShaderTexGens(APIType api_type, u32 num_texgen, ShaderCode& // Convert NaNs to 1 - needed to fix eyelids in Shadow the Hedgehog during cutscenes // See https://bugs.dolphin-emu.org/issues/11458 out.Write(" // Convert NaN to 1\n"); - out.Write(" if (isnan(coord.x)) coord.x = 1.0;\n"); - out.Write(" if (isnan(coord.y)) coord.y = 1.0;\n"); - out.Write(" if (isnan(coord.z)) coord.z = 1.0;\n"); + out.Write(" if (dolphin_isnan(coord.x)) coord.x = 1.0;\n"); + out.Write(" if (dolphin_isnan(coord.y)) coord.y = 1.0;\n"); + out.Write(" if (dolphin_isnan(coord.z)) coord.z = 1.0;\n"); out.Write(" // first transformation\n"); out.Write(" uint texgentype = {};\n", BitfieldExtract<&TexMtxInfo::texgentype>("texMtxInfo")); |
