optimize rasterization kill

This commit is contained in:
Samuliak 2024-09-07 11:05:13 +02:00
parent 3dc233fb56
commit cf5602466c

View File

@ -206,14 +206,15 @@ void SetFragmentState(T* desc, CachedFBOMtl* lastUsedFBO, CachedFBOMtl* activeFB
if (cullFront && cullBack)
rasterizationEnabled = false;
desc->setRasterizationEnabled(rasterizationEnabled);
if (rasterizationEnabled)
if (!rasterizationEnabled)
{
auto pixelShaderMtl = static_cast<RendererShaderMtl*>(pixelShader->shader);
desc->setFragmentFunction(pixelShaderMtl->GetFunction());
desc->setRasterizationEnabled(false);
return;
}
auto pixelShaderMtl = static_cast<RendererShaderMtl*>(pixelShader->shader);
desc->setFragmentFunction(pixelShaderMtl->GetFunction());
// Color attachments
const Latte::LATTE_CB_COLOR_CONTROL& colorControlReg = lcr.CB_COLOR_CONTROL;
uint32 blendEnableMask = colorControlReg.get_BLEND_MASK();