mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 09:13:39 +01:00
Move the computation of simulate-logic shader type earlier
This commit is contained in:
1 parent
87b14fe1c2
commit
d35749bfc8
3 files changed
+4
-1
No files matched your search
@@ -1063,6 +1063,8 @@ void ConvertBlendState(GenericBlendState &blendState, bool forceReplaceBlend) {
|
||||
}
|
||||
blendState.replaceBlend = replaceBlend;
|
||||
|
||||
blendState.simulateLogicOpType = SimulateLogicOpShaderTypeIfNeeded();
|
||||
|
||||
ReplaceAlphaType replaceAlphaWithStencil = ReplaceAlphaWithStencil(replaceBlend);
|
||||
blendState.replaceAlphaWithStencil = replaceAlphaWithStencil;
|
||||
|
||||
|
||||
@@ -146,6 +146,7 @@ struct GenericBlendState {
|
||||
// Shader generation state
|
||||
ReplaceAlphaType replaceAlphaWithStencil;
|
||||
ReplaceBlendType replaceBlend;
|
||||
SimulateLogicOpType simulateLogicOpType;
|
||||
|
||||
// Resulting hardware blend state
|
||||
bool blendEnabled;
|
||||
|
||||
@@ -267,7 +267,7 @@ void ComputeFragmentShaderID(FShaderID *id_out, const ComputedPipelineState &pip
|
||||
|
||||
ReplaceBlendType replaceBlend = pipelineState.blendState.replaceBlend;
|
||||
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.
|
||||
// Note that checking this means that we must dirty the fragment shader ID whenever textureFullAlpha changes.
|
||||
|
||||
Reference in new issue
Block a user