mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-07 23:41:18 +12:00
check for invalid color formats
This commit is contained in:
parent
cd72ad80d2
commit
4251f3fe55
3 changed files with 21 additions and 11 deletions
|
@ -3215,11 +3215,13 @@ static void _emitExportCode(LatteDecompilerShaderContext* shaderContext, LatteDe
|
|||
src->add(") == false) discard_fragment();" _CRLF);
|
||||
}
|
||||
// pixel color output
|
||||
//src->addFmt("#ifdef {}" _CRLF, GetColorAttachmentTypeStr(pixelColorOutputIndex));
|
||||
src->addFmt("out.passPixelColor{} = as_type<{}>(", pixelColorOutputIndex, GetColorBufferDataTypeStr(pixelColorOutputIndex, *shaderContext->contextRegistersNew)/*, GetColorAttachmentTypeStr(pixelColorOutputIndex)*/);
|
||||
_emitExportGPRReadCode(shaderContext, cfInstruction, LATTE_DECOMPILER_DTYPE_FLOAT, i);
|
||||
src->add(");" _CRLF);
|
||||
//src->add("#endif" _CRLF);
|
||||
auto dataType = GetColorBufferDataType(pixelColorOutputIndex, *shaderContext->contextRegistersNew);
|
||||
if (dataType != MetalDataType::NONE)
|
||||
{
|
||||
src->addFmt("out.passPixelColor{} = as_type<{}>(", pixelColorOutputIndex, GetDataTypeStr(dataType));
|
||||
_emitExportGPRReadCode(shaderContext, cfInstruction, LATTE_DECOMPILER_DTYPE_FLOAT, i);
|
||||
src->add(");" _CRLF);
|
||||
}
|
||||
|
||||
if( cfInstruction->exportArrayBase+i >= 8 )
|
||||
cemu_assert_unimplemented();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue