mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
53 lines
1.2 KiB
C
53 lines
1.2 KiB
C
|
#pragma once
|
||
|
|
||
|
#include <dxvk_device.h>
|
||
|
|
||
|
#include "d3d11_device_child.h"
|
||
|
#include "d3d11_util.h"
|
||
|
|
||
|
namespace dxvk {
|
||
|
|
||
|
class D3D11Device;
|
||
|
|
||
|
class D3D11DepthStencilState : public D3D11DeviceChild<ID3D11DepthStencilState> {
|
||
|
|
||
|
public:
|
||
|
|
||
|
using DescType = D3D11_DEPTH_STENCIL_DESC;
|
||
|
|
||
|
D3D11DepthStencilState(
|
||
|
D3D11Device* device,
|
||
|
const D3D11_DEPTH_STENCIL_DESC& desc);
|
||
|
~D3D11DepthStencilState();
|
||
|
|
||
|
HRESULT QueryInterface(
|
||
|
REFIID riid,
|
||
|
void** ppvObject) final;
|
||
|
|
||
|
void GetDevice(
|
||
|
ID3D11Device **ppDevice) final;
|
||
|
|
||
|
void GetDesc(
|
||
|
D3D11_DEPTH_STENCIL_DESC* pDesc) final;
|
||
|
|
||
|
const DxvkDepthStencilState& GetDXVKDepthStencilState() const {
|
||
|
return m_state;
|
||
|
}
|
||
|
|
||
|
private:
|
||
|
|
||
|
D3D11Device* const m_device;
|
||
|
D3D11_DEPTH_STENCIL_DESC m_desc;
|
||
|
DxvkDepthStencilState m_state;
|
||
|
|
||
|
VkStencilOpState DecodeStencilOpState(
|
||
|
const D3D11_DEPTH_STENCILOP_DESC& stencilDesc,
|
||
|
const D3D11_DEPTH_STENCIL_DESC& desc) const;
|
||
|
|
||
|
VkStencilOp DecodeStencilOp(
|
||
|
D3D11_STENCIL_OP op) const;
|
||
|
|
||
|
};
|
||
|
|
||
|
}
|