Skip to content

Commit

Permalink
PixelShaderGen: Add logic ops to pixel_shader_uid_data
Browse files Browse the repository at this point in the history
  • Loading branch information
OatmealDome committed Dec 7, 2021
1 parent 04ec02c commit c12b9b0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Core/VideoCommon/GXPipelineTypes.h
Expand Up @@ -19,7 +19,7 @@ namespace VideoCommon
// As pipelines encompass both shader UIDs and render states, changes to either of these should
// also increment the pipeline UID version. Incrementing the UID version will cause all UID
// caches to be invalidated.
constexpr u32 GX_PIPELINE_UID_VERSION = 3; // Last changed in PR 9532
constexpr u32 GX_PIPELINE_UID_VERSION = 4; // Last changed in PR 10215

struct GXPipelineUid
{
Expand Down
3 changes: 3 additions & 0 deletions Source/Core/VideoCommon/PixelShaderGen.cpp
Expand Up @@ -331,6 +331,9 @@ PixelShaderUid GetPixelShaderUid()
uid_data->blend_subtract_alpha = state.subtractAlpha;
}

uid_data->logic_op_enable = state.logicopenable;
uid_data->logic_op_mode = u32(state.logicmode.Value());

return out;
}

Expand Down
2 changes: 2 additions & 0 deletions Source/Core/VideoCommon/PixelShaderGen.h
Expand Up @@ -59,6 +59,8 @@ struct pixel_shader_uid_data
DstBlendFactor blend_dst_factor_alpha : 3; // Only used with shader_framebuffer_fetch blend
u32 blend_subtract : 1; // Only used with shader_framebuffer_fetch blend
u32 blend_subtract_alpha : 1; // Only used with shader_framebuffer_fetch blend
u32 logic_op_enable : 1; // Only used with shader_framebuffer_fetch logic ops
u32 logic_op_mode : 4; // Only used with shader_framebuffer_fetch logic ops

u32 texMtxInfo_n_projection : 8; // 8x1 bit
u32 tevindref_bi0 : 3;
Expand Down

0 comments on commit c12b9b0

Please sign in to comment.