Go to the documentation of this file.
33 #include "../../../Primitives/interface/FileStream.h"
34 #include "../../../Primitives/interface/FlagEnum.h"
41 {0x2989b45c, 0x143d, 0x4886, {0xb8, 0x9c, 0xc3, 0x27, 0x1c, 0x2d, 0xcc, 0x5d}};
120 static const INTERFACE_ID IID_IShaderSourceInputStreamFactory =
121 {0x3ea98781, 0x82f, 0x4413, {0x8c, 0x30, 0xb9, 0xba, 0x6d, 0x82, 0xdb, 0xb7}};
126 #define DILIGENT_INTERFACE_NAME IShaderSourceInputStreamFactory
127 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
129 #define IShaderSourceInputStreamFactoryInclusiveMethods \
130 IObjectInclusiveMethods; \
131 IShaderSourceInputStreamFactoryMethods ShaderSourceInputStreamFactory
147 #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
149 #if DILIGENT_C_INTERFACE
153 # define IShaderSourceInputStreamFactory_CreateInputStream(This, ...) CALL_IFACE_METHOD(ShaderSourceInputStreamFactory, CreateInputStream, This, __VA_ARGS__)
154 # define IShaderSourceInputStreamFactory_CreateInputStream2(This, ...) CALL_IFACE_METHOD(ShaderSourceInputStreamFactory, CreateInputStream2, This, __VA_ARGS__)
164 #if DILIGENT_CPP_INTERFACE
168 const Char* _Def) noexcept :
185 #if DILIGENT_CPP_INTERFACE
195 return Major == rhs.
Major && Minor == rhs.
Minor;
392 #if DILIGENT_CPP_INTERFACE
398 Uint32 _ArraySize) noexcept :
401 ArraySize{_ArraySize}
418 #define DILIGENT_INTERFACE_NAME IShader
419 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
421 #define IShaderInclusiveMethods \
422 IDeviceObjectInclusiveMethods; \
423 IShaderMethods Shader
430 #if DILIGENT_CPP_INTERFACE
445 #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
447 #if DILIGENT_C_INTERFACE
451 # define IShader_GetDesc(This) (const struct ShaderDesc*)IDeviceObject_GetDesc(This)
453 # define IShader_GetResourceCount(This) CALL_IFACE_METHOD(Shader, GetResourceCount, This)
454 # define IShader_GetResourceDesc(This, ...) CALL_IFACE_METHOD(Shader, GetResourceDesc, This, __VA_ARGS__)
ShaderVersion(Uint8 _Major, Uint8 _Minor) noexcept
Definition: Shader.h:188
@ SHADER_COMPILER_DEFAULT
Default compiler for specific language and API that is selected as follows:
Definition: Shader.h:82
bool operator<=(const ShaderVersion &rhs) const
Definition: Shader.h:213
#define DILIGENT_END_INTERFACE
Definition: DefineInterfaceHelperMacros.h:88
@ SHADER_RESOURCE_TYPE_CONSTANT_BUFFER
Constant (uniform) buffer.
Definition: Shader.h:362
struct INTERFACE_ID INTERFACE_ID
Definition: InterfaceID.h:54
@ SHADER_COMPILER_DXC
Modern HLSL compiler (DXC) for Direct3D12 and Vulkan with Shader Model 6.x support.
Definition: Shader.h:88
#define VIRTUAL
Definition: DefineInterfaceHelperMacros.h:83
SHADER_SOURCE_LANGUAGE
Describes the shader source code language.
Definition: Shader.h:46
char Char
Definition: BasicTypes.h:64
@ SHADER_SOURCE_LANGUAGE_HLSL
The source language is HLSL.
Definition: Shader.h:52
@ SHADER_COMPILE_FLAG_NONE
No flags.
Definition: Shader.h:228
ShaderMacro(const Char *_Name, const Char *_Def) noexcept
Definition: Shader.h:167
Base interface for a file stream.
Definition: DataBlob.h:52
SHADER_TYPE
Describes the shader type.
Definition: GraphicsTypes.h:65
SHADER_RESOURCE_TYPE
Describes shader resource type.
Definition: Shader.h:356
Shader version.
Definition: Shader.h:177
#define DILIGENT_BEGIN_INTERFACE(Name, Base)
Definition: CommonDefinitions.h:97
@ SHADER_RESOURCE_TYPE_TEXTURE_SRV
Shader resource view of a texture (sampled image)
Definition: Shader.h:365
ShaderVersion() noexcept
Definition: Shader.h:186
Uint32 Flags
Definition: DXBCUtils.cpp:71
@ SHADER_RESOURCE_TYPE_BUFFER_UAV
Unordered access view of a buffer (storage buffer)
Definition: Shader.h:374
Shader interface.
Definition: Shader.h:428
Base interface for all dynamic objects in the engine.
Definition: Object.h:41
@ SHADER_RESOURCE_TYPE_SAMPLER
Sampler (separate sampler)
Definition: Shader.h:377
@ CREATE_SHADER_SOURCE_INPUT_STREAM_FLAG_NONE
No flag.
Definition: Shader.h:101
Definition: HLSL2GLSLConverter.h:52
@ SHADER_SOURCE_LANGUAGE_GLSL_VERBATIM
The source language is GLSL that should be compiled verbatim.
Definition: Shader.h:68
Uint8 Major
Major revision.
Definition: Shader.h:180
@ SHADER_COMPILE_FLAG_LAST
Definition: Shader.h:233
@ CREATE_SHADER_SOURCE_INPUT_STREAM_FLAG_SILENT
Do not output any messages if the file is not found or other errors occur.
Definition: Shader.h:105
SHADER_COMPILE_FLAGS
Shader compilation flags.
Definition: Shader.h:225
Base interface for all objects created by the render device Diligent::IRenderDevice.
Definition: DeviceObject.h:52
#define THIS
Definition: DefineInterfaceHelperMacros.h:81
ShaderResourceDesc() noexcept
Definition: Shader.h:393
Shader creation attributes.
Definition: Shader.h:241
Unique interface identifier.
Definition: InterfaceID.h:37
@ SHADER_RESOURCE_TYPE_INPUT_ATTACHMENT
Input attachment in a render pass.
Definition: Shader.h:380
bool operator>=(const ShaderVersion &rhs) const
Definition: Shader.h:203
@ SHADER_RESOURCE_TYPE_BUFFER_SRV
Shader resource view of a buffer (read-only storage image)
Definition: Shader.h:368
#define PURE
Definition: DefineInterfaceHelperMacros.h:85
@ SHADER_SOURCE_LANGUAGE_DEFAULT
Default language (GLSL for OpenGL/OpenGLES/Vulkan devices, HLSL for Direct3D11/Direct3D12 devices)
Definition: Shader.h:49
ShaderMacro() noexcept
Definition: Shader.h:165
@ SHADER_RESOURCE_TYPE_LAST
Definition: Shader.h:385
@ SHADER_SOURCE_LANGUAGE_MSL
The source language is Metal shading language (MSL)
Definition: Shader.h:58
Describes common device object attributes.
Definition: GraphicsTypes.h:1196
@ SHADER_COMPILER_GLSLANG
Built-in glslang compiler for GLSL and HLSL.
Definition: Shader.h:85
#define DILIGENT_END_NAMESPACE
Definition: CommonDefinitions.h:86
Shader description.
Definition: Shader.h:110
@ SHADER_SOURCE_LANGUAGE_GLSL
The source language is GLSL.
Definition: Shader.h:55
#define CONST
Definition: DefineInterfaceHelperMacros.h:84
@ SHADER_RESOURCE_TYPE_ACCEL_STRUCT
Acceleration structure.
Definition: Shader.h:383
CREATE_SHADER_SOURCE_INPUT_STREAM_FLAGS
Describes the flags that can be passed over to IShaderSourceInputStreamFactory::CreateInputStream2() ...
Definition: Shader.h:98
#define DILIGENT_DERIVE(TypeName)
Definition: CommonDefinitions.h:90
const D3D12_PIPELINE_STATE_SUBOBJECT_TYPE Type
Definition: PipelineStateD3D12Impl.cpp:69
uint32_t Uint32
32-bit unsigned integer
Definition: BasicTypes.h:51
@ SHADER_COMPILE_FLAG_ENABLE_UNBOUNDED_ARRAYS
Enable unbounded resource arrays (e.g. Texture2D g_Texture[]).
Definition: Shader.h:231
#define DEFAULT_INITIALIZER(x)
Definition: CommonDefinitions.h:93
Base interface for a file stream.
Definition: FileStream.h:53
bool operator>(const ShaderVersion &rhs) const
Definition: Shader.h:198
@ SHADER_TYPE_UNKNOWN
Unknown shader type.
Definition: GraphicsTypes.h:67
@ SHADER_RESOURCE_TYPE_TEXTURE_UAV
Unordered access view of a texture (sotrage image)
Definition: Shader.h:371
ShaderResourceDesc(const char *_Name, SHADER_RESOURCE_TYPE _Type, Uint32 _ArraySize) noexcept
Definition: Shader.h:396
#define REF
Definition: DefineGlobalFuncHelperMacros.h:39
@ SHADER_COMPILER_LAST
Definition: Shader.h:93
#define METHOD(Name)
Definition: DefineInterfaceHelperMacros.h:87
#define DILIGENT_TYPED_ENUM(EnumName, EnumType)
Definition: CommonDefinitions.h:88
SHADER_COMPILER
Describes the shader compiler that will be used to compile the shader source code.
Definition: Shader.h:73
bool operator==(const ShaderVersion &rhs) const
Definition: Shader.h:193
Shader resource description.
Definition: Shader.h:390
uint8_t Uint8
8-bit unsigned integer
Definition: BasicTypes.h:53
@ SHADER_COMPILER_FXC
Legacy HLSL compiler (FXC) for Direct3D11 and Direct3D12 supporting shader models up to 5....
Definition: Shader.h:91
#define DILIGENT_BEGIN_NAMESPACE(Name)
Definition: CommonDefinitions.h:82
Uint8 Minor
Minor revision.
Definition: Shader.h:183
DEFINE_FLAG_ENUM_OPERATORS(FILE_DIALOG_FLAGS)
bool operator<(const ShaderVersion &rhs) const
Definition: Shader.h:208
Uint16 ShaderType
Definition: DXBCUtils.cpp:70
@ SHADER_RESOURCE_TYPE_UNKNOWN
Shader resource type is unknown.
Definition: Shader.h:359
ShaderDesc Desc
Shader description. See Diligent::ShaderDesc.
Definition: Shader.h:316
The library uses Direct3D-style math:
Definition: AdvancedMath.hpp:37
#define THIS_
Definition: DefineInterfaceHelperMacros.h:82