mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-13 11:39:09 +00:00
Renderer: Change SetBlendState to accept a BlendingState
This decouples the state generation (from the emulated GPU) from the management of internal backend state.
This commit is contained in:
parent
22b8cbae35
commit
3dd675e613
8 changed files with 14 additions and 18 deletions
|
@ -1264,11 +1264,8 @@ void Renderer::ReinterpretPixelData(unsigned int convtype)
|
|||
}
|
||||
}
|
||||
|
||||
void Renderer::SetBlendMode(bool forceUpdate)
|
||||
void Renderer::SetBlendingState(const BlendingState& state)
|
||||
{
|
||||
BlendingState state;
|
||||
state.Generate(bpmem);
|
||||
|
||||
bool useDualSource =
|
||||
state.usedualsrc && g_ActiveConfig.backend_info.bSupportsDualSourceBlend &&
|
||||
(!DriverDetails::HasBug(DriverDetails::BUG_BROKEN_DUAL_SOURCE_BLENDING) || state.dstalpha);
|
||||
|
@ -1791,7 +1788,7 @@ void Renderer::RestoreAPIState()
|
|||
SetGenerationMode();
|
||||
BPFunctions::SetScissor();
|
||||
SetDepthMode();
|
||||
SetBlendMode(true);
|
||||
BPFunctions::SetBlendMode();
|
||||
SetViewport();
|
||||
|
||||
ProgramShaderCache::BindLastVertexFormat();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue