D3D11: Use blending state from VideoCommon

This commit is contained in:
Stenzek
2017-04-30 00:54:22 +10:00
parent c90b0bf532
commit 5c9bc8b79c
4 changed files with 37 additions and 230 deletions

View File

@ -12,7 +12,7 @@
#include "Common/BitField.h"
#include "Common/CommonTypes.h"
#include "VideoBackends/D3D/D3DBase.h"
#include "VideoCommon/BPMemory.h"
#include "VideoCommon/RenderState.h"
struct ID3D11BlendState;
struct ID3D11DepthStencilState;
@ -27,18 +27,6 @@ union RasterizerState
u32 packed;
};
union BlendState
{
BitField<0, 1, u32> blend_enable;
BitField<1, 3, D3D11_BLEND_OP> blend_op;
BitField<4, 4, u32> write_mask;
BitField<8, 5, D3D11_BLEND> src_blend;
BitField<13, 5, D3D11_BLEND> dst_blend;
BitField<18, 1, u32> use_dst_alpha;
u32 packed;
};
union SamplerState
{
BitField<0, 3, u64> min_filter;
@ -59,7 +47,7 @@ public:
// Get existing or create new render state.
// Returned objects is owned by the cache and does not need to be released.
ID3D11SamplerState* Get(SamplerState state);
ID3D11BlendState* Get(BlendState state);
ID3D11BlendState* Get(BlendingState state);
ID3D11RasterizerState* Get(RasterizerState state);
ID3D11DepthStencilState* Get(ZMode state);