don't mask ps inputs with 0x7F

This commit is contained in:
Samuliak 2024-11-11 17:33:12 +01:00
parent 4b58ac1a1e
commit a1b9164831
No known key found for this signature in database

View File

@ -4308,20 +4308,6 @@ void LatteDecompiler_emitMSLShader(LatteDecompilerShaderContext* shaderContext,
continue; continue;
} }
// TODO: is the if statement even needed?
if (usesGeometryShader)
{
// import from geometry shader
if (shaderContext->typeTracker.defaultDataType == LATTE_DECOMPILER_DTYPE_SIGNED_INT)
src->addFmt("{} = bitCast<int>(in.passParameterSem{});" _CRLF, _getRegisterVarName(shaderContext, gprIndex), psInputSemanticId & 0x7F);
else if (shaderContext->typeTracker.defaultDataType == LATTE_DECOMPILER_DTYPE_FLOAT)
src->addFmt("{} = in.passParameterSem{};" _CRLF, _getRegisterVarName(shaderContext, gprIndex), psInputSemanticId & 0x7F);
else
cemu_assert_unimplemented();
}
else
{
// import from vertex shader
if (shaderContext->typeTracker.defaultDataType == LATTE_DECOMPILER_DTYPE_SIGNED_INT) if (shaderContext->typeTracker.defaultDataType == LATTE_DECOMPILER_DTYPE_SIGNED_INT)
src->addFmt("{} = bitCast<int>(in.passParameterSem{});" _CRLF, _getRegisterVarName(shaderContext, gprIndex), psInputSemanticId); src->addFmt("{} = bitCast<int>(in.passParameterSem{});" _CRLF, _getRegisterVarName(shaderContext, gprIndex), psInputSemanticId);
else if (shaderContext->typeTracker.defaultDataType == LATTE_DECOMPILER_DTYPE_FLOAT) else if (shaderContext->typeTracker.defaultDataType == LATTE_DECOMPILER_DTYPE_FLOAT)
@ -4329,7 +4315,6 @@ void LatteDecompiler_emitMSLShader(LatteDecompilerShaderContext* shaderContext,
else else
cemu_assert_unimplemented(); cemu_assert_unimplemented();
} }
}
// front facing attribute // front facing attribute
if (frontFace_enabled) if (frontFace_enabled)
{ {