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

54 lines
1.1 KiB
C
Raw Normal View History

2017-12-09 20:49:56 +01:00
#pragma once
#include <dxvk_device.h>
#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;
}
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;
static bool ValidateAddressMode(
D3D11_TEXTURE_ADDRESS_MODE Mode);
static bool ValidateComparisonFunc(
D3D11_COMPARISON_FUNC Comparison);
2017-12-09 20:49:56 +01:00
};
}