Skip to content

Commit d1adbb7

Browse files
committed
Fix blend flags properly
1 parent c66178b commit d1adbb7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pcsx2/GS/Renderers/Common/GSDevice.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ struct HWBlend
278278
typedef u8 BlendOp; /*GSDevice::BlendOp*/
279279
typedef u8 BlendFactor; /*GSDevice::BlendFactor*/
280280

281-
u16 flags;
281+
u32 flags; /*HWBlendFlags*/
282282
BlendOp op;
283283
BlendFactor src, dst;
284284
};
@@ -1082,7 +1082,7 @@ class GSDevice : public GSAlignedClass<32>
10821082
// Convert the GS blend equations to HW blend factors/ops
10831083
// Index is computed as ((((A * 3 + B) * 3) + C) * 3) + D. A, B, C, D taken from ALPHA register.
10841084
__ri static HWBlend GetBlend(u32 index) { return m_blendMap[index]; }
1085-
__ri static u16 GetBlendFlags(u32 index) { return m_blendMap[index].flags; }
1085+
__ri static auto GetBlendFlags(u32 index) { return m_blendMap[index].flags; }
10861086
};
10871087

10881088
template <>

pcsx2/GS/Renderers/HW/GSRendererHW.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5216,7 +5216,7 @@ void GSRendererHW::EmulateBlending(int rt_alpha_min, int rt_alpha_max, const boo
52165216

52175217
const u8 blend_index = static_cast<u8>(((m_conf.ps.blend_a * 3 + m_conf.ps.blend_b) * 3 + m_conf.ps.blend_c) * 3 + m_conf.ps.blend_d);
52185218
HWBlend blend = GSDevice::GetBlend(blend_index);
5219-
const int blend_flag = blend.flags;
5219+
const auto blend_flag = blend.flags;
52205220

52215221
// Re set alpha, it was modified, must be done after index calculation
52225222
if (blend_ad_alpha_masked)

0 commit comments

Comments
 (0)