Remove "has bone" specialization constant.

This commit is contained in:
Skyth 2024-11-26 23:23:41 +03:00
parent 31513fbfbb
commit bd98728944
2 changed files with 8 additions and 17 deletions

View file

@ -2,11 +2,10 @@
#define SHADER_COMMON_H_INCLUDED #define SHADER_COMMON_H_INCLUDED
#define SPEC_CONSTANT_R11G11B10_NORMAL (1 << 0) #define SPEC_CONSTANT_R11G11B10_NORMAL (1 << 0)
#define SPEC_CONSTANT_HAS_BONE (1 << 1) #define SPEC_CONSTANT_BICUBIC_GI_FILTER (1 << 1)
#define SPEC_CONSTANT_BICUBIC_GI_FILTER (1 << 2) #define SPEC_CONSTANT_ALPHA_TEST (1 << 2)
#define SPEC_CONSTANT_ALPHA_TEST (1 << 3) #define SPEC_CONSTANT_ALPHA_TO_COVERAGE (1 << 3)
#define SPEC_CONSTANT_ALPHA_TO_COVERAGE (1 << 4) #define SPEC_CONSTANT_REVERSE_Z (1 << 4)
#define SPEC_CONSTANT_REVERSE_Z (1 << 5)
#if !defined(__cplusplus) || defined(__INTELLISENSE__) #if !defined(__cplusplus) || defined(__INTELLISENSE__)

View file

@ -1652,13 +1652,6 @@ void ShaderRecompiler::recompile(const uint8_t* shaderData, const std::string_vi
println("if ({}p0)", cfInstr.condJmp.condition ^ simpleControlFlow ? "" : "!"); println("if ({}p0)", cfInstr.condJmp.condition ^ simpleControlFlow ? "" : "!");
} }
else else
{
if (!isPixelShader && cfInstr.condJmp.boolAddress == 0) // mrgHasBone
{
specConstantsMask |= SPEC_CONSTANT_HAS_BONE;
println("if ((g_SpecConstants() & SPEC_CONSTANT_HAS_BONE) {}= 0)", cfInstr.condJmp.condition ^ simpleControlFlow ? "!" : "=");
}
else
{ {
auto findResult = boolConstants.find(cfInstr.condJmp.boolAddress); auto findResult = boolConstants.find(cfInstr.condJmp.boolAddress);
if (findResult != boolConstants.end()) if (findResult != boolConstants.end())
@ -1666,7 +1659,6 @@ void ShaderRecompiler::recompile(const uint8_t* shaderData, const std::string_vi
else else
println("if (b{} {}= 0)", uint32_t(cfInstr.condJmp.boolAddress), cfInstr.condJmp.condition ^ simpleControlFlow ? "!" : "="); println("if (b{} {}= 0)", uint32_t(cfInstr.condJmp.boolAddress), cfInstr.condJmp.condition ^ simpleControlFlow ? "!" : "=");
} }
}
if (simpleControlFlow) if (simpleControlFlow)
{ {