mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
D3D11: Use D3DCommon where appropriate
This commit is contained in:
@ -17,11 +17,10 @@ namespace DX11
|
||||
class DXTexture final : public AbstractTexture
|
||||
{
|
||||
public:
|
||||
explicit DXTexture(const TextureConfig& tex_config, ID3D11Texture2D* d3d_texture,
|
||||
ID3D11ShaderResourceView* d3d_srv, ID3D11UnorderedAccessView* d3d_uav);
|
||||
~DXTexture();
|
||||
|
||||
static std::unique_ptr<DXTexture> Create(const TextureConfig& config);
|
||||
static std::unique_ptr<DXTexture> CreateAdopted(ID3D11Texture2D* texture);
|
||||
|
||||
void CopyRectangleFromTexture(const AbstractTexture* src,
|
||||
const MathUtil::Rectangle<int>& src_rect, u32 src_layer,
|
||||
@ -32,14 +31,19 @@ public:
|
||||
void Load(u32 level, u32 width, u32 height, u32 row_length, const u8* buffer,
|
||||
size_t buffer_size) override;
|
||||
|
||||
ID3D11Texture2D* GetD3DTexture() const { return m_d3d_texture; }
|
||||
ID3D11ShaderResourceView* GetD3DSRV() const { return m_d3d_srv; }
|
||||
ID3D11UnorderedAccessView* GetD3DUAV() const { return m_d3d_uav; }
|
||||
ID3D11Texture2D* GetD3DTexture() const { return m_texture.Get(); }
|
||||
ID3D11ShaderResourceView* GetD3DSRV() const { return m_srv.Get(); }
|
||||
ID3D11UnorderedAccessView* GetD3DUAV() const { return m_uav.Get(); }
|
||||
|
||||
private:
|
||||
ID3D11Texture2D* m_d3d_texture;
|
||||
ID3D11ShaderResourceView* m_d3d_srv;
|
||||
ID3D11UnorderedAccessView* m_d3d_uav;
|
||||
DXTexture(const TextureConfig& config, ID3D11Texture2D* texture);
|
||||
|
||||
bool CreateSRV();
|
||||
bool CreateUAV();
|
||||
|
||||
ComPtr<ID3D11Texture2D> m_texture;
|
||||
ComPtr<ID3D11ShaderResourceView> m_srv;
|
||||
ComPtr<ID3D11UnorderedAccessView> m_uav;
|
||||
};
|
||||
|
||||
class DXStagingTexture final : public AbstractStagingTexture
|
||||
|
Reference in New Issue
Block a user