summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/RenderState.h
blob: cadd83e1a37e08a391dea131e7a4d6f757fee66d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright 2016 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.

#pragma once

#include "Common/BitField.h"

#include "VideoCommon/BPMemory.h"
#include "VideoCommon/BPStructs.h"

union BlendingState
{
  void Generate(const BPMemory& bp);

  BitField<0, 1, u32> blendenable;
  BitField<1, 1, u32> logicopenable;
  BitField<2, 1, u32> dstalpha;
  BitField<3, 1, u32> dither;
  BitField<4, 1, u32> colorupdate;
  BitField<5, 1, u32> alphaupdate;
  BitField<6, 1, u32> subtract;
  BitField<7, 1, u32> subtractAlpha;
  BitField<8, 3, BlendMode::BlendFactor> dstfactor;
  BitField<11, 3, BlendMode::BlendFactor> srcfactor;
  BitField<14, 3, BlendMode::BlendFactor> dstfactoralpha;
  BitField<17, 3, BlendMode::BlendFactor> srcfactoralpha;
  BitField<20, 4, BlendMode::LogicOp> logicmode;

  u32 hex;
};