1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-05 01:24:14 +01:00
dxvk/src/d3d11/d3d11_sampler.h

61 lines
1.3 KiB
C
Raw Normal View History

2017-12-09 20:49:56 +01:00
#pragma once
2018-08-11 20:42:28 +02:00
#include "../dxvk/dxvk_device.h"
#include "../d3d10/d3d10_sampler.h"
2017-12-09 20:49:56 +01:00
#include "d3d11_device_child.h"
namespace dxvk {
class D3D11Device;
class D3D11SamplerState : public D3D11DeviceChild<ID3D11SamplerState> {
public:
using DescType = D3D11_SAMPLER_DESC;
2017-12-09 20:49:56 +01:00
D3D11SamplerState(
D3D11Device* device,
const D3D11_SAMPLER_DESC& desc);
2017-12-09 20:49:56 +01:00
~D3D11SamplerState();
2017-12-12 12:50:52 +01:00
HRESULT STDMETHODCALLTYPE QueryInterface(
2017-12-09 20:49:56 +01:00
REFIID riid,
void** ppvObject) final;
2017-12-12 12:50:52 +01:00
void STDMETHODCALLTYPE GetDevice(
2017-12-09 20:49:56 +01:00
ID3D11Device **ppDevice) final;
2017-12-12 12:50:52 +01:00
void STDMETHODCALLTYPE GetDesc(
2017-12-09 20:49:56 +01:00
D3D11_SAMPLER_DESC* pDesc) final;
Rc<DxvkSampler> GetDXVKSampler() const {
return m_sampler;
}
2018-08-11 20:42:28 +02:00
D3D10SamplerState* GetD3D10Iface() {
return &m_d3d10;
}
2017-12-09 20:49:56 +01:00
static HRESULT NormalizeDesc(
D3D11_SAMPLER_DESC* pDesc);
2017-12-09 20:49:56 +01:00
private:
D3D11Device* const m_device;
2017-12-09 20:49:56 +01:00
D3D11_SAMPLER_DESC m_desc;
Rc<DxvkSampler> m_sampler;
2018-08-11 20:42:28 +02:00
D3D10SamplerState m_d3d10;
static bool ValidateAddressMode(
D3D11_TEXTURE_ADDRESS_MODE Mode);
static bool ValidateComparisonFunc(
D3D11_COMPARISON_FUNC Comparison);
2017-12-09 20:49:56 +01:00
};
}