tightly pack the pipeline hash

This commit is contained in:
Samuliak 2024-07-06 09:00:08 +02:00
parent 5d5df1931f
commit 559d194cc7
3 changed files with 19 additions and 15 deletions

View file

@ -385,8 +385,9 @@ void RendererMTL::drawVertices(PICA::PrimType primType, std::span<const PICA::Ve
pipelineHash.depthFmt = depthStencilRenderTarget->format;
}
pipelineHash.lightingEnabled = regs[0x008F] & 1;
pipelineHash.lightingNumLights = (regs[0x01C2] & 0x7) + 1;
pipelineHash.lightingNumLights = regs[0x01C2] & 0x7;
pipelineHash.lightingConfig1 = regs[0x01C4u] >> 16; // Last 16 bits are unused, so skip them
pipelineHash.alphaControl = regs[0x104];
// Blending and logic op
pipelineHash.blendEnabled = (regs[PICA::InternalRegs::ColourOperation] & (1 << 8)) != 0;