mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-12-30 21:01:04 +01:00
e149ad4f0a
SPDX standardizes how source code conveys its copyright and licensing information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX tags are adopted in many large projects, including things like the Linux kernel.
33 lines
828 B
C++
33 lines
828 B
C++
// Copyright 2019 Dolphin Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
#include <string_view>
|
|
#include "VideoBackends/D3D12/Common.h"
|
|
#include "VideoBackends/D3DCommon/Shader.h"
|
|
|
|
namespace DX12
|
|
{
|
|
class DXShader final : public D3DCommon::Shader
|
|
{
|
|
public:
|
|
~DXShader() override;
|
|
|
|
ID3D12PipelineState* GetComputePipeline() const { return m_compute_pipeline.Get(); }
|
|
D3D12_SHADER_BYTECODE GetD3DByteCode() const;
|
|
|
|
static std::unique_ptr<DXShader> CreateFromBytecode(ShaderStage stage, BinaryData bytecode);
|
|
static std::unique_ptr<DXShader> CreateFromSource(ShaderStage stage, std::string_view source);
|
|
|
|
private:
|
|
DXShader(ShaderStage stage, BinaryData bytecode);
|
|
|
|
bool CreateComputePipeline();
|
|
|
|
ComPtr<ID3D12PipelineState> m_compute_pipeline;
|
|
};
|
|
|
|
} // namespace DX12
|