2017-09-08 09:42:56 +00:00
|
|
|
// Copyright 2017 Dolphin Emulator Project
|
2021-07-05 01:22:19 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2017-09-08 09:42:56 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
|
|
|
2019-03-09 13:31:37 +00:00
|
|
|
#include "VideoBackends/D3D/D3DBase.h"
|
2019-03-09 13:31:36 +00:00
|
|
|
#include "VideoBackends/D3DCommon/Shader.h"
|
2017-09-08 09:42:56 +00:00
|
|
|
|
|
|
|
namespace DX11
|
|
|
|
{
|
2019-03-09 13:31:36 +00:00
|
|
|
class DXShader final : public D3DCommon::Shader
|
2017-09-08 09:42:56 +00:00
|
|
|
{
|
|
|
|
public:
|
2019-02-15 01:59:50 +00:00
|
|
|
DXShader(ShaderStage stage, BinaryData bytecode, ID3D11DeviceChild* shader);
|
2017-09-08 09:42:56 +00:00
|
|
|
~DXShader() override;
|
|
|
|
|
|
|
|
ID3D11VertexShader* GetD3DVertexShader() const;
|
|
|
|
ID3D11GeometryShader* GetD3DGeometryShader() const;
|
|
|
|
ID3D11PixelShader* GetD3DPixelShader() const;
|
|
|
|
ID3D11ComputeShader* GetD3DComputeShader() const;
|
|
|
|
|
2019-02-15 01:59:50 +00:00
|
|
|
static std::unique_ptr<DXShader> CreateFromBytecode(ShaderStage stage, BinaryData bytecode);
|
2017-09-08 09:42:56 +00:00
|
|
|
|
|
|
|
private:
|
2019-03-09 13:31:37 +00:00
|
|
|
ComPtr<ID3D11DeviceChild> m_shader;
|
2017-09-08 09:42:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace DX11
|