blob: 1c04302ce0826a63c9a7b6980ada3e9064afb503 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#pragma once
#include "tools/gfx/render.h"
#include "core/slang-basic.h"
namespace gfx
{
class GraphicsAPIRenderer : public IRenderer, public Slang::RefObject
{
public:
SLANG_REF_OBJECT_IUNKNOWN_ALL
virtual SLANG_NO_THROW Result SLANG_MCALL getFeatures(
const char** outFeatures, UInt bufferSize, UInt* outFeatureCount) SLANG_OVERRIDE;
virtual SLANG_NO_THROW bool SLANG_MCALL hasFeature(const char* featureName) SLANG_OVERRIDE;
virtual SLANG_NO_THROW Result SLANG_MCALL createShaderObjectLayout(
slang::TypeLayoutReflection* typeLayout, IShaderObjectLayout** outLayout) SLANG_OVERRIDE;
virtual SLANG_NO_THROW Result SLANG_MCALL createRootShaderObjectLayout(
slang::ProgramLayout* programLayout, IShaderObjectLayout** outLayout) SLANG_OVERRIDE;
virtual SLANG_NO_THROW Result SLANG_MCALL
createShaderObject(IShaderObjectLayout* layout, IShaderObject** outObject) SLANG_OVERRIDE;
virtual SLANG_NO_THROW Result SLANG_MCALL createRootShaderObject(
IShaderObjectLayout* rootLayout, IShaderObject** outObject) SLANG_OVERRIDE;
virtual SLANG_NO_THROW Result SLANG_MCALL
bindRootShaderObject(PipelineType pipelineType, IShaderObject* object) SLANG_OVERRIDE;
void preparePipelineDesc(GraphicsPipelineStateDesc& desc);
void preparePipelineDesc(ComputePipelineStateDesc& desc);
IRenderer* getInterface(const Slang::Guid& guid);
protected:
Slang::List<Slang::String> m_features;
};
struct GfxGUID
{
static const Slang::Guid IID_ISlangUnknown;
static const Slang::Guid IID_IDescriptorSetLayout;
static const Slang::Guid IID_IDescriptorSet;
static const Slang::Guid IID_IShaderProgram;
static const Slang::Guid IID_IPipelineLayout;
static const Slang::Guid IID_IPipelineState;
static const Slang::Guid IID_IResourceView;
static const Slang::Guid IID_ISamplerState;
static const Slang::Guid IID_IResource;
static const Slang::Guid IID_IBufferResource;
static const Slang::Guid IID_ITextureResource;
static const Slang::Guid IID_IInputLayout;
static const Slang::Guid IID_IRenderer;
static const Slang::Guid IID_IShaderObjectLayout;
static const Slang::Guid IID_IShaderObject;
};
}
|