mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Move the computation of simulate-logic shader type earlier
This commit is contained in:
parent
87b14fe1c2
commit
d35749bfc8
@ -1063,6 +1063,8 @@ void ConvertBlendState(GenericBlendState &blendState, bool forceReplaceBlend) {
|
|||||||
}
|
}
|
||||||
blendState.replaceBlend = replaceBlend;
|
blendState.replaceBlend = replaceBlend;
|
||||||
|
|
||||||
|
blendState.simulateLogicOpType = SimulateLogicOpShaderTypeIfNeeded();
|
||||||
|
|
||||||
ReplaceAlphaType replaceAlphaWithStencil = ReplaceAlphaWithStencil(replaceBlend);
|
ReplaceAlphaType replaceAlphaWithStencil = ReplaceAlphaWithStencil(replaceBlend);
|
||||||
blendState.replaceAlphaWithStencil = replaceAlphaWithStencil;
|
blendState.replaceAlphaWithStencil = replaceAlphaWithStencil;
|
||||||
|
|
||||||
|
@ -146,6 +146,7 @@ struct GenericBlendState {
|
|||||||
// Shader generation state
|
// Shader generation state
|
||||||
ReplaceAlphaType replaceAlphaWithStencil;
|
ReplaceAlphaType replaceAlphaWithStencil;
|
||||||
ReplaceBlendType replaceBlend;
|
ReplaceBlendType replaceBlend;
|
||||||
|
SimulateLogicOpType simulateLogicOpType;
|
||||||
|
|
||||||
// Resulting hardware blend state
|
// Resulting hardware blend state
|
||||||
bool blendEnabled;
|
bool blendEnabled;
|
||||||
|
@ -267,7 +267,7 @@ void ComputeFragmentShaderID(FShaderID *id_out, const ComputedPipelineState &pip
|
|||||||
|
|
||||||
ReplaceBlendType replaceBlend = pipelineState.blendState.replaceBlend;
|
ReplaceBlendType replaceBlend = pipelineState.blendState.replaceBlend;
|
||||||
ReplaceAlphaType stencilToAlpha = pipelineState.blendState.replaceAlphaWithStencil;
|
ReplaceAlphaType stencilToAlpha = pipelineState.blendState.replaceAlphaWithStencil;
|
||||||
SimulateLogicOpType simulateLogicOpType = SimulateLogicOpShaderTypeIfNeeded();
|
SimulateLogicOpType simulateLogicOpType = pipelineState.blendState.simulateLogicOpType;
|
||||||
|
|
||||||
// All texfuncs except replace are the same for RGB as for RGBA with full alpha.
|
// All texfuncs except replace are the same for RGB as for RGBA with full alpha.
|
||||||
// Note that checking this means that we must dirty the fragment shader ID whenever textureFullAlpha changes.
|
// Note that checking this means that we must dirty the fragment shader ID whenever textureFullAlpha changes.
|
||||||
|
Loading…
Reference in New Issue
Block a user