2017-12-09 20:49:56 +01:00
|
|
|
#include "d3d11_device.h"
|
|
|
|
#include "d3d11_sampler.h"
|
|
|
|
|
|
|
|
namespace dxvk {
|
|
|
|
|
|
|
|
D3D11SamplerState::D3D11SamplerState(
|
|
|
|
D3D11Device* device,
|
|
|
|
const D3D11_SAMPLER_DESC& desc,
|
|
|
|
const Rc<DxvkSampler>& sampler)
|
|
|
|
: m_device(device),
|
|
|
|
m_desc(desc),
|
|
|
|
m_sampler(sampler) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
D3D11SamplerState::~D3D11SamplerState() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
HRESULT STDMETHODCALLTYPE D3D11SamplerState::QueryInterface(REFIID riid, void** ppvObject) {
|
2017-12-09 20:49:56 +01:00
|
|
|
COM_QUERY_IFACE(riid, ppvObject, IUnknown);
|
|
|
|
COM_QUERY_IFACE(riid, ppvObject, ID3D11DeviceChild);
|
|
|
|
COM_QUERY_IFACE(riid, ppvObject, ID3D11SamplerState);
|
|
|
|
|
|
|
|
Logger::warn("D3D11SamplerState::QueryInterface: Unknown interface query");
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE D3D11SamplerState::GetDevice(ID3D11Device** ppDevice) {
|
2017-12-09 20:49:56 +01:00
|
|
|
*ppDevice = m_device.ref();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE D3D11SamplerState::GetDesc(D3D11_SAMPLER_DESC* pDesc) {
|
2017-12-09 20:49:56 +01:00
|
|
|
*pDesc = m_desc;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|