mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-13 19:29:14 +01:00
[d3d11] D3D11Texture2D stub
This commit is contained in:
parent
0cdc13d785
commit
0c3a68c519
44
src/d3d11/d3d11_texture.cpp
Normal file
44
src/d3d11/d3d11_texture.cpp
Normal file
@ -0,0 +1,44 @@
|
||||
#include "d3d11_device.h"
|
||||
#include "d3d11_texture.h"
|
||||
|
||||
namespace dxvk {
|
||||
|
||||
D3D11Texture2D::D3D11Texture2D(
|
||||
D3D11Device* device,
|
||||
const D3D11_TEXTURE2D_DESC& desc)
|
||||
: m_device(device), m_desc(desc) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
D3D11Texture2D::~D3D11Texture2D() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Texture2D::QueryInterface(REFIID riid, void** ppvObject) {
|
||||
COM_QUERY_IFACE(riid, ppvObject, IUnknown);
|
||||
COM_QUERY_IFACE(riid, ppvObject, ID3D11DeviceChild);
|
||||
COM_QUERY_IFACE(riid, ppvObject, ID3D11Resource);
|
||||
COM_QUERY_IFACE(riid, ppvObject, ID3D11Texture2D);
|
||||
|
||||
Logger::warn("D3D11Texture2D::QueryInterface: Unknown interface query");
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
||||
void D3D11Texture2D::GetDevice(ID3D11Device** ppDevice) {
|
||||
*ppDevice = m_device.ref();
|
||||
}
|
||||
|
||||
|
||||
void D3D11Texture2D::GetType(D3D11_RESOURCE_DIMENSION *pResourceDimension) {
|
||||
*pResourceDimension = D3D11_RESOURCE_DIMENSION_TEXTURE2D;
|
||||
}
|
||||
|
||||
|
||||
void D3D11Texture2D::GetDesc(D3D11_TEXTURE2D_DESC *pDesc) {
|
||||
*pDesc = m_desc;
|
||||
}
|
||||
|
||||
}
|
42
src/d3d11/d3d11_texture.h
Normal file
42
src/d3d11/d3d11_texture.h
Normal file
@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
|
||||
#include <dxvk_device.h>
|
||||
|
||||
#include "d3d11_resource.h"
|
||||
|
||||
namespace dxvk {
|
||||
|
||||
class D3D11Device;
|
||||
|
||||
class D3D11Texture2D : public D3D11Resource<ID3D11Texture2D> {
|
||||
|
||||
public:
|
||||
|
||||
D3D11Texture2D(
|
||||
D3D11Device* device,
|
||||
const D3D11_TEXTURE2D_DESC& desc);
|
||||
~D3D11Texture2D();
|
||||
|
||||
HRESULT QueryInterface(
|
||||
REFIID riid,
|
||||
void** ppvObject) final;
|
||||
|
||||
void GetDevice(
|
||||
ID3D11Device **ppDevice) final;
|
||||
|
||||
void GetType(
|
||||
D3D11_RESOURCE_DIMENSION *pResourceDimension) final;
|
||||
|
||||
void GetDesc(
|
||||
D3D11_TEXTURE2D_DESC *pDesc) final;
|
||||
|
||||
private:
|
||||
|
||||
Com<D3D11Device> m_device;
|
||||
|
||||
D3D11_TEXTURE2D_DESC m_desc;
|
||||
Rc<DxvkImage> m_image;
|
||||
|
||||
};
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user