slot 0.0.1
A real time UI render framework
载入中...
搜索中...
未找到
slang-gfx.h
浏览该文件的文档.
1// render.h
2#pragma once
3
4#include "slang-com-ptr.h"
5#include "slang.h"
6
7#include <assert.h>
8#include <float.h>
9
10
11#if defined(SLANG_GFX_DYNAMIC)
12 #if defined(_MSC_VER)
13 #ifdef SLANG_GFX_DYNAMIC_EXPORT
14 #define SLANG_GFX_API SLANG_DLL_EXPORT
15 #else
16 #define SLANG_GFX_API __declspec(dllimport)
17 #endif
18 #else
19 // TODO: need to consider compiler capabilities
20 // # ifdef SLANG_DYNAMIC_EXPORT
21 #define SLANG_GFX_API SLANG_DLL_EXPORT
22 // # endif
23 #endif
24#endif
25
26#ifndef SLANG_GFX_API
27 #define SLANG_GFX_API
28#endif
29
30// Needed for building on cygwin with gcc
31#undef Always
32#undef None
33
34// GLOBAL TODO: doc comments
35// GLOBAL TODO: Rationalize integer types (not a smush of uint/int/Uint/Int/etc)
36// - need typedefs in gfx namespace for Count, Index, Size, Offset (ex. DeviceAddress)
37// - Index and Count are for arrays, and indexing into array - like things(XY coordinates of
38// pixels, etc.)
39// - Count is also for anything where we need to measure how many of something there are.
40// This includes things like extents.
41// - Offset and Size are almost always for bytes and things measured in bytes.
42namespace gfx
43{
44
45using Slang::ComPtr;
46
48
49// Had to move here, because Options needs types defined here
50typedef SlangInt Int;
52typedef uint64_t DeviceAddress;
53typedef int GfxIndex;
54typedef int GfxCount;
55typedef size_t Size;
56typedef size_t Offset;
57
58const uint64_t kTimeoutInfinite = 0xFFFFFFFFFFFFFFFF;
59
67
68// TODO: Rename to Stage
69enum class StageType
70{
71 Unknown,
72 Vertex,
73 Hull,
74 Domain,
77 Compute,
80 AnyHit,
82 Miss,
85 Mesh,
86 CountOf,
87};
88
89// TODO: Implementation or backend or something else?
90enum class DeviceType
91{
92 Unknown,
93 Default,
96 OpenGl,
97 Vulkan,
98 Metal,
99 CPU,
100 CUDA,
101 WebGPU,
102 CountOf,
103};
104
105// TODO: Why does this exist it should go poof
107{
108 Unknown,
109 OpenGl,
110 DirectX,
111 Vulkan,
112 Metal,
113 CountOf,
114};
115
116// TODO: This should also go poof
118enum class BindingStyle
119{
120 Unknown,
121 DirectX,
122 OpenGl,
123 Vulkan,
124 Metal,
125 CPU,
126 CUDA,
127 CountOf,
128};
129
130// TODO: Is this actually a flag when there are no bit fields?
131enum class AccessFlag
132{
133 None,
134 Read,
135 Write,
136};
137
138// TODO: Needed? Shouldn't be hard-coded if so
140
142
144{
145 SlangSource, // a slang source string in memory.
146 SlangModuleBinary, // a slang module binary code in memory.
147 SlangSourceFile, // a slang source from file.
148 SlangModuleBinaryFile, // a slang module binary code from file.
149};
150
152{
153public:
154 // Defines how linking should be performed for a shader program.
155 enum class LinkingStyle
156 {
157 // Compose all entry-points in a single program, then compile all entry-points together with
158 // the same set of root shader arguments.
160
161 // Link and compile each entry-point individually, potentially with different
162 // specializations.
164 };
165
167 {
168 None,
169 Deferred,
170 };
171
172 struct Desc
173 {
174 // TODO: Tess doesn't like this but doesn't know what to do about it
175 // The linking style of this program.
177
178 // The global scope or a Slang composite component that represents the entire program.
179 slang::IComponentType* slangGlobalScope;
180
181 // Number of separate entry point components in the `slangEntryPoints` array to link in.
182 // If set to 0, then `slangGlobalScope` must contain Slang EntryPoint components.
183 // If not 0, then `slangGlobalScope` must not contain any EntryPoint components.
185
186 // An array of Slang entry points. The size of the array must be `entryPointCount`.
187 // Each element must define only 1 Slang EntryPoint.
188 slang::IComponentType** slangEntryPoints = nullptr;
189
190 // Indicates whether the app is responsible for final downstream linking.
192 };
193
195 {
199
200 // Number of entry points to include in the shader program. 0 means include all entry points
201 // defined in the module.
203 // Names of entry points to include in the shader program. The size of the array must be
204 // `entryPointCount`.
205 const char** entryPointNames = nullptr;
206 };
207
208 virtual SLANG_NO_THROW slang::TypeReflection* SLANG_MCALL findTypeByName(const char* name) = 0;
209};
210#define SLANG_UUID_IShaderProgram \
211 { \
212 0x9d32d0ad, 0x915c, 0x4ffd, \
213 { \
214 0x91, 0xe2, 0x50, 0x85, 0x54, 0xa0, 0x4a, 0x76 \
215 } \
216 }
217
218// TODO: Confirm with Yong that we really want this naming convention
219// TODO: Rename to what?
220// Dont' change without keeping in sync with Format
221// clang-format off
222#define GFX_FORMAT(x) \
223 x( Unknown, 0, 0) \
224 \
225 x(R32G32B32A32_TYPELESS, 16, 1) \
226 x(R32G32B32_TYPELESS, 12, 1) \
227 x(R32G32_TYPELESS, 8, 1) \
228 x(R32_TYPELESS, 4, 1) \
229 \
230 x(R16G16B16A16_TYPELESS, 8, 1) \
231 x(R16G16_TYPELESS, 4, 1) \
232 x(R16_TYPELESS, 2, 1) \
233 \
234 x(R8G8B8A8_TYPELESS, 4, 1) \
235 x(R8G8_TYPELESS, 2, 1) \
236 x(R8_TYPELESS, 1, 1) \
237 x(B8G8R8A8_TYPELESS, 4, 1) \
238 \
239 x(R32G32B32A32_FLOAT, 16, 1) \
240 x(R32G32B32_FLOAT, 12, 1) \
241 x(R32G32_FLOAT, 8, 1) \
242 x(R32_FLOAT, 4, 1) \
243 \
244 x(R16G16B16A16_FLOAT, 8, 1) \
245 x(R16G16_FLOAT, 4, 1) \
246 x(R16_FLOAT, 2, 1) \
247 \
248 x(R32G32B32A32_UINT, 16, 1) \
249 x(R32G32B32_UINT, 12, 1) \
250 x(R32G32_UINT, 8, 1) \
251 x(R32_UINT, 4, 1) \
252 \
253 x(R16G16B16A16_UINT, 8, 1) \
254 x(R16G16_UINT, 4, 1) \
255 x(R16_UINT, 2, 1) \
256 \
257 x(R8G8B8A8_UINT, 4, 1) \
258 x(R8G8_UINT, 2, 1) \
259 x(R8_UINT, 1, 1) \
260 \
261 x(R32G32B32A32_SINT, 16, 1) \
262 x(R32G32B32_SINT, 12, 1) \
263 x(R32G32_SINT, 8, 1) \
264 x(R32_SINT, 4, 1) \
265 \
266 x(R16G16B16A16_SINT, 8, 1) \
267 x(R16G16_SINT, 4, 1) \
268 x(R16_SINT, 2, 1) \
269 \
270 x(R8G8B8A8_SINT, 4, 1) \
271 x(R8G8_SINT, 2, 1) \
272 x(R8_SINT, 1, 1) \
273 \
274 x(R16G16B16A16_UNORM, 8, 1) \
275 x(R16G16_UNORM, 4, 1) \
276 x(R16_UNORM, 2, 1) \
277 \
278 x(R8G8B8A8_UNORM, 4, 1) \
279 x(R8G8B8A8_UNORM_SRGB, 4, 1) \
280 x(R8G8_UNORM, 2, 1) \
281 x(R8_UNORM, 1, 1) \
282 x(B8G8R8A8_UNORM, 4, 1) \
283 x(B8G8R8A8_UNORM_SRGB, 4, 1) \
284 x(B8G8R8X8_UNORM, 4, 1) \
285 x(B8G8R8X8_UNORM_SRGB, 4, 1) \
286 \
287 x(R16G16B16A16_SNORM, 8, 1) \
288 x(R16G16_SNORM, 4, 1) \
289 x(R16_SNORM, 2, 1) \
290 \
291 x(R8G8B8A8_SNORM, 4, 1) \
292 x(R8G8_SNORM, 2, 1) \
293 x(R8_SNORM, 1, 1) \
294 \
295 x(D32_FLOAT, 4, 1) \
296 x(D16_UNORM, 2, 1) \
297 x(D32_FLOAT_S8_UINT, 8, 1) \
298 x(R32_FLOAT_X32_TYPELESS, 8, 1) \
299 \
300 x(B4G4R4A4_UNORM, 2, 1) \
301 x(B5G6R5_UNORM, 2, 1) \
302 x(B5G5R5A1_UNORM, 2, 1) \
303 \
304 x(R9G9B9E5_SHAREDEXP, 4, 1) \
305 x(R10G10B10A2_TYPELESS, 4, 1) \
306 x(R10G10B10A2_UNORM, 4, 1) \
307 x(R10G10B10A2_UINT, 4, 1) \
308 x(R11G11B10_FLOAT, 4, 1) \
309 \
310 x(BC1_UNORM, 8, 16) \
311 x(BC1_UNORM_SRGB, 8, 16) \
312 x(BC2_UNORM, 16, 16) \
313 x(BC2_UNORM_SRGB, 16, 16) \
314 x(BC3_UNORM, 16, 16) \
315 x(BC3_UNORM_SRGB, 16, 16) \
316 x(BC4_UNORM, 8, 16) \
317 x(BC4_SNORM, 8, 16) \
318 x(BC5_UNORM, 16, 16) \
319 x(BC5_SNORM, 16, 16) \
320 x(BC6H_UF16, 16, 16) \
321 x(BC6H_SF16, 16, 16) \
322 x(BC7_UNORM, 16, 16) \
323 x(BC7_UNORM_SRGB, 16, 16) \
324 \
325 x(R64_UINT, 8, 1) \
326 \
327 x(R64_SINT, 8, 1)
328// clang-format on
329
330// TODO: This should be generated from above
331// TODO: enum class should be explicitly uint32_t or whatever's appropriate
335enum class Format
336{
337 // D3D formats omitted: 19-22, 44-47, 65-66, 68-70, 73, 76, 79, 82, 88-89, 92-94, 97, 100-114
338 // These formats are omitted due to lack of a corresponding Vulkan format. D24_UNORM_S8_UINT
339 // (DXGI_FORMAT 45) has a matching Vulkan format but is also omitted as it is only supported by
340 // Nvidia.
341 Unknown,
342
347
351
356
360 R32_FLOAT,
361
364 R16_FLOAT,
365
369 R32_UINT,
370
373 R16_UINT,
374
376 R8G8_UINT,
377 R8_UINT,
378
382 R32_SINT,
383
386 R16_SINT,
387
389 R8G8_SINT,
390 R8_SINT,
391
394 R16_UNORM,
395
399 R8_UNORM,
404
407 R16_SNORM,
408
411 R8_SNORM,
412
413 D32_FLOAT,
414 D16_UNORM,
417
421
427
428 BC1_UNORM,
430 BC2_UNORM,
432 BC3_UNORM,
434 BC4_UNORM,
435 BC4_SNORM,
436 BC5_UNORM,
437 BC5_SNORM,
438 BC6H_UF16,
439 BC6H_SF16,
440 BC7_UNORM,
442
443 R64_UINT,
444
445 R64_SINT,
446
447 _Count,
448};
449
450// TODO: Aspect = Color, Depth, Stencil, etc.
451// TODO: Channel = R, G, B, A, D, S, etc.
452// TODO: Pick : pixel or texel
453// TODO: Block is a good term for what it is
454// TODO: Width/Height/Depth/whatever should not be used. We should use extentX, extentY, etc.
467
469{
470 PerVertex,
472};
473
484
491
493{
494 Point,
495 Line,
496 Triangle,
497 Patch
498};
499
501{
504 PointList,
505 LineList,
507};
508
535
537{
538public:
539 void add(ResourceState state) { m_bitFields |= (1LL << (uint32_t)state); }
540 template<typename... TResourceState>
541 void add(ResourceState s, TResourceState... states)
542 {
543 add(s);
544 add(states...);
545 }
546 bool contains(ResourceState state) const
547 {
548 return (m_bitFields & (1LL << (uint32_t)state)) != 0;
549 }
551 : m_bitFields(0)
552 {
553 }
554 ResourceStateSet(const ResourceStateSet& other) = default;
556 template<typename... TResourceState>
557 ResourceStateSet(TResourceState... states)
558 {
559 add(states...);
560 }
561
563 {
564 ResourceStateSet result;
565 result.m_bitFields = this->m_bitFields & that.m_bitFields;
566 return result;
567 }
568
569private:
570 uint64_t m_bitFields = 0;
571 void add() {}
572};
573
574
576enum class MemoryType
577{
579 Upload,
580 ReadBack,
581};
582
584{
585 Unknown,
586 D3D12, // A D3D12 object pointer.
587 Vulkan, // A general Vulkan object handle.
588 CUDA, // A general CUDA object handle.
589 Win32, // A general Win32 HANDLE.
590 FileDescriptor, // A file descriptor.
591 DeviceAddress, // A device address.
592 D3D12CpuDescriptorHandle, // A D3D12_CPU_DESCRIPTOR_HANDLE value.
593 Metal, // A general Metal object handle.
594};
595
601
602// Declare opaque type
604{
605public:
613};
614#define SLANG_UUID_IInputLayout \
615 { \
616 0x45223711, 0xa84b, 0x455c, \
617 { \
618 0xbe, 0xfa, 0x49, 0x37, 0x42, 0x1e, 0x8e, 0x2e \
619 } \
620 }
621
657#define SLANG_UUID_IResource \
658 { \
659 0xa0e39f34, 0x8398, 0x4522, \
660 { \
661 0x95, 0xc2, 0xeb, 0xc0, 0xf9, 0x84, 0xef, 0x3f \
662 } \
663 }
664
666{
667 // TODO: Change to Offset/Size?
668 uint64_t offset;
669 uint64_t size;
670};
671
673{
674public:
681
684 virtual SLANG_NO_THROW Result SLANG_MCALL map(MemoryRange* rangeToRead, void** outPointer) = 0;
686};
687#define SLANG_UUID_IBufferResource \
688 { \
689 0x1b274efe, 0x5e37, 0x492b, \
690 { \
691 0x82, 0x6e, 0x7e, 0xe7, 0xe8, 0xf5, 0xa4, 0x9b \
692 } \
693 }
694
696{
697 float depth = 1.0f;
698 uint32_t stencil = 0;
699};
701{
702 float floatValues[4];
703 uint32_t uintValues[4];
704};
706{
707 ColorClearValue color = {{0.0f, 0.0f, 0.0f, 0.0f}};
709};
710
716
717enum class TextureAspect : uint32_t
718{
719 Default = 0,
720 Color = 0x00000001,
721 Depth = 0x00000002,
722 Stencil = 0x00000004,
723 MetaData = 0x00000008,
724 Plane0 = 0x00000010,
725 Plane1 = 0x00000020,
726 Plane2 = 0x00000040,
727
729};
730
732{
736 GfxIndex baseArrayLayer; // For Texture3D, this is WSlice.
737 GfxCount layerCount; // For cube maps, this is a multiple of 6.
738};
739
741{
742public:
743 static const GfxCount kRemainingTextureSize = 0xffffffff;
744 struct Offset3D
745 {
749 Offset3D() = default;
751 : x(_x), y(_y), z(_z)
752 {
753 }
754 };
755
757 {
759 int quality = 0;
760 };
761
762 struct Extents
763 {
767 };
768
780
801 {
803 void const* data;
804
814
824 };
825
827};
828#define SLANG_UUID_ITextureResource \
829 { \
830 0xcf88a31c, 0x6187, 0x46c5, \
831 { \
832 0xa4, 0xb7, 0xeb, 0x58, 0xc7, 0x33, 0x40, 0x17 \
833 } \
834 }
835
836
837enum class ComparisonFunc : uint8_t
838{
839 Never = 0x0,
840 Less = 0x1,
841 Equal = 0x2,
842 LessEqual = 0x3,
843 Greater = 0x4,
844 NotEqual = 0x5,
845 GreaterEqual = 0x6,
846 Always = 0x7,
847};
848
850{
851 Point,
852 Linear,
853};
854
856{
857 Wrap,
862};
863
865{
866 Average,
868 Minimum,
869 Maximum,
870};
871
897#define SLANG_UUID_ISamplerState \
898 { \
899 0x8b8055df, 0x9377, 0x401d, \
900 { \
901 0x91, 0xff, 0x3f, 0xa3, 0xbf, 0x66, 0x64, 0xf4 \
902 } \
903 }
904
906{
907public:
908 enum class Type
909 {
910 Unknown,
911
917
918 CountOf_,
919 };
920
922 {
923 // The resource shape of this render target view.
925 };
926
927 struct Desc
928 {
931
932 // Required fields for `RenderTarget` and `DepthStencil` views.
934 // Specifies the range of a texture resource for a
935 // ShaderRsource/UnorderedAccess/RenderTarget/DepthStencil view.
937 // Specifies the range of a buffer resource for a ShaderResource/UnorderedAccess view.
939 };
941
948};
949#define SLANG_UUID_IResourceView \
950 { \
951 0x7b6c4926, 0x884, 0x408c, \
952 { \
953 0xad, 0x8a, 0x50, 0x3a, 0x8e, 0x23, 0x98, 0xa4 \
954 } \
955 }
956
958{
959public:
960 enum class Kind
961 {
962 TopLevel,
964 };
965
967 {
968 // The enum values are intentionally consistent with
969 // D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAGS.
980 };
981
982 enum class GeometryType
983 {
984 Triangles,
986 };
987
989 {
990 // The enum values are intentionally consistent with
991 // D3D12_RAYTRACING_GEOMETRY_FLAGS.
998 };
999
1011
1013 {
1014 float minX;
1015 float minY;
1016 float minZ;
1017 float maxX;
1018 float maxY;
1019 float maxZ;
1020 };
1021
1033
1044
1046 {
1047 // The enum values are kept consistent with D3D12_RAYTRACING_INSTANCE_FLAGS
1048 // and VkGeometryInstanceFlagBitsKHR.
1049 enum Enum : uint32_t
1050 {
1051 None = 0,
1054 ForceOpaque = 0x00000004,
1055 NoOpaque = 0x00000008
1057 };
1058
1059 // TODO: Should any of these be changed?
1060 // The layout of this struct is intentionally consistent with D3D12_RAYTRACING_INSTANCE_DESC
1061 // and VkAccelerationStructureInstanceKHR.
1063 {
1064 float transform[3][4];
1065 uint32_t instanceID : 24;
1066 uint32_t instanceMask : 8;
1068 uint32_t flags : 8; // Combination of GeometryInstanceFlags::Enum values.
1070 };
1071
1078
1095
1103
1111
1113};
1114#define SLANG_UUID_IAccelerationStructure \
1115 { \
1116 0xa5cdda3c, 0x1d4e, 0x4df7, \
1117 { \
1118 0x8e, 0xf2, 0xb7, 0x3f, 0xce, 0x4, 0xde, 0x3b \
1119 } \
1120 }
1121
1122class IFence : public ISlangUnknown
1123{
1124public:
1125 struct Desc
1126 {
1127 uint64_t initialValue = 0;
1128 bool isShared = false;
1129 };
1130
1132 virtual SLANG_NO_THROW Result SLANG_MCALL getCurrentValue(uint64_t* outValue) = 0;
1133
1136
1139};
1140#define SLANG_UUID_IFence \
1141 { \
1142 0x7fe1c283, 0xd3f4, 0x48ed, \
1143 { \
1144 0xaa, 0xf3, 0x1, 0x51, 0x96, 0x4e, 0x7c, 0xb5 \
1145 } \
1146 }
1147
1149{
1150 SlangInt uniformOffset = 0; // TODO: Change to Offset?
1153 uint32_t getHashCode() const
1154 {
1155 return (uint32_t)(((bindingRangeIndex << 20) + bindingArrayIndex) ^ uniformOffset);
1156 }
1157 bool operator==(const ShaderOffset& other) const
1158 {
1159 return uniformOffset == other.uniformOffset &&
1162 }
1163 bool operator!=(const ShaderOffset& other) const { return !this->operator==(other); }
1164 bool operator<(const ShaderOffset& other) const
1165 {
1167 return true;
1169 return false;
1171 return true;
1173 return false;
1174 return uniformOffset < other.uniformOffset;
1175 }
1176 bool operator<=(const ShaderOffset& other) const { return (*this == other) || (*this) < other; }
1177 bool operator>(const ShaderOffset& other) const { return other < *this; }
1178 bool operator>=(const ShaderOffset& other) const { return other <= *this; }
1179};
1180
1182{
1183 None,
1184 Array,
1186};
1187
1189{
1190public:
1191 virtual SLANG_NO_THROW slang::TypeLayoutReflection* SLANG_MCALL getElementTypeLayout() = 0;
1195 getEntryPoint(GfxIndex index, IShaderObject** entryPoint) = 0;
1197 setData(ShaderOffset const& offset, void const* data, Size size) = 0;
1199 getObject(ShaderOffset const& offset, IShaderObject** object) = 0;
1201 setObject(ShaderOffset const& offset, IShaderObject* object) = 0;
1203 setResource(ShaderOffset const& offset, IResourceView* resourceView) = 0;
1205 setSampler(ShaderOffset const& offset, ISamplerState* sampler) = 0;
1207 ShaderOffset const& offset,
1208 IResourceView* textureView,
1209 ISamplerState* sampler) = 0;
1210
1215 ShaderOffset const& offset,
1216 const slang::SpecializationArg* args,
1217 GfxCount count) = 0;
1218
1221
1222 virtual SLANG_NO_THROW const void* SLANG_MCALL getRawData() = 0;
1223
1225
1229
1230
1232 {
1233 ComPtr<IShaderObject> object = nullptr;
1234 SLANG_RETURN_NULL_ON_FAIL(getObject(offset, object.writeRef()));
1235 return object;
1236 }
1238 {
1239 ComPtr<IShaderObject> entryPoint = nullptr;
1240 SLANG_RETURN_NULL_ON_FAIL(getEntryPoint(index, entryPoint.writeRef()));
1241 return entryPoint;
1242 }
1243};
1244#define SLANG_UUID_IShaderObject \
1245 { \
1246 0xc1fa997e, 0x5ca2, 0x45ae, \
1247 { \
1248 0x9b, 0xcb, 0xc4, 0x35, 0x9e, 0x85, 0x5, 0x85 \
1249 } \
1250 }
1251
1252enum class StencilOp : uint8_t
1253{
1254 Keep,
1255 Zero,
1256 Replace,
1259 Invert,
1262};
1263
1264enum class FillMode : uint8_t
1265{
1266 Solid,
1267 Wireframe,
1268};
1269
1270enum class CullMode : uint8_t
1271{
1272 None,
1273 Front,
1274 Back,
1275};
1276
1277enum class FrontFaceMode : uint8_t
1278{
1280 Clockwise,
1281};
1282
1290
1292{
1293 bool depthTestEnable = false;
1294 bool depthWriteEnable = true;
1296
1297 bool stencilEnable = false;
1298 uint32_t stencilReadMask = 0xFFFFFFFF;
1299 uint32_t stencilWriteMask = 0xFFFFFFFF;
1302
1303 uint32_t stencilRef = 0; // TODO: this should be removed
1304};
1305
1321
1322enum class LogicOp
1323{
1324 NoOp,
1325};
1326
1327enum class BlendOp
1328{
1329 Add,
1330 Subtract,
1332 Min,
1333 Max,
1334};
1335
1336enum class BlendFactor
1337{
1338 Zero,
1339 One,
1340 SrcColor,
1342 SrcAlpha,
1344 DestAlpha,
1346 DestColor,
1349 BlendColor,
1355};
1356
1357namespace RenderTargetWriteMask
1358{
1359typedef uint8_t Type;
1360enum
1361{
1368};
1369}; // namespace RenderTargetWriteMask
1371
1378
1387
1395
1411#define SLANG_UUID_IFramebufferLayout \
1412 { \
1413 0xa838785, 0xc13a, 0x4832, \
1414 { \
1415 0xad, 0x88, 0x64, 0x6, 0xb5, 0x4b, 0x5e, 0xba \
1416 } \
1417 }
1418
1430
1436
1438{
1439 enum Enum : uint32_t
1440 {
1441 None = 0,
1444 };
1445};
1446
1448{
1449 const char* hitGroupName = nullptr;
1450 const char* closestHitEntryPoint = nullptr;
1451 const char* anyHitEntryPoint = nullptr;
1452 const char* intersectionEntryPoint = nullptr;
1453};
1454
1465
1467{
1468public:
1469 // Specifies the bytes to overwrite into a record in the shader table.
1471 {
1472 Offset offset; // Offset within the shader record.
1473 Size size; // Number of bytes to overwrite.
1474 uint8_t data[8]; // Content to overwrite.
1475 };
1476
1497};
1498#define SLANG_UUID_IShaderTable \
1499 { \
1500 0xa721522c, 0xdf31, 0x4c2f, \
1501 { \
1502 0xa5, 0xe7, 0x3b, 0xe0, 0x12, 0x4b, 0x31, 0x78 \
1503 } \
1504 }
1505
1507{
1508public:
1510};
1511#define SLANG_UUID_IPipelineState \
1512 { \
1513 0xca7e57d, 0x8a90, 0x44f3, \
1514 { \
1515 0xbd, 0xb1, 0xfe, 0x9b, 0x35, 0x3f, 0x5a, 0x72 \
1516 } \
1517 }
1518
1519
1521{
1522 int32_t minX;
1523 int32_t minY;
1524 int32_t maxX;
1525 int32_t maxY;
1526};
1527
1529{
1530 float originX = 0.0f;
1531 float originY = 0.0f;
1532 float extentX = 0.0f;
1533 float extentY = 0.0f;
1534 float minZ = 0.0f;
1535 float maxZ = 1.0f;
1536};
1537
1549#define SLANG_UUID_IFrameBuffer \
1550 { \
1551 0xf0c0d9a, 0x4ef3, 0x4e18, \
1552 { \
1553 0x9b, 0xa9, 0x34, 0x60, 0xea, 0x69, 0x87, 0x95 \
1554 } \
1555 }
1556
1558{
1559 enum class Type
1560 {
1561 Unknown,
1564 XLibHandle,
1565 };
1568 static WindowHandle FromHwnd(void* hwnd)
1569 {
1570 WindowHandle handle = {};
1572 handle.handleValues[0] = (intptr_t)(hwnd);
1573 return handle;
1574 }
1575 static WindowHandle FromNSWindow(void* nswindow)
1576 {
1577 WindowHandle handle = {};
1579 handle.handleValues[0] = (intptr_t)(nswindow);
1580 return handle;
1581 }
1582 static WindowHandle FromXWindow(void* xdisplay, uint32_t xwindow)
1583 {
1584 WindowHandle handle = {};
1586 handle.handleValues[0] = (intptr_t)(xdisplay);
1587 handle.handleValues[1] = xwindow;
1588 return handle;
1589 }
1590};
1591
1593{
1594 enum Enum
1595 {
1597 Back = 2
1599};
1600
1632#define SLANG_UUID_IRenderPassLayout \
1633 { \
1634 0xdaab0b1a, 0xf45d, 0x4ae9, \
1635 { \
1636 0xbf, 0x2c, 0xe0, 0xbb, 0x76, 0x7d, 0xfa, 0xd1 \
1637 } \
1638 }
1639
1647
1649{
1650public:
1651 struct Desc
1652 {
1655 };
1656
1657public:
1659 getResult(GfxIndex queryIndex, GfxCount count, uint64_t* data) = 0;
1661};
1662#define SLANG_UUID_IQueryPool \
1663 { \
1664 0xc2cc3784, 0x12da, 0x480a, \
1665 { \
1666 0xa8, 0x74, 0x8b, 0x31, 0x96, 0x1c, 0xa4, 0x36 \
1667 } \
1668 }
1669
1670
1672{
1674 0x77ea6383,
1675 0xbe3d,
1676 0x40aa,
1677 {0x8b, 0x45, 0xfd, 0xf0, 0xd7, 0x5b, 0xfa, 0x34});
1678
1679public:
1681 virtual SLANG_NO_THROW void SLANG_MCALL
1682 writeTimestamp(IQueryPool* queryPool, GfxIndex queryIndex) = 0;
1683};
1684
1691
1699
1708
1710{
1711 int8_t x;
1712 int8_t y;
1713};
1714
1716{
1717 enum Enum : uint32_t
1718 {
1719 None = 0,
1724};
1725
1727{
1728 Float16 = 0,
1729 Float32 = 1,
1730 Float64 = 2,
1731 SInt8 = 3,
1732 SInt16 = 4,
1733 SInt32 = 5,
1734 SInt64 = 6,
1735 UInt8 = 7,
1736 UInt16 = 8,
1737 UInt32 = 9,
1738 UInt64 = 10,
1739 SInt8Packed = 11,
1740 UInt8Packed = 12,
1741 FloatE4M3 = 13,
1742 FloatE5M2 = 14,
1743};
1744
1754
1755
1757{
1758 // {F99A00E9-ED50-4088-8A0E-3B26755031EA}
1760 0xf99a00e9,
1761 0xed50,
1762 0x4088,
1763 {0x8a, 0xe, 0x3b, 0x26, 0x75, 0x50, 0x31, 0xea});
1764
1765public:
1767 IBufferResource* dst,
1768 Offset dstOffset,
1769 IBufferResource* src,
1770 Offset srcOffset,
1771 Size size) = 0;
1772
1777 ITextureResource* dst,
1778 ResourceState dstState,
1779 SubresourceRange dstSubresource,
1781 ITextureResource* src,
1782 ResourceState srcState,
1783 SubresourceRange srcSubresource,
1785 ITextureResource::Extents extent) = 0;
1786
1789 IBufferResource* dst,
1790 Offset dstOffset,
1791 Size dstSize,
1792 Size dstRowStride,
1793 ITextureResource* src,
1794 ResourceState srcState,
1795 SubresourceRange srcSubresource,
1797 ITextureResource::Extents extent) = 0;
1799 ITextureResource* dst,
1800 SubresourceRange subResourceRange,
1803 ITextureResource::SubresourceData* subResourceData,
1804 GfxCount subResourceDataCount) = 0;
1805 virtual SLANG_NO_THROW void SLANG_MCALL
1806 uploadBufferData(IBufferResource* dst, Offset offset, Size size, void* data) = 0;
1808 GfxCount count,
1809 ITextureResource* const* textures,
1810 ResourceState src,
1811 ResourceState dst) = 0;
1813 ITextureResource* texture,
1814 SubresourceRange subresourceRange,
1815 ResourceState src,
1816 ResourceState dst) = 0;
1818 GfxCount count,
1819 IBufferResource* const* buffers,
1820 ResourceState src,
1821 ResourceState dst) = 0;
1823 IResourceView* view,
1824 ClearValue* clearValue,
1827 ITextureResource* source,
1828 ResourceState sourceState,
1829 SubresourceRange sourceRange,
1830 ITextureResource* dest,
1831 ResourceState destState,
1832 SubresourceRange destRange) = 0;
1834 IQueryPool* queryPool,
1835 GfxIndex index,
1836 GfxCount count,
1837 IBufferResource* buffer,
1838 Offset offset) = 0;
1839 virtual SLANG_NO_THROW void SLANG_MCALL
1840 beginDebugEvent(const char* name, float rgbColor[3]) = 0;
1843 {
1844 textureBarrier(1, &texture, src, dst);
1845 }
1847 {
1848 bufferBarrier(1, &buffer, src, dst);
1849 }
1850};
1851
1853{
1854 // {7A8D56D0-53E6-4AD6-85F7-D14DC110FDCE}
1856 0x7a8d56d0,
1857 0x53e6,
1858 0x4ad6,
1859 {0x85, 0xf7, 0xd1, 0x4d, 0xc1, 0x10, 0xfd, 0xce})
1860public:
1861 // Sets the current pipeline state. This method returns a transient shader object for
1862 // writing shader parameters. This shader object will not retain any resources or
1863 // sub-shader-objects bound to it. The user must be responsible for ensuring that any
1864 // resources or shader objects that is set into `outRootShaderObject` stays alive during
1865 // the execution of the command buffer.
1867 bindPipeline(IPipelineState* state, IShaderObject** outRootShaderObject) = 0;
1869 {
1870 IShaderObject* rootObject = nullptr;
1871 SLANG_RETURN_NULL_ON_FAIL(bindPipeline(state, &rootObject));
1872 return rootObject;
1873 }
1874
1875 // Sets the current pipeline state along with a pre-created mutable root shader object.
1878
1879 virtual SLANG_NO_THROW void SLANG_MCALL
1880 setViewports(GfxCount count, const Viewport* viewports) = 0;
1881 virtual SLANG_NO_THROW void SLANG_MCALL
1882 setScissorRects(GfxCount count, const ScissorRect* scissors) = 0;
1883
1885 inline void setViewportAndScissor(Viewport const& viewport)
1886 {
1887 setViewports(1, &viewport);
1888 ScissorRect rect = {};
1889 rect.maxX = static_cast<gfx::Int>(viewport.extentX);
1890 rect.maxY = static_cast<gfx::Int>(viewport.extentY);
1891 setScissorRects(1, &rect);
1892 }
1893
1896 GfxIndex startSlot,
1897 GfxCount slotCount,
1898 IBufferResource* const* buffers,
1899 const Offset* offsets) = 0;
1900 inline void setVertexBuffer(GfxIndex slot, IBufferResource* buffer, Offset offset = 0)
1901 {
1902 setVertexBuffers(slot, 1, &buffer, &offset);
1903 }
1904
1905 virtual SLANG_NO_THROW void SLANG_MCALL
1906 setIndexBuffer(IBufferResource* buffer, Format indexFormat, Offset offset = 0) = 0;
1908 draw(GfxCount vertexCount, GfxIndex startVertex = 0) = 0;
1910 drawIndexed(GfxCount indexCount, GfxIndex startIndex = 0, GfxIndex baseVertex = 0) = 0;
1912 GfxCount maxDrawCount,
1913 IBufferResource* argBuffer,
1914 Offset argOffset,
1915 IBufferResource* countBuffer = nullptr,
1916 Offset countOffset = 0) = 0;
1918 GfxCount maxDrawCount,
1919 IBufferResource* argBuffer,
1920 Offset argOffset,
1921 IBufferResource* countBuffer = nullptr,
1922 Offset countOffset = 0) = 0;
1923 virtual SLANG_NO_THROW void SLANG_MCALL setStencilReference(uint32_t referenceValue) = 0;
1925 GfxCount samplesPerPixel,
1926 GfxCount pixelCount,
1927 const SamplePosition* samplePositions) = 0;
1929 GfxCount vertexCount,
1930 GfxCount instanceCount,
1931 GfxIndex startVertex,
1932 GfxIndex startInstanceLocation) = 0;
1934 GfxCount indexCount,
1935 GfxCount instanceCount,
1936 GfxIndex startIndexLocation,
1937 GfxIndex baseVertexLocation,
1938 GfxIndex startInstanceLocation) = 0;
1939 virtual SLANG_NO_THROW Result SLANG_MCALL drawMeshTasks(int x, int y, int z) = 0;
1940};
1941
1943{
1944 // {88AA9322-82F7-4FE6-A68A-29C7FE798737}
1946 0x88aa9322,
1947 0x82f7,
1948 0x4fe6,
1949 {0xa6, 0x8a, 0x29, 0xc7, 0xfe, 0x79, 0x87, 0x37})
1950
1951public:
1952 // Sets the current pipeline state. This method returns a transient shader object for
1953 // writing shader parameters. This shader object will not retain any resources or
1954 // sub-shader-objects bound to it. The user must be responsible for ensuring that any
1955 // resources or shader objects that is set into `outRooShaderObject` stays alive during
1956 // the execution of the command buffer.
1958 bindPipeline(IPipelineState* state, IShaderObject** outRootShaderObject) = 0;
1960 {
1961 IShaderObject* rootObject = nullptr;
1962 SLANG_RETURN_NULL_ON_FAIL(bindPipeline(state, &rootObject));
1963 return rootObject;
1964 }
1965 // Sets the current pipeline state along with a pre-created mutable root shader object.
1968 virtual SLANG_NO_THROW Result SLANG_MCALL dispatchCompute(int x, int y, int z) = 0;
1971};
1972
1974{
1975 Clone,
1976 Compact
1977};
1978
1987
1989{
1991 0x9a672b87,
1992 0x5035,
1993 0x45e3,
1994 {0x96, 0x7c, 0x1f, 0x85, 0xcd, 0xb3, 0x63, 0x4f})
1995public:
1996 virtual SLANG_NO_THROW void SLANG_MCALL buildAccelerationStructure(
1998 GfxCount propertyQueryCount,
1999 AccelerationStructureQueryDesc* queryDescs) = 0;
2005 GfxCount accelerationStructureCount,
2006 IAccelerationStructure* const* accelerationStructures,
2007 GfxCount queryCount,
2008 AccelerationStructureQueryDesc* queryDescs) = 0;
2009 virtual SLANG_NO_THROW void SLANG_MCALL
2011 virtual SLANG_NO_THROW void SLANG_MCALL
2013
2015 bindPipeline(IPipelineState* state, IShaderObject** outRootObject) = 0;
2016 // Sets the current pipeline state along with a pre-created mutable root shader object.
2019
2024 GfxIndex rayGenShaderIndex,
2025 IShaderTable* shaderTable,
2026 GfxCount width,
2027 GfxCount height,
2028 GfxCount depth) = 0;
2029};
2030
2032{
2033public:
2034 // Only one encoder may be open at a time. User must call `ICommandEncoder::endEncoding`
2035 // before calling other `encode*Commands` methods.
2036 // Once `endEncoding` is called, the `ICommandEncoder` object becomes obsolete and is
2037 // invalid for further use. To continue recording, the user must request a new encoder
2038 // object by calling one of the `encode*Commands` methods again.
2040 IRenderPassLayout* renderPass,
2041 IFramebuffer* framebuffer,
2042 IRenderCommandEncoder** outEncoder) = 0;
2044 IRenderPassLayout* renderPass,
2045 IFramebuffer* framebuffer)
2046 {
2047 IRenderCommandEncoder* result;
2048 encodeRenderCommands(renderPass, framebuffer, &result);
2049 return result;
2050 }
2051
2052 virtual SLANG_NO_THROW void SLANG_MCALL
2055 {
2056 IComputeCommandEncoder* result;
2057 encodeComputeCommands(&result);
2058 return result;
2059 }
2060
2061 virtual SLANG_NO_THROW void SLANG_MCALL
2064 {
2066 encodeResourceCommands(&result);
2067 return result;
2068 }
2069
2070 virtual SLANG_NO_THROW void SLANG_MCALL
2073 {
2075 encodeRayTracingCommands(&result);
2076 return result;
2077 }
2078
2080
2082};
2083#define SLANG_UUID_ICommandBuffer \
2084 { \
2085 0x5d56063f, 0x91d4, 0x4723, \
2086 { \
2087 0xa7, 0xa7, 0x7a, 0x15, 0xaf, 0x93, 0xeb, 0x48 \
2088 } \
2089 }
2090
2097#define SLANG_UUID_ICommandBufferD3D12 \
2098 { \
2099 0xd56b7616, 0x6c14, 0x4841, \
2100 { \
2101 0x9d, 0x9c, 0x7b, 0x7f, 0xdb, 0x9f, 0xd9, 0xb8 \
2102 } \
2103 }
2104
2106{
2107public:
2108 enum class QueueType
2109 {
2110 Graphics
2111 };
2112 struct Desc
2113 {
2115 };
2116
2117 // For D3D12, this is the pointer to the queue. For Vulkan, this is the queue itself.
2118 typedef uint64_t NativeHandle;
2119
2121
2123 GfxCount count,
2124 ICommandBuffer* const* commandBuffers,
2125 IFence* fenceToSignal,
2126 uint64_t newFenceValue) = 0;
2128 ICommandBuffer* commandBuffer,
2129 IFence* fenceToSignal = nullptr,
2130 uint64_t newFenceValue = 0)
2131 {
2132 executeCommandBuffers(1, &commandBuffer, fenceToSignal, newFenceValue);
2133 }
2134
2136
2138
2141 waitForFenceValuesOnDevice(GfxCount fenceCount, IFence** fences, uint64_t* waitValues) = 0;
2142};
2143#define SLANG_UUID_ICommandQueue \
2144 { \
2145 0x14e2bed0, 0xad0, 0x4dc8, \
2146 { \
2147 0xb3, 0x41, 0x6, 0x3f, 0xe7, 0x2d, 0xbf, 0xe \
2148 } \
2149 }
2150
2152{
2153public:
2154 struct Flags
2155 {
2156 enum Enum
2157 {
2158 None = 0,
2160 };
2161 };
2172
2173 // Waits until GPU commands issued before last call to `finish()` has been completed, and resets
2174 // all transient resources holds by the heap.
2175 // This method must be called before using the transient heap to issue new GPU commands.
2176 // In most situations this method should be called at the beginning of each frame.
2178
2179 // Must be called when the application has done using this heap to issue commands. In most
2180 // situations this method should be called at the end of each frame.
2182
2183 // Command buffers are one-time use. Once it is submitted to the queue via
2184 // `executeCommandBuffers` a command buffer is no longer valid to be used any more. Command
2185 // buffers must be closed before submission. The current D3D12 implementation has a limitation
2186 // that only one command buffer maybe recorded at a time. User must finish recording a command
2187 // buffer before creating another command buffer.
2189 createCommandBuffer(ICommandBuffer** outCommandBuffer) = 0;
2191 {
2194 return result;
2195 }
2196};
2197#define SLANG_UUID_ITransientResourceHeap \
2198 { \
2199 0xcd48bd29, 0xee72, 0x41b8, \
2200 { \
2201 0xbc, 0xff, 0xa, 0x2b, 0x3a, 0xaa, 0x6d, 0xeb \
2202 } \
2203 }
2204
2206{
2207public:
2209 {
2211 Sampler
2212 };
2214 DescriptorType type,
2215 GfxCount count,
2216 Offset& outDescriptorOffset,
2217 void** outD3DDescriptorHeapHandle) = 0;
2218};
2219#define SLANG_UUID_ITransientResourceHeapD3D12 \
2220 { \
2221 0x9bc6a8bc, 0x5f7a, 0x454a, \
2222 { \
2223 0x93, 0xef, 0x3b, 0x10, 0x5b, 0xb7, 0x63, 0x7e \
2224 } \
2225 }
2226
2228{
2229public:
2239
2242 getImage(GfxIndex index, ITextureResource** outResource) = 0;
2243
2246
2250
2254
2255 // Check if the window is occluded.
2257
2258 // Toggle full screen mode.
2260};
2261#define SLANG_UUID_ISwapchain \
2262 { \
2263 0xbe91ba6c, 0x784, 0x4308, \
2264 { \
2265 0xa1, 0x0, 0x19, 0xc3, 0x66, 0x83, 0x44, 0xb2 \
2266 } \
2267 }
2268
2270{
2271 uint8_t luid[16];
2272
2273 bool operator==(const AdapterLUID& other) const
2274 {
2275 for (size_t i = 0; i < sizeof(AdapterLUID::luid); ++i)
2276 if (luid[i] != other.luid[i])
2277 return false;
2278 return true;
2279 }
2280 bool operator!=(const AdapterLUID& other) const { return !this->operator==(other); }
2281};
2282
2284{
2285 // Descriptive name of the adapter.
2286 char name[128];
2287
2288 // Unique identifier for the vendor (only available for D3D and Vulkan).
2289 uint32_t vendorID;
2290
2291 // Unique identifier for the physical device among devices from the vendor (only available for
2292 // D3D and Vulkan)
2293 uint32_t deviceID;
2294
2295 // Logically unique identifier of the adapter.
2297};
2298
2300{
2301public:
2303 : m_blob(blob)
2304 {
2305 }
2306
2308 {
2309 return reinterpret_cast<const AdapterInfo*>(m_blob ? m_blob->getBufferPointer() : nullptr);
2310 }
2311
2313 {
2314 return (GfxCount)(m_blob ? m_blob->getBufferSize() / sizeof(AdapterInfo) : 0);
2315 }
2316
2317private:
2319};
2320
2360
2362{
2364
2366
2368
2370
2374
2376 const char* apiName = nullptr;
2377
2379 const char* adapterName = nullptr;
2380
2383};
2384
2386{
2387 Info,
2388 Warning,
2389 Error
2390};
2392{
2393 Layer,
2394 Driver,
2395 Slang
2396};
2398{
2399public:
2400 virtual SLANG_NO_THROW void SLANG_MCALL
2401 handleMessage(DebugMessageType type, DebugMessageSource source, const char* message) = 0;
2402};
2403
2405{
2406public:
2408 {
2409 slang::IGlobalSession* slangGlobalSession =
2410 nullptr; // (optional) A slang global session object. If null will create automatically.
2411
2413
2414 char const* const* searchPaths = nullptr;
2416
2417 slang::PreprocessorMacroDesc const* preprocessorMacros = nullptr;
2419
2420 const char* targetProfile = nullptr; // (optional) Target shader profile. If null this will
2421 // be set to platform dependent default.
2426 };
2427
2429 {
2430 // The root directory for the shader cache. If not set, shader cache is disabled.
2431 const char* shaderCachePath = nullptr;
2432 // The maximum number of entries stored in the cache. By default, there is no limit.
2434 };
2435
2437 {
2439 };
2440
2441 struct Desc
2442 {
2443 // The underlying API/Platform of the device.
2445 // The device's handles (if they exist) and their associated API. For D3D12, this contains a
2446 // single InteropHandle for the ID3D12Device. For Vulkan, the first InteropHandle is the
2447 // VkInstance, the second is the VkPhysicalDevice, and the third is the VkDevice. For CUDA,
2448 // this only contains a single value for the CUDADevice.
2450 // LUID of the adapter to use. Use getGfxAdapters() to get a list of available adapters.
2451 const AdapterLUID* adapterLUID = nullptr;
2452 // Number of required features.
2454 // Array of required feature names, whose size is `requiredFeatureCount`.
2455 const char** requiredFeatures = nullptr;
2456 // A command dispatcher object that intercepts and handles actual low-level API call.
2458 // The slot (typically UAV) used to identify NVAPI intrinsics. If >=0 NVAPI is required.
2460 // Configurations for the shader cache.
2462 // Configurations for Slang compiler.
2464
2466 void** extendedDescs = nullptr;
2467 };
2468
2471
2472 virtual SLANG_NO_THROW bool SLANG_MCALL hasFeature(const char* feature) = 0;
2473
2476 getFeatures(const char** outFeatures, Size bufferSize, GfxCount* outFeatureCount) = 0;
2477
2480
2482 getSlangSession(slang::ISession** outSlangSession) = 0;
2483
2485 {
2487 getSlangSession(result.writeRef());
2488 return result;
2489 }
2490
2492 const ITransientResourceHeap::Desc& desc,
2493 ITransientResourceHeap** outHeap) = 0;
2501
2517 const ITextureResource::Desc& desc,
2518 const ITextureResource::SubresourceData* initData,
2519 ITextureResource** outResource) = 0;
2520
2524 const ITextureResource::Desc& desc,
2525 const ITextureResource::SubresourceData* initData = nullptr)
2526 {
2527 ComPtr<ITextureResource> resource;
2528 SLANG_RETURN_NULL_ON_FAIL(createTextureResource(desc, initData, resource.writeRef()));
2529 return resource;
2530 }
2531
2533 InteropHandle handle,
2534 const ITextureResource::Desc& srcDesc,
2535 ITextureResource** outResource) = 0;
2536
2538 InteropHandle handle,
2539 const ITextureResource::Desc& srcDesc,
2540 const Size size,
2541 ITextureResource** outResource) = 0;
2542
2545 const IBufferResource::Desc& desc,
2546 const void* initData,
2547 IBufferResource** outResource) = 0;
2548
2550 const IBufferResource::Desc& desc,
2551 const void* initData = nullptr)
2552 {
2553 ComPtr<IBufferResource> resource;
2554 SLANG_RETURN_NULL_ON_FAIL(createBufferResource(desc, initData, resource.writeRef()));
2555 return resource;
2556 }
2557
2559 InteropHandle handle,
2560 const IBufferResource::Desc& srcDesc,
2561 IBufferResource** outResource) = 0;
2562
2564 InteropHandle handle,
2565 const IBufferResource::Desc& srcDesc,
2566 IBufferResource** outResource) = 0;
2567
2570
2572 {
2573 ComPtr<ISamplerState> sampler;
2575 return sampler;
2576 }
2577
2579 ITextureResource* texture,
2580 IResourceView::Desc const& desc,
2581 IResourceView** outView) = 0;
2582
2584 ITextureResource* texture,
2585 IResourceView::Desc const& desc)
2586 {
2589 return view;
2590 }
2591
2593 IBufferResource* buffer,
2594 IBufferResource* counterBuffer,
2595 IResourceView::Desc const& desc,
2596 IResourceView** outView) = 0;
2597
2599 IBufferResource* buffer,
2600 IBufferResource* counterBuffer,
2601 IResourceView::Desc const& desc)
2602 {
2604 SLANG_RETURN_NULL_ON_FAIL(createBufferView(buffer, counterBuffer, desc, view.writeRef()));
2605 return view;
2606 }
2607
2609 IFramebufferLayout::Desc const& desc,
2610 IFramebufferLayout** outFrameBuffer) = 0;
2617
2619 createFramebuffer(IFramebuffer::Desc const& desc, IFramebuffer** outFrameBuffer) = 0;
2626
2628 const IRenderPassLayout::Desc& desc,
2629 IRenderPassLayout** outRenderPassLayout) = 0;
2636
2638 ISwapchain::Desc const& desc,
2639 WindowHandle window,
2640 ISwapchain** outSwapchain) = 0;
2642 {
2643 ComPtr<ISwapchain> swapchain;
2644 SLANG_RETURN_NULL_ON_FAIL(createSwapchain(desc, window, swapchain.writeRef()));
2645 return swapchain;
2646 }
2647
2650
2652 {
2653 ComPtr<IInputLayout> layout;
2655 return layout;
2656 }
2657
2659 Size vertexSize,
2660 InputElementDesc const* inputElements,
2661 GfxCount inputElementCount,
2662 IInputLayout** outLayout)
2663 {
2664 VertexStreamDesc streamDesc = {vertexSize, InputSlotClass::PerVertex, 0};
2665
2666 IInputLayout::Desc inputLayoutDesc = {};
2667 inputLayoutDesc.inputElementCount = inputElementCount;
2668 inputLayoutDesc.inputElements = inputElements;
2669 inputLayoutDesc.vertexStreamCount = 1;
2670 inputLayoutDesc.vertexStreams = &streamDesc;
2671 return createInputLayout(inputLayoutDesc, outLayout);
2672 }
2673
2675 Size vertexSize,
2676 InputElementDesc const* inputElements,
2677 GfxCount inputElementCount)
2678 {
2679 ComPtr<IInputLayout> layout;
2681 createInputLayout(vertexSize, inputElements, inputElementCount, layout.writeRef()));
2682 return layout;
2683 }
2684
2688 {
2691 return queue;
2692 }
2693
2695 slang::TypeReflection* type,
2696 ShaderObjectContainerType container,
2697 IShaderObject** outObject) = 0;
2698
2699 inline ComPtr<IShaderObject> createShaderObject(slang::TypeReflection* type)
2700 {
2701 ComPtr<IShaderObject> object;
2703 createShaderObject(type, ShaderObjectContainerType::None, object.writeRef()));
2704 return object;
2705 }
2706
2708 slang::TypeReflection* type,
2709 ShaderObjectContainerType container,
2710 IShaderObject** outObject) = 0;
2711
2713 slang::TypeLayoutReflection* typeLayout,
2714 IShaderObject** outObject) = 0;
2715
2717 slang::TypeLayoutReflection* typeLayout,
2718 IShaderObject** outObject) = 0;
2719
2722
2725
2727 const IShaderProgram::Desc& desc,
2728 IShaderProgram** outProgram,
2729 ISlangBlob** outDiagnosticBlob = nullptr) = 0;
2730
2732 {
2733 ComPtr<IShaderProgram> program;
2735 return program;
2736 }
2737
2739 const IShaderProgram::CreateDesc2& createDesc,
2740 IShaderProgram** outProgram,
2741 ISlangBlob** outDiagnosticBlob = nullptr) = 0;
2742
2744 const GraphicsPipelineStateDesc& desc,
2745 IPipelineState** outState) = 0;
2746
2753
2756
2763
2765 const RayTracingPipelineStateDesc& desc,
2766 IPipelineState** outState) = 0;
2767
2770 ITextureResource* resource,
2771 ResourceState state,
2772 ISlangBlob** outBlob,
2773 Size* outRowPitch,
2774 Size* outPixelSize) = 0;
2775
2777 readBufferResource(IBufferResource* buffer, Offset offset, Size size, ISlangBlob** outBlob) = 0;
2778
2781
2783 createQueryPool(const IQueryPool::Desc& desc, IQueryPool** outPool) = 0;
2784
2785
2787 const IAccelerationStructure::BuildInputs& buildInputs,
2788 IAccelerationStructure::PrebuildInfo* outPrebuildInfo) = 0;
2789
2792 IAccelerationStructure** outView) = 0;
2793
2795 createFence(const IFence::Desc& desc, IFence** outFence) = 0;
2796
2800 GfxCount fenceCount,
2801 IFence** fences,
2802 uint64_t* values,
2803 bool waitForAll,
2804 uint64_t timeout) = 0;
2805
2807 const ITextureResource::Desc& desc,
2808 Size* outSize,
2809 Size* outAlignment) = 0;
2810
2812
2814 CooperativeVectorProperties* properties,
2815 uint32_t* propertyCount) = 0;
2816
2818 slang::ISession* slangSession,
2819 slang::TypeReflection* type,
2820 ShaderObjectContainerType container,
2821 IShaderObject** outObject) = 0;
2822
2824 slang::ISession* slangSession,
2825 slang::TypeReflection* type,
2826 ShaderObjectContainerType container,
2827 IShaderObject** outObject) = 0;
2828};
2829
2830#define SLANG_UUID_IDevice \
2831 { \
2832 0x715bdf26, 0x5135, 0x11eb, \
2833 { \
2834 0xAE, 0x93, 0x02, 0x42, 0xAC, 0x13, 0x00, 0x02 \
2835 } \
2836 }
2837
2844
2845// These are exclusively used to track hit/miss counts for shader cache entries. Entry hit and
2846// miss counts specifically indicate if the file containing relevant shader code was found in
2847// the cache, while the general hit and miss counts indicate whether the file was both found and
2848// up-to-date.
2856
2857#define SLANG_UUID_IShaderCache \
2858 { \
2859 0x8eccc8ec, 0x5c04, 0x4a51, \
2860 { \
2861 0x99, 0x75, 0x13, 0xf8, 0xfe, 0xa1, 0x59, 0xf3 \
2862 } \
2863 }
2864
2866{
2867public:
2869 IDevice* device,
2870 slang::IComponentType* program,
2871 void* pipelineDesc,
2872 void** outPipelineState) = 0;
2874 IDevice* device,
2875 slang::IComponentType* program,
2876 void* pipelineDesc,
2877 void** outPipelineState) = 0;
2879 IDevice* device,
2880 slang::IComponentType* program,
2881 void* pipelineDesc,
2882 void** outPipelineState) = 0;
2884 beforeCreateRayTracingState(IDevice* device, slang::IComponentType* program) = 0;
2886 afterCreateRayTracingState(IDevice* device, slang::IComponentType* program) = 0;
2887};
2888#define SLANG_UUID_IPipelineCreationAPIDispatcher \
2889 { \
2890 0xc3d5f782, 0xeae1, 0x4da6, \
2891 { \
2892 0xab, 0x40, 0x75, 0x32, 0x31, 0x2, 0xb7, 0xdc \
2893 } \
2894 }
2895
2896#define SLANG_UUID_IVulkanPipelineCreationAPIDispatcher \
2897 { \
2898 0x4fcf1274, 0x8752, 0x4743, \
2899 { \
2900 0xb3, 0x51, 0x47, 0xcb, 0x83, 0x71, 0xef, 0x99 \
2901 } \
2902 }
2903
2904// Global public functions
2905
2906extern "C"
2907{
2910
2913
2916
2919 gfxGetAdapters(DeviceType type, ISlangBlob** outAdaptersBlob);
2920
2923 gfxCreateDevice(const IDevice::Desc* desc, IDevice** outDevice);
2924
2928
2933
2937
2939}
2940
2943{
2944 ComPtr<ISlangBlob> blob;
2945 gfxGetAdapters(type, blob.writeRef());
2946 return AdapterList(blob);
2947}
2948
2949// Extended descs.
2958
2966
2973
2981
2982} // namespace gfx
Definition slang-com-ptr.h:50
SLANG_FORCE_INLINE T ** writeRef()
Get ready for writing (nulls contents)
Definition slang-com-ptr.h:146
Definition slang-gfx.h:2300
AdapterList(ISlangBlob *blob)
Definition slang-gfx.h:2302
const AdapterInfo * getAdapters() const
Definition slang-gfx.h:2307
GfxCount getCount() const
Definition slang-gfx.h:2312
ComPtr< ISlangBlob > m_blob
Definition slang-gfx.h:2318
Definition slang-gfx.h:958
GeometryType
Definition slang-gfx.h:983
Kind
Definition slang-gfx.h:961
virtual SLANG_NO_THROW DeviceAddress SLANG_MCALL getDeviceAddress()=0
Definition slang-gfx.h:673
virtual SLANG_NO_THROW Desc *SLANG_MCALL getDesc()=0
virtual SLANG_NO_THROW Result SLANG_MCALL map(MemoryRange *rangeToRead, void **outPointer)=0
virtual SLANG_NO_THROW DeviceAddress SLANG_MCALL getDeviceAddress()=0
virtual SLANG_NO_THROW Result SLANG_MCALL unmap(MemoryRange *writtenRange)=0
Definition slang-gfx.h:2092
virtual SLANG_NO_THROW void SLANG_MCALL ensureInternalDescriptorHeapsBound()=0
virtual SLANG_NO_THROW void SLANG_MCALL invalidateDescriptorHeapBinding()=0
Definition slang-gfx.h:2032
virtual SLANG_NO_THROW void SLANG_MCALL encodeComputeCommands(IComputeCommandEncoder **outEncoder)=0
virtual SLANG_NO_THROW void SLANG_MCALL encodeResourceCommands(IResourceCommandEncoder **outEncoder)=0
virtual SLANG_NO_THROW Result SLANG_MCALL getNativeHandle(InteropHandle *outHandle)=0
IComputeCommandEncoder * encodeComputeCommands()
Definition slang-gfx.h:2054
IRenderCommandEncoder * encodeRenderCommands(IRenderPassLayout *renderPass, IFramebuffer *framebuffer)
Definition slang-gfx.h:2043
virtual SLANG_NO_THROW void SLANG_MCALL close()=0
IRayTracingCommandEncoder * encodeRayTracingCommands()
Definition slang-gfx.h:2072
IResourceCommandEncoder * encodeResourceCommands()
Definition slang-gfx.h:2063
virtual SLANG_NO_THROW void SLANG_MCALL encodeRayTracingCommands(IRayTracingCommandEncoder **outEncoder)=0
virtual SLANG_NO_THROW void SLANG_MCALL encodeRenderCommands(IRenderPassLayout *renderPass, IFramebuffer *framebuffer, IRenderCommandEncoder **outEncoder)=0
Definition slang-gfx.h:1672
virtual SLANG_NO_THROW void SLANG_MCALL endEncoding()=0
virtual SLANG_NO_THROW void SLANG_MCALL writeTimestamp(IQueryPool *queryPool, GfxIndex queryIndex)=0
SLANG_COM_INTERFACE(0x77ea6383, 0xbe3d, 0x40aa, {0x8b, 0x45, 0xfd, 0xf0, 0xd7, 0x5b, 0xfa, 0x34})
Definition slang-gfx.h:2106
void executeCommandBuffer(ICommandBuffer *commandBuffer, IFence *fenceToSignal=nullptr, uint64_t newFenceValue=0)
Definition slang-gfx.h:2127
QueueType
Definition slang-gfx.h:2109
virtual SLANG_NO_THROW void SLANG_MCALL executeCommandBuffers(GfxCount count, ICommandBuffer *const *commandBuffers, IFence *fenceToSignal, uint64_t newFenceValue)=0
uint64_t NativeHandle
Definition slang-gfx.h:2118
virtual SLANG_NO_THROW Result SLANG_MCALL waitForFenceValuesOnDevice(GfxCount fenceCount, IFence **fences, uint64_t *waitValues)=0
Queues a device side wait for the given fences.
virtual SLANG_NO_THROW const Desc &SLANG_MCALL getDesc()=0
virtual SLANG_NO_THROW void SLANG_MCALL waitOnHost()=0
virtual SLANG_NO_THROW Result SLANG_MCALL getNativeHandle(InteropHandle *outHandle)=0
Definition slang-gfx.h:1943
SLANG_COM_INTERFACE(0x88aa9322, 0x82f7, 0x4fe6, {0xa6, 0x8a, 0x29, 0xc7, 0xfe, 0x79, 0x87, 0x37}) public IShaderObject * bindPipeline(IPipelineState *state)
Definition slang-gfx.h:1959
virtual SLANG_NO_THROW Result SLANG_MCALL dispatchCompute(int x, int y, int z)=0
virtual SLANG_NO_THROW Result SLANG_MCALL bindPipelineWithRootObject(IPipelineState *state, IShaderObject *rootObject)=0
virtual SLANG_NO_THROW Result SLANG_MCALL dispatchComputeIndirect(IBufferResource *cmdBuffer, Offset offset)=0
Definition slang-gfx.h:2398
virtual SLANG_NO_THROW void SLANG_MCALL handleMessage(DebugMessageType type, DebugMessageSource source, const char *message)=0
Definition slang-gfx.h:2405
virtual SLANG_NO_THROW SlangResult SLANG_MCALL readBufferResource(IBufferResource *buffer, Offset offset, Size size, ISlangBlob **outBlob)=0
ComPtr< IFramebufferLayout > createFramebufferLayout(IFramebufferLayout::Desc const &desc)
Definition slang-gfx.h:2611
Result createInputLayout(Size vertexSize, InputElementDesc const *inputElements, GfxCount inputElementCount, IInputLayout **outLayout)
Definition slang-gfx.h:2658
virtual SLANG_NO_THROW Result SLANG_MCALL createShaderTable(const IShaderTable::Desc &desc, IShaderTable **outTable)=0
virtual SLANG_NO_THROW const DeviceInfo &SLANG_MCALL getDeviceInfo() const =0
Get the type of this renderer
virtual SLANG_NO_THROW Result SLANG_MCALL getFeatures(const char **outFeatures, Size bufferSize, GfxCount *outFeatureCount)=0
Returns a list of features supported by the renderer.
virtual SLANG_NO_THROW Result SLANG_MCALL createTransientResourceHeap(const ITransientResourceHeap::Desc &desc, ITransientResourceHeap **outHeap)=0
virtual SLANG_NO_THROW Result SLANG_MCALL createProgram(const IShaderProgram::Desc &desc, IShaderProgram **outProgram, ISlangBlob **outDiagnosticBlob=nullptr)=0
virtual SLANG_NO_THROW Result SLANG_MCALL createMutableShaderObject(slang::TypeReflection *type, ShaderObjectContainerType container, IShaderObject **outObject)=0
ComPtr< IPipelineState > createGraphicsPipelineState(const GraphicsPipelineStateDesc &desc)
Definition slang-gfx.h:2747
virtual SLANG_NO_THROW Result SLANG_MCALL createRayTracingPipelineState(const RayTracingPipelineStateDesc &desc, IPipelineState **outState)=0
virtual SLANG_NO_THROW Result SLANG_MCALL getTextureRowAlignment(Size *outAlignment)=0
virtual SLANG_NO_THROW Result SLANG_MCALL createProgram2(const IShaderProgram::CreateDesc2 &createDesc, IShaderProgram **outProgram, ISlangBlob **outDiagnosticBlob=nullptr)=0
virtual SLANG_NO_THROW Result SLANG_MCALL getCooperativeVectorProperties(CooperativeVectorProperties *properties, uint32_t *propertyCount)=0
ComPtr< ITransientResourceHeap > createTransientResourceHeap(const ITransientResourceHeap::Desc &desc)
Definition slang-gfx.h:2494
virtual SLANG_NO_THROW Result SLANG_MCALL createComputePipelineState(const ComputePipelineStateDesc &desc, IPipelineState **outState)=0
ComPtr< IShaderProgram > createProgram(const IShaderProgram::Desc &desc)
Definition slang-gfx.h:2731
virtual SLANG_NO_THROW Result SLANG_MCALL createSamplerState(ISamplerState::Desc const &desc, ISamplerState **outSampler)=0
virtual SLANG_NO_THROW Result SLANG_MCALL createBufferView(IBufferResource *buffer, IBufferResource *counterBuffer, IResourceView::Desc const &desc, IResourceView **outView)=0
virtual SLANG_NO_THROW bool SLANG_MCALL hasFeature(const char *feature)=0
virtual SLANG_NO_THROW Result SLANG_MCALL getFormatSupportedResourceStates(Format format, ResourceStateSet *outStates)=0
virtual SLANG_NO_THROW Result SLANG_MCALL getAccelerationStructurePrebuildInfo(const IAccelerationStructure::BuildInputs &buildInputs, IAccelerationStructure::PrebuildInfo *outPrebuildInfo)=0
virtual SLANG_NO_THROW SlangResult SLANG_MCALL readTextureResource(ITextureResource *resource, ResourceState state, ISlangBlob **outBlob, Size *outRowPitch, Size *outPixelSize)=0
Read back texture resource and stores the result in outBlob.
virtual SLANG_NO_THROW Result SLANG_MCALL createRenderPassLayout(const IRenderPassLayout::Desc &desc, IRenderPassLayout **outRenderPassLayout)=0
virtual SLANG_NO_THROW Result SLANG_MCALL createShaderObject(slang::TypeReflection *type, ShaderObjectContainerType container, IShaderObject **outObject)=0
virtual SLANG_NO_THROW Result SLANG_MCALL createBufferFromSharedHandle(InteropHandle handle, const IBufferResource::Desc &srcDesc, IBufferResource **outResource)=0
virtual SLANG_NO_THROW Result SLANG_MCALL createTextureFromNativeHandle(InteropHandle handle, const ITextureResource::Desc &srcDesc, ITextureResource **outResource)=0
virtual SLANG_NO_THROW Result SLANG_MCALL createMutableShaderObjectFromTypeLayout(slang::TypeLayoutReflection *typeLayout, IShaderObject **outObject)=0
virtual SLANG_NO_THROW Result SLANG_MCALL createGraphicsPipelineState(const GraphicsPipelineStateDesc &desc, IPipelineState **outState)=0
virtual SLANG_NO_THROW Result SLANG_MCALL createTextureView(ITextureResource *texture, IResourceView::Desc const &desc, IResourceView **outView)=0
virtual SLANG_NO_THROW Result SLANG_MCALL createShaderObject2(slang::ISession *slangSession, slang::TypeReflection *type, ShaderObjectContainerType container, IShaderObject **outObject)=0
virtual SLANG_NO_THROW Result SLANG_MCALL getSlangSession(slang::ISession **outSlangSession)=0
ComPtr< ISwapchain > createSwapchain(ISwapchain::Desc const &desc, WindowHandle window)
Definition slang-gfx.h:2641
ComPtr< ICommandQueue > createCommandQueue(const ICommandQueue::Desc &desc)
Definition slang-gfx.h:2687
virtual SLANG_NO_THROW Result SLANG_MCALL createFramebuffer(IFramebuffer::Desc const &desc, IFramebuffer **outFrameBuffer)=0
virtual SLANG_NO_THROW Result SLANG_MCALL getTextureAllocationInfo(const ITextureResource::Desc &desc, Size *outSize, Size *outAlignment)=0
ComPtr< IRenderPassLayout > createRenderPassLayout(const IRenderPassLayout::Desc &desc)
Definition slang-gfx.h:2630
virtual SLANG_NO_THROW Result SLANG_MCALL waitForFences(GfxCount fenceCount, IFence **fences, uint64_t *values, bool waitForAll, uint64_t timeout)=0
virtual SLANG_NO_THROW Result SLANG_MCALL createInputLayout(IInputLayout::Desc const &desc, IInputLayout **outLayout)=0
ComPtr< IResourceView > createBufferView(IBufferResource *buffer, IBufferResource *counterBuffer, IResourceView::Desc const &desc)
Definition slang-gfx.h:2598
virtual SLANG_NO_THROW Result SLANG_MCALL createFramebufferLayout(IFramebufferLayout::Desc const &desc, IFramebufferLayout **outFrameBuffer)=0
ComPtr< IResourceView > createTextureView(ITextureResource *texture, IResourceView::Desc const &desc)
Definition slang-gfx.h:2583
virtual SLANG_NO_THROW Result SLANG_MCALL createTextureFromSharedHandle(InteropHandle handle, const ITextureResource::Desc &srcDesc, const Size size, ITextureResource **outResource)=0
virtual SLANG_NO_THROW Result SLANG_MCALL createQueryPool(const IQueryPool::Desc &desc, IQueryPool **outPool)=0
virtual SLANG_NO_THROW Result SLANG_MCALL createAccelerationStructure(const IAccelerationStructure::CreateDesc &desc, IAccelerationStructure **outView)=0
ComPtr< ISamplerState > createSamplerState(ISamplerState::Desc const &desc)
Definition slang-gfx.h:2571
virtual SLANG_NO_THROW Result SLANG_MCALL createShaderObjectFromTypeLayout(slang::TypeLayoutReflection *typeLayout, IShaderObject **outObject)=0
virtual SLANG_NO_THROW Result SLANG_MCALL getNativeDeviceHandles(InteropHandles *outHandles)=0
SLANG_NO_THROW ComPtr< ITextureResource > createTextureResource(const ITextureResource::Desc &desc, const ITextureResource::SubresourceData *initData=nullptr)
Definition slang-gfx.h:2523
SLANG_NO_THROW ComPtr< IBufferResource > createBufferResource(const IBufferResource::Desc &desc, const void *initData=nullptr)
Definition slang-gfx.h:2549
virtual SLANG_NO_THROW Result SLANG_MCALL createCommandQueue(const ICommandQueue::Desc &desc, ICommandQueue **outQueue)=0
ComPtr< IShaderObject > createShaderObject(slang::TypeReflection *type)
Definition slang-gfx.h:2699
virtual SLANG_NO_THROW Result SLANG_MCALL createMutableRootShaderObject(IShaderProgram *program, IShaderObject **outObject)=0
ComPtr< IInputLayout > createInputLayout(Size vertexSize, InputElementDesc const *inputElements, GfxCount inputElementCount)
Definition slang-gfx.h:2674
virtual SLANG_NO_THROW Result SLANG_MCALL createBufferFromNativeHandle(InteropHandle handle, const IBufferResource::Desc &srcDesc, IBufferResource **outResource)=0
ComPtr< slang::ISession > getSlangSession()
Definition slang-gfx.h:2484
virtual SLANG_NO_THROW Result SLANG_MCALL createBufferResource(const IBufferResource::Desc &desc, const void *initData, IBufferResource **outResource)=0
Create a buffer resource
ComPtr< IInputLayout > createInputLayout(IInputLayout::Desc const &desc)
Definition slang-gfx.h:2651
virtual SLANG_NO_THROW Result SLANG_MCALL createMutableShaderObject2(slang::ISession *slangSession, slang::TypeReflection *type, ShaderObjectContainerType container, IShaderObject **outObject)=0
virtual SLANG_NO_THROW Result SLANG_MCALL createTextureResource(const ITextureResource::Desc &desc, const ITextureResource::SubresourceData *initData, ITextureResource **outResource)=0
ComPtr< IFramebuffer > createFramebuffer(IFramebuffer::Desc const &desc)
Definition slang-gfx.h:2620
ComPtr< IPipelineState > createComputePipelineState(const ComputePipelineStateDesc &desc)
Definition slang-gfx.h:2757
virtual SLANG_NO_THROW Result SLANG_MCALL createFence(const IFence::Desc &desc, IFence **outFence)=0
virtual SLANG_NO_THROW Result SLANG_MCALL createSwapchain(ISwapchain::Desc const &desc, WindowHandle window, ISwapchain **outSwapchain)=0
Definition slang-gfx.h:1123
virtual SLANG_NO_THROW Result SLANG_MCALL getCurrentValue(uint64_t *outValue)=0
Returns the currently signaled value on the device.
virtual SLANG_NO_THROW Result SLANG_MCALL getSharedHandle(InteropHandle *outHandle)=0
virtual SLANG_NO_THROW Result SLANG_MCALL setCurrentValue(uint64_t value)=0
Signals the fence from the host with the specified value.
virtual SLANG_NO_THROW Result SLANG_MCALL getNativeHandle(InteropHandle *outNativeHandle)=0
Definition slang-gfx.h:1539
Definition slang-gfx.h:1397
Definition slang-gfx.h:604
Definition slang-gfx.h:2866
virtual SLANG_NO_THROW Result SLANG_MCALL afterCreateRayTracingState(IDevice *device, slang::IComponentType *program)=0
virtual SLANG_NO_THROW Result SLANG_MCALL createComputePipelineState(IDevice *device, slang::IComponentType *program, void *pipelineDesc, void **outPipelineState)=0
virtual SLANG_NO_THROW Result SLANG_MCALL createGraphicsPipelineState(IDevice *device, slang::IComponentType *program, void *pipelineDesc, void **outPipelineState)=0
virtual SLANG_NO_THROW Result SLANG_MCALL beforeCreateRayTracingState(IDevice *device, slang::IComponentType *program)=0
virtual SLANG_NO_THROW Result SLANG_MCALL createMeshPipelineState(IDevice *device, slang::IComponentType *program, void *pipelineDesc, void **outPipelineState)=0
Definition slang-gfx.h:1507
virtual SLANG_NO_THROW Result SLANG_MCALL getNativeHandle(InteropHandle *outHandle)=0
Definition slang-gfx.h:1649
virtual SLANG_NO_THROW Result SLANG_MCALL reset()=0
virtual SLANG_NO_THROW Result SLANG_MCALL getResult(GfxIndex queryIndex, GfxCount count, uint64_t *data)=0
Definition slang-gfx.h:1989
virtual SLANG_NO_THROW Result SLANG_MCALL dispatchRays(GfxIndex rayGenShaderIndex, IShaderTable *shaderTable, GfxCount width, GfxCount height, GfxCount depth)=0
virtual SLANG_NO_THROW Result SLANG_MCALL bindPipeline(IPipelineState *state, IShaderObject **outRootObject)=0
virtual SLANG_NO_THROW void SLANG_MCALL queryAccelerationStructureProperties(GfxCount accelerationStructureCount, IAccelerationStructure *const *accelerationStructures, GfxCount queryCount, AccelerationStructureQueryDesc *queryDescs)=0
virtual SLANG_NO_THROW void SLANG_MCALL serializeAccelerationStructure(DeviceAddress dest, IAccelerationStructure *source)=0
virtual SLANG_NO_THROW Result SLANG_MCALL bindPipelineWithRootObject(IPipelineState *state, IShaderObject *rootObject)=0
virtual SLANG_NO_THROW void SLANG_MCALL deserializeAccelerationStructure(IAccelerationStructure *dest, DeviceAddress source)=0
virtual SLANG_COM_INTERFACE(0x9a672b87, 0x5035, 0x45e3, {0x96, 0x7c, 0x1f, 0x85, 0xcd, 0xb3, 0x63, 0x4f}) public SLANG_NO_THROW void SLANG_MCALL copyAccelerationStructure(IAccelerationStructure *dest, IAccelerationStructure *src, AccelerationStructureCopyMode mode)=0
Definition slang-gfx.h:1853
virtual SLANG_NO_THROW void SLANG_MCALL setStencilReference(uint32_t referenceValue)=0
virtual SLANG_NO_THROW void SLANG_MCALL setVertexBuffers(GfxIndex startSlot, GfxCount slotCount, IBufferResource *const *buffers, const Offset *offsets)=0
void setViewportAndScissor(Viewport const &viewport)
Sets the viewport, and sets the scissor rect to match the viewport.
Definition slang-gfx.h:1885
virtual SLANG_NO_THROW void SLANG_MCALL setPrimitiveTopology(PrimitiveTopology topology)=0
virtual SLANG_NO_THROW Result SLANG_MCALL draw(GfxCount vertexCount, GfxIndex startVertex=0)=0
virtual SLANG_NO_THROW Result SLANG_MCALL drawInstanced(GfxCount vertexCount, GfxCount instanceCount, GfxIndex startVertex, GfxIndex startInstanceLocation)=0
void setVertexBuffer(GfxIndex slot, IBufferResource *buffer, Offset offset=0)
Definition slang-gfx.h:1900
virtual SLANG_NO_THROW Result SLANG_MCALL drawIndexedInstanced(GfxCount indexCount, GfxCount instanceCount, GfxIndex startIndexLocation, GfxIndex baseVertexLocation, GfxIndex startInstanceLocation)=0
virtual SLANG_NO_THROW Result SLANG_MCALL drawMeshTasks(int x, int y, int z)=0
SLANG_COM_INTERFACE(0x7a8d56d0, 0x53e6, 0x4ad6, {0x85, 0xf7, 0xd1, 0x4d, 0xc1, 0x10, 0xfd, 0xce}) public IShaderObject * bindPipeline(IPipelineState *state)
Definition slang-gfx.h:1868
virtual SLANG_NO_THROW void SLANG_MCALL setScissorRects(GfxCount count, const ScissorRect *scissors)=0
virtual SLANG_NO_THROW Result SLANG_MCALL drawIndexed(GfxCount indexCount, GfxIndex startIndex=0, GfxIndex baseVertex=0)=0
virtual SLANG_NO_THROW Result SLANG_MCALL setSamplePositions(GfxCount samplesPerPixel, GfxCount pixelCount, const SamplePosition *samplePositions)=0
virtual SLANG_NO_THROW void SLANG_MCALL setIndexBuffer(IBufferResource *buffer, Format indexFormat, Offset offset=0)=0
virtual SLANG_NO_THROW Result SLANG_MCALL bindPipelineWithRootObject(IPipelineState *state, IShaderObject *rootObject)=0
virtual SLANG_NO_THROW void SLANG_MCALL setViewports(GfxCount count, const Viewport *viewports)=0
virtual SLANG_NO_THROW Result SLANG_MCALL drawIndirect(GfxCount maxDrawCount, IBufferResource *argBuffer, Offset argOffset, IBufferResource *countBuffer=nullptr, Offset countOffset=0)=0
virtual SLANG_NO_THROW Result SLANG_MCALL drawIndexedIndirect(GfxCount maxDrawCount, IBufferResource *argBuffer, Offset argOffset, IBufferResource *countBuffer=nullptr, Offset countOffset=0)=0
Definition slang-gfx.h:1602
TargetStoreOp
Definition slang-gfx.h:1611
TargetLoadOp
Definition slang-gfx.h:1605
Definition slang-gfx.h:1757
virtual SLANG_NO_THROW void SLANG_MCALL copyTexture(ITextureResource *dst, ResourceState dstState, SubresourceRange dstSubresource, ITextureResource::Offset3D dstOffset, ITextureResource *src, ResourceState srcState, SubresourceRange srcSubresource, ITextureResource::Offset3D srcOffset, ITextureResource::Extents extent)=0
virtual SLANG_NO_THROW void SLANG_MCALL resolveQuery(IQueryPool *queryPool, GfxIndex index, GfxCount count, IBufferResource *buffer, Offset offset)=0
virtual SLANG_NO_THROW void SLANG_MCALL uploadBufferData(IBufferResource *dst, Offset offset, Size size, void *data)=0
SLANG_COM_INTERFACE(0xf99a00e9, 0xed50, 0x4088, {0x8a, 0xe, 0x3b, 0x26, 0x75, 0x50, 0x31, 0xea})
virtual SLANG_NO_THROW void SLANG_MCALL uploadTextureData(ITextureResource *dst, SubresourceRange subResourceRange, ITextureResource::Offset3D offset, ITextureResource::Extents extent, ITextureResource::SubresourceData *subResourceData, GfxCount subResourceDataCount)=0
virtual SLANG_NO_THROW void SLANG_MCALL clearResourceView(IResourceView *view, ClearValue *clearValue, ClearResourceViewFlags::Enum flags)=0
virtual SLANG_NO_THROW void SLANG_MCALL textureSubresourceBarrier(ITextureResource *texture, SubresourceRange subresourceRange, ResourceState src, ResourceState dst)=0
virtual SLANG_NO_THROW void SLANG_MCALL textureBarrier(GfxCount count, ITextureResource *const *textures, ResourceState src, ResourceState dst)=0
virtual SLANG_NO_THROW void SLANG_MCALL copyBuffer(IBufferResource *dst, Offset dstOffset, IBufferResource *src, Offset srcOffset, Size size)=0
virtual SLANG_NO_THROW void SLANG_MCALL endDebugEvent()=0
virtual SLANG_NO_THROW void SLANG_MCALL resolveResource(ITextureResource *source, ResourceState sourceState, SubresourceRange sourceRange, ITextureResource *dest, ResourceState destState, SubresourceRange destRange)=0
virtual SLANG_NO_THROW void SLANG_MCALL beginDebugEvent(const char *name, float rgbColor[3])=0
void bufferBarrier(IBufferResource *buffer, ResourceState src, ResourceState dst)
Definition slang-gfx.h:1846
virtual SLANG_NO_THROW void SLANG_MCALL copyTextureToBuffer(IBufferResource *dst, Offset dstOffset, Size dstSize, Size dstRowStride, ITextureResource *src, ResourceState srcState, SubresourceRange srcSubresource, ITextureResource::Offset3D srcOffset, ITextureResource::Extents extent)=0
Copies texture to a buffer. Each row is aligned to kTexturePitchAlignment.
virtual SLANG_NO_THROW void SLANG_MCALL bufferBarrier(GfxCount count, IBufferResource *const *buffers, ResourceState src, ResourceState dst)=0
void textureBarrier(ITextureResource *texture, ResourceState src, ResourceState dst)
Definition slang-gfx.h:1842
Definition slang-gfx.h:623
virtual SLANG_NO_THROW Result SLANG_MCALL setDebugName(const char *name)=0
virtual SLANG_NO_THROW Result SLANG_MCALL getSharedHandle(InteropHandle *outHandle)=0
virtual SLANG_NO_THROW Type SLANG_MCALL getType()=0
virtual SLANG_NO_THROW Result SLANG_MCALL getNativeResourceHandle(InteropHandle *outHandle)=0
Type
Definition slang-gfx.h:629
@ TextureCube
A cubemap consists of 6 Texture2D like faces
@ Buffer
A buffer (like a constant/index/vertex buffer)
@ Texture3D
A 3d texture
@ Texture2D
A 2d texture
@ Texture1D
A 1d texture
virtual SLANG_NO_THROW const char *SLANG_MCALL getDebugName()=0
Definition slang-gfx.h:906
virtual SLANG_NO_THROW Desc *SLANG_MCALL getViewDesc()=0
virtual SLANG_NO_THROW Result SLANG_MCALL getNativeHandle(InteropHandle *outNativeHandle)=0
Type
Definition slang-gfx.h:909
Definition slang-gfx.h:873
virtual SLANG_NO_THROW Result SLANG_MCALL getNativeHandle(InteropHandle *outNativeHandle)=0
Definition slang-gfx.h:2850
virtual SLANG_NO_THROW Result SLANG_MCALL resetShaderCacheStats()=0
virtual SLANG_NO_THROW Result SLANG_MCALL clearShaderCache()=0
virtual SLANG_NO_THROW Result SLANG_MCALL getShaderCacheStats(ShaderCacheStats *outStats)=0
Definition slang-gfx.h:1189
virtual SLANG_NO_THROW const void *SLANG_MCALL getRawData()=0
virtual SLANG_NO_THROW Result SLANG_MCALL setData(ShaderOffset const &offset, void const *data, Size size)=0
virtual SLANG_NO_THROW Result SLANG_MCALL setResource(ShaderOffset const &offset, IResourceView *resourceView)=0
virtual SLANG_NO_THROW Result SLANG_MCALL getCurrentVersion(ITransientResourceHeap *transientHeap, IShaderObject **outObject)=0
virtual SLANG_NO_THROW GfxCount SLANG_MCALL getEntryPointCount()=0
ComPtr< IShaderObject > getEntryPoint(GfxIndex index)
Definition slang-gfx.h:1237
virtual SLANG_NO_THROW Size SLANG_MCALL getSize()=0
virtual SLANG_NO_THROW Result SLANG_MCALL setObject(ShaderOffset const &offset, IShaderObject *object)=0
virtual SLANG_NO_THROW Result SLANG_MCALL setSpecializationArgs(ShaderOffset const &offset, const slang::SpecializationArg *args, GfxCount count)=0
virtual SLANG_NO_THROW Result SLANG_MCALL getEntryPoint(GfxIndex index, IShaderObject **entryPoint)=0
virtual SLANG_NO_THROW slang::TypeLayoutReflection *SLANG_MCALL getElementTypeLayout()=0
virtual SLANG_NO_THROW Result SLANG_MCALL setSampler(ShaderOffset const &offset, ISamplerState *sampler)=0
ComPtr< IShaderObject > getObject(ShaderOffset const &offset)
Definition slang-gfx.h:1231
virtual SLANG_NO_THROW Result SLANG_MCALL getObject(ShaderOffset const &offset, IShaderObject **object)=0
virtual SLANG_NO_THROW Result SLANG_MCALL setConstantBufferOverride(IBufferResource *constantBuffer)=0
Use the provided constant buffer instead of the internally created one.
virtual SLANG_NO_THROW ShaderObjectContainerType SLANG_MCALL getContainerType()=0
virtual SLANG_NO_THROW Result SLANG_MCALL setCombinedTextureSampler(ShaderOffset const &offset, IResourceView *textureView, ISamplerState *sampler)=0
Definition slang-gfx.h:152
DownstreamLinkMode
Definition slang-gfx.h:167
LinkingStyle
Definition slang-gfx.h:156
virtual SLANG_NO_THROW slang::TypeReflection *SLANG_MCALL findTypeByName(const char *name)=0
Definition slang-gfx.h:1467
Definition slang-gfx.h:2228
virtual SLANG_NO_THROW const Desc &SLANG_MCALL getDesc()=0
virtual SLANG_NO_THROW Result SLANG_MCALL present()=0
Present the next image in the swapchain.
virtual SLANG_NO_THROW Result SLANG_MCALL setFullScreenMode(bool mode)=0
virtual SLANG_NO_THROW Result SLANG_MCALL resize(GfxCount width, GfxCount height)=0
virtual SLANG_NO_THROW int SLANG_MCALL acquireNextImage()=0
virtual SLANG_NO_THROW Result SLANG_MCALL getImage(GfxIndex index, ITextureResource **outResource)=0
Returns the back buffer image at index.
virtual SLANG_NO_THROW bool SLANG_MCALL isOccluded()=0
Definition slang-gfx.h:741
static const GfxCount kRemainingTextureSize
Definition slang-gfx.h:743
virtual SLANG_NO_THROW Desc *SLANG_MCALL getDesc()=0
Definition slang-gfx.h:2206
DescriptorType
Definition slang-gfx.h:2209
virtual SLANG_NO_THROW Result SLANG_MCALL allocateTransientDescriptorTable(DescriptorType type, GfxCount count, Offset &outDescriptorOffset, void **outD3DDescriptorHeapHandle)=0
Definition slang-gfx.h:2152
virtual SLANG_NO_THROW Result SLANG_MCALL synchronizeAndReset()=0
virtual SLANG_NO_THROW Result SLANG_MCALL finish()=0
ComPtr< ICommandBuffer > createCommandBuffer()
Definition slang-gfx.h:2190
virtual SLANG_NO_THROW Result SLANG_MCALL createCommandBuffer(ICommandBuffer **outCommandBuffer)=0
Definition slang-com-ptr.h:10
uint8_t Type
Definition slang-gfx.h:1359
@ EnableGreen
Definition slang-gfx.h:1364
@ EnableAll
Definition slang-gfx.h:1367
@ EnableRed
Definition slang-gfx.h:1363
@ EnableBlue
Definition slang-gfx.h:1365
@ EnableNone
Definition slang-gfx.h:1362
@ EnableAlpha
Definition slang-gfx.h:1366
Definition slang-gfx.h:43
SlangInt Int
Definition slang-gfx.h:50
InputSlotClass
Definition slang-gfx.h:469
const uint64_t kTimeoutInfinite
Definition slang-gfx.h:58
TextureAddressingMode
Definition slang-gfx.h:856
PrimitiveTopology
Definition slang-gfx.h:501
SLANG_GFX_API SlangResult SLANG_MCALL gfxReportLiveObjects()
uint64_t DeviceAddress
Definition slang-gfx.h:52
ProjectionStyle
Definition slang-gfx.h:107
SLANG_GFX_API SlangResult SLANG_MCALL gfxGetFormatInfo(Format format, FormatInfo *outInfo)
Gets information about the format
SLANG_GFX_API SlangResult SLANG_MCALL gfxSetDebugCallback(IDebugCallback *callback)
MemoryType
Describes how memory for the resource should be allocated for CPU access.
Definition slang-gfx.h:577
size_t Size
Definition slang-gfx.h:55
AccelerationStructureCopyMode
Definition slang-gfx.h:1974
ResourceState
Definition slang-gfx.h:510
BindingStyle
The style of the binding
Definition slang-gfx.h:119
int GfxCount
Definition slang-gfx.h:54
DebugMessageSource
Definition slang-gfx.h:2392
PrimitiveType
Definition slang-gfx.h:493
DeviceType
Definition slang-gfx.h:91
const GfxCount kMaxRenderTargetCount
Definition slang-gfx.h:139
SLANG_GFX_API const char *SLANG_MCALL gfxGetDeviceTypeName(DeviceType type)
FillMode
Definition slang-gfx.h:1265
SlangUInt UInt
Definition slang-gfx.h:51
RenderTargetWriteMask::Type RenderTargetWriteMaskT
Definition slang-gfx.h:1370
BlendFactor
Definition slang-gfx.h:1337
TextureAspect
Definition slang-gfx.h:718
int GfxIndex
Definition slang-gfx.h:53
SLANG_GFX_API SlangResult SLANG_MCALL gfxCreateDevice(const IDevice::Desc *desc, IDevice **outDevice)
Given a type returns a function that can construct it, or nullptr if there isn't one
TextureFilteringMode
Definition slang-gfx.h:850
TextureReductionOp
Definition slang-gfx.h:865
AccessFlag
Definition slang-gfx.h:132
ShaderObjectContainerType
Definition slang-gfx.h:1182
size_t Offset
Definition slang-gfx.h:56
SLANG_GFX_API bool SLANG_MCALL gfxIsTypelessFormat(Format format)
Checks if format is typeless
SLANG_GFX_API SlangResult SLANG_MCALL gfxGetAdapters(DeviceType type, ISlangBlob **outAdaptersBlob)
Gets a list of available adapters for a given device type
CullMode
Definition slang-gfx.h:1271
FrontFaceMode
Definition slang-gfx.h:1278
StencilOp
Definition slang-gfx.h:1253
StructType
Definition slang-gfx.h:61
@ D3D12ExperimentalFeaturesDesc
DebugMessageType
Definition slang-gfx.h:2386
InteropHandleAPI
Definition slang-gfx.h:584
BlendOp
Definition slang-gfx.h:1328
SlangResult Result
Definition slang-gfx.h:47
Format
Definition slang-gfx.h:336
@ R16G16B16A16_TYPELESS
@ R32_FLOAT_X32_TYPELESS
@ R10G10B10A2_TYPELESS
@ R32G32B32A32_TYPELESS
SLANG_GFX_API bool SLANG_MCALL gfxIsCompressedFormat(Format format)
Checks if format is compressed
CooperativeVectorComponentType
Definition slang-gfx.h:1727
StageType
Definition slang-gfx.h:70
QueryType
Definition slang-gfx.h:1641
@ AccelerationStructureCompactedSize
@ AccelerationStructureSerializedSize
@ AccelerationStructureCurrentSize
LogicOp
Definition slang-gfx.h:1323
ComparisonFunc
Definition slang-gfx.h:838
ShaderModuleSourceType
Definition slang-gfx.h:144
SLANG_GFX_API void SLANG_MCALL gfxEnableDebugLayer(bool enable)
Definition slang.h:963
#define SLANG_RETURN_NULL_ON_FAIL(x)
Helper macro that will return nullptr on failure.
Definition slang-com-helper.h:54
int32_t SlangResult
Definition slang-cpp-prelude.h:300
#define SLANG_NO_THROW
Definition slang-cpp-prelude.h:268
#define SLANG_MCALL
Definition slang-cpp-prelude.h:282
#define SLANG_COM_INTERFACE(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7)
Definition slang-cpp-prelude.h:310
#define SLANG_GFX_API
Definition slang-gfx.h:27
__INTPTR_TYPE__ intptr_t
Definition slang-llvm.h:146
int32_t SlangInt
Definition slang.h:559
unsigned int SlangTargetFlags
Flags to control code generation behavior of a compilation target
Definition slang.h:733
SlangLineDirectiveMode
Definition slang.h:786
@ SLANG_LINE_DIRECTIVE_MODE_DEFAULT
Definition slang.h:787
SlangMatrixLayoutMode
Definition slang.h:829
@ SLANG_MATRIX_LAYOUT_ROW_MAJOR
Definition slang.h:831
uint32_t SlangUInt
Definition slang.h:560
SlangOptimizationLevel
Definition slang.h:918
@ SLANG_OPTIMIZATION_LEVEL_DEFAULT
Definition slang.h:920
SlangFloatingPointMode
Definition slang.h:764
@ SLANG_FLOATING_POINT_MODE_DEFAULT
Definition slang.h:765
constexpr SlangTargetFlags kDefaultTargetFlags
Definition slang.h:756
Definition slang.h:1460
virtual SLANG_NO_THROW size_t SLANG_MCALL getBufferSize()=0
Definition slang-cpp-prelude.h:303
void ** outObject
Definition slang.h:1406
Definition slang-cpp-types.h:61
Definition slang-gfx.h:1980
GfxIndex firstQueryIndex
Definition slang-gfx.h:1985
IQueryPool * queryPool
Definition slang-gfx.h:1983
QueryType queryType
Definition slang-gfx.h:1981
Definition slang-gfx.h:2284
AdapterLUID luid
Definition slang-gfx.h:2296
char name[128]
Definition slang-gfx.h:2286
uint32_t deviceID
Definition slang-gfx.h:2293
uint32_t vendorID
Definition slang-gfx.h:2289
Definition slang-gfx.h:2270
uint8_t luid[16]
Definition slang-gfx.h:2271
bool operator==(const AdapterLUID &other) const
Definition slang-gfx.h:2273
bool operator!=(const AdapterLUID &other) const
Definition slang-gfx.h:2280
Definition slang-gfx.h:1373
BlendOp op
Definition slang-gfx.h:1376
BlendFactor dstFactor
Definition slang-gfx.h:1375
BlendFactor srcFactor
Definition slang-gfx.h:1374
Definition slang-gfx.h:1389
TargetBlendDesc targets[kMaxRenderTargetCount]
Definition slang-gfx.h:1390
GfxCount targetCount
Definition slang-gfx.h:1391
bool alphaToCoverageEnable
Definition slang-gfx.h:1393
Definition slang-gfx.h:712
Size size
Size in bytes.
Definition slang-gfx.h:714
Offset offset
Offset in bytes.
Definition slang-gfx.h:713
Definition slang-gfx.h:1716
Enum
Definition slang-gfx.h:1718
@ ClearDepth
Definition slang-gfx.h:1720
@ ClearStencil
Definition slang-gfx.h:1721
@ None
Definition slang-gfx.h:1719
@ FloatClearValues
Definition slang-gfx.h:1722
Definition slang-gfx.h:706
DepthStencilClearValue depthStencil
Definition slang-gfx.h:708
ColorClearValue color
Definition slang-gfx.h:707
Definition slang-gfx.h:1432
IShaderProgram * program
Definition slang-gfx.h:1433
void * d3d12RootSignatureOverride
Definition slang-gfx.h:1434
Definition slang-gfx.h:1746
CooperativeVectorComponentType matrixInterpretation
Definition slang-gfx.h:1749
bool transpose
Definition slang-gfx.h:1752
CooperativeVectorComponentType resultType
Definition slang-gfx.h:1751
CooperativeVectorComponentType inputInterpretation
Definition slang-gfx.h:1748
CooperativeVectorComponentType inputType
Definition slang-gfx.h:1747
CooperativeVectorComponentType biasInterpretation
Definition slang-gfx.h:1750
Definition slang-gfx.h:2960
const char * rootParameterShaderAttributeName
Definition slang-gfx.h:2962
StructType structType
Definition slang-gfx.h:2961
bool debugBreakOnD3D12Error
Definition slang-gfx.h:2963
uint32_t highestShaderModel
Definition slang-gfx.h:2964
Definition slang-gfx.h:2951
void * configurationStructs
Definition slang-gfx.h:2955
uint32_t * configurationStructSizes
Definition slang-gfx.h:2956
uint32_t numFeatures
Definition slang-gfx.h:2953
const void * featureIIDs
Definition slang-gfx.h:2954
StructType structType
Definition slang-gfx.h:2952
Definition slang-gfx.h:696
uint32_t stencil
Definition slang-gfx.h:698
float depth
Definition slang-gfx.h:697
Definition slang-gfx.h:1292
DepthStencilOpDesc frontFace
Definition slang-gfx.h:1300
uint32_t stencilWriteMask
Definition slang-gfx.h:1299
uint32_t stencilRef
Definition slang-gfx.h:1303
DepthStencilOpDesc backFace
Definition slang-gfx.h:1301
bool stencilEnable
Definition slang-gfx.h:1297
ComparisonFunc depthFunc
Definition slang-gfx.h:1295
uint32_t stencilReadMask
Definition slang-gfx.h:1298
bool depthTestEnable
Definition slang-gfx.h:1293
bool depthWriteEnable
Definition slang-gfx.h:1294
Definition slang-gfx.h:1284
StencilOp stencilDepthFailOp
Definition slang-gfx.h:1286
ComparisonFunc stencilFunc
Definition slang-gfx.h:1288
StencilOp stencilFailOp
Definition slang-gfx.h:1285
StencilOp stencilPassOp
Definition slang-gfx.h:1287
Definition slang-gfx.h:2362
DeviceLimits limits
Definition slang-gfx.h:2365
float identityProjectionMatrix[16]
Definition slang-gfx.h:2373
DeviceType deviceType
Definition slang-gfx.h:2363
const char * adapterName
The name of the graphics adapter.
Definition slang-gfx.h:2379
uint64_t timestampFrequency
The clock frequency used in timestamp queries.
Definition slang-gfx.h:2382
ProjectionStyle projectionStyle
Definition slang-gfx.h:2369
BindingStyle bindingStyle
Definition slang-gfx.h:2367
const char * apiName
The name of the graphics API being used by this device.
Definition slang-gfx.h:2376
Definition slang-gfx.h:2322
uint32_t maxTextureDimensionCube
Maximum dimensions for cube textures.
Definition slang-gfx.h:2330
uint32_t maxTextureDimension3D
Maximum dimensions for 3D textures.
Definition slang-gfx.h:2328
uint32_t maxShaderVisibleSamplers
Maximum samplers visible in a shader stage.
Definition slang-gfx.h:2358
uint32_t maxVertexInputElements
Maximum number of vertex input elements in a graphics pipeline.
Definition slang-gfx.h:2335
uint32_t maxFramebufferDimensions[3]
Maximum framebuffer dimensions.
Definition slang-gfx.h:2355
uint32_t maxComputeThreadGroupSize[3]
Maximum dimensions of a thread group.
Definition slang-gfx.h:2346
uint32_t maxVertexStreamStride
Maximum stride of a vertex stream.
Definition slang-gfx.h:2341
uint32_t maxComputeDispatchThreadGroups[3]
Maximum number of thread groups per dimension in a single dispatch.
Definition slang-gfx.h:2348
uint32_t maxVertexStreams
Maximum number of vertex streams in a graphics pipeline.
Definition slang-gfx.h:2339
uint32_t maxComputeThreadsPerGroup
Maximum number of threads per thread group.
Definition slang-gfx.h:2344
uint32_t maxViewportDimensions[2]
Maximum viewport dimensions.
Definition slang-gfx.h:2353
uint32_t maxTextureArrayLayers
Maximum number of texture layers.
Definition slang-gfx.h:2332
uint32_t maxVertexInputElementOffset
Maximum offset of a vertex input element in the vertex stream.
Definition slang-gfx.h:2337
uint32_t maxTextureDimension2D
Maximum dimensions for 2D textures.
Definition slang-gfx.h:2326
uint32_t maxTextureDimension1D
Maximum dimension for 1D textures.
Definition slang-gfx.h:2324
uint32_t maxViewports
Maximum number of viewports per pipeline.
Definition slang-gfx.h:2351
Definition slang-gfx.h:1593
Enum
Definition slang-gfx.h:1595
@ Front
Definition slang-gfx.h:1596
@ Back
Definition slang-gfx.h:1597
Definition slang-gfx.h:456
uint8_t channelType
Definition slang-gfx.h:459
GfxCount blockWidth
The width of a block in pixels.
Definition slang-gfx.h:464
GfxCount pixelsPerBlock
The number of pixels contained in a block.
Definition slang-gfx.h:463
GfxCount blockHeight
The height of a block in pixels.
Definition slang-gfx.h:465
GfxCount channelCount
The amount of channels in the format. Only set if the channelType is set
Definition slang-gfx.h:458
Size blockSizeInBytes
The size of a block in bytes.
Definition slang-gfx.h:462
Definition slang-gfx.h:1420
IInputLayout * inputLayout
Definition slang-gfx.h:1423
DepthStencilDesc depthStencil
Definition slang-gfx.h:1426
IShaderProgram * program
Definition slang-gfx.h:1421
BlendDesc blend
Definition slang-gfx.h:1428
PrimitiveType primitiveType
Definition slang-gfx.h:1425
IFramebufferLayout * framebufferLayout
Definition slang-gfx.h:1424
RasterizerDesc rasterizer
Definition slang-gfx.h:1427
Definition slang-gfx.h:1448
const char * anyHitEntryPoint
Definition slang-gfx.h:1451
const char * intersectionEntryPoint
Definition slang-gfx.h:1452
const char * hitGroupName
Definition slang-gfx.h:1449
const char * closestHitEntryPoint
Definition slang-gfx.h:1450
Definition slang-gfx.h:1105
IAccelerationStructure * source
Definition slang-gfx.h:1107
DeviceAddress scratchData
Definition slang-gfx.h:1109
IAccelerationStructure * dest
Definition slang-gfx.h:1108
BuildInputs inputs
Definition slang-gfx.h:1106
Definition slang-gfx.h:967
Enum
Definition slang-gfx.h:971
@ AllowCompaction
Definition slang-gfx.h:974
@ AllowUpdate
Definition slang-gfx.h:973
@ PerformUpdate
Definition slang-gfx.h:978
@ PreferFastBuild
Definition slang-gfx.h:976
@ PreferFastTrace
Definition slang-gfx.h:975
@ MinimizeMemory
Definition slang-gfx.h:977
@ None
Definition slang-gfx.h:972
Definition slang-gfx.h:1080
Kind kind
Definition slang-gfx.h:1081
const GeometryDesc * geometryDescs
Definition slang-gfx.h:1093
GfxCount descCount
Definition slang-gfx.h:1085
BuildFlags::Enum flags
Definition slang-gfx.h:1083
DeviceAddress instanceDescs
Definition slang-gfx.h:1089
Definition slang-gfx.h:1097
Kind kind
Definition slang-gfx.h:1098
Offset offset
Definition slang-gfx.h:1100
Size size
Definition slang-gfx.h:1101
IBufferResource * buffer
Definition slang-gfx.h:1099
TriangleDesc triangles
Definition slang-gfx.h:1040
union gfx::IAccelerationStructure::GeometryDesc::@2 content
ProceduralAABBDesc proceduralAABBs
Definition slang-gfx.h:1041
GeometryFlags::Enum flags
Definition slang-gfx.h:1037
GeometryType type
Definition slang-gfx.h:1036
@ None
Definition slang-gfx.h:994
@ NoDuplicateAnyHitInvocation
Definition slang-gfx.h:996
@ Opaque
Definition slang-gfx.h:995
@ TriangleFacingCullDisable
Definition slang-gfx.h:1052
@ TriangleFrontCounterClockwise
Definition slang-gfx.h:1053
uint32_t flags
Definition slang-gfx.h:1068
float transform[3][4]
Definition slang-gfx.h:1064
uint32_t instanceContributionToHitGroupIndex
Definition slang-gfx.h:1067
uint32_t instanceID
Definition slang-gfx.h:1065
uint32_t instanceMask
Definition slang-gfx.h:1066
DeviceAddress accelerationStructure
Definition slang-gfx.h:1069
Size updateScratchDataSize
Definition slang-gfx.h:1076
Size scratchDataSize
Definition slang-gfx.h:1075
Size resultDataMaxSize
Definition slang-gfx.h:1074
DeviceAddress data
Pointer to an array of ProceduralAABB values in device memory.
Definition slang-gfx.h:1028
GfxCount count
Number of AABBs.
Definition slang-gfx.h:1025
Size stride
Stride in bytes of the AABB values array.
Definition slang-gfx.h:1031
float minY
Definition slang-gfx.h:1015
float maxY
Definition slang-gfx.h:1018
float minZ
Definition slang-gfx.h:1016
float minX
Definition slang-gfx.h:1014
float maxZ
Definition slang-gfx.h:1019
float maxX
Definition slang-gfx.h:1017
DeviceAddress transform3x4
Definition slang-gfx.h:1002
DeviceAddress vertexData
Definition slang-gfx.h:1008
Format vertexFormat
Definition slang-gfx.h:1004
DeviceAddress indexData
Definition slang-gfx.h:1007
Size vertexStride
Definition slang-gfx.h:1009
GfxCount indexCount
Definition slang-gfx.h:1005
GfxCount vertexCount
Definition slang-gfx.h:1006
Format indexFormat
Definition slang-gfx.h:1003
Definition slang-gfx.h:676
Format format
Definition slang-gfx.h:679
Size sizeInBytes
Total size in bytes
Definition slang-gfx.h:677
Size elementSize
Get the element stride. If > 0, this is a structured buffer
Definition slang-gfx.h:678
Definition slang-gfx.h:2113
QueueType type
Definition slang-gfx.h:2114
Definition slang-gfx.h:2442
InteropHandles existingDeviceHandles
Definition slang-gfx.h:2449
const char ** requiredFeatures
Definition slang-gfx.h:2455
DeviceType deviceType
Definition slang-gfx.h:2444
ISlangUnknown * apiCommandDispatcher
Definition slang-gfx.h:2457
GfxCount extendedDescCount
Definition slang-gfx.h:2465
GfxCount requiredFeatureCount
Definition slang-gfx.h:2453
void ** extendedDescs
Definition slang-gfx.h:2466
const AdapterLUID * adapterLUID
Definition slang-gfx.h:2451
ShaderCacheDesc shaderCache
Definition slang-gfx.h:2461
GfxIndex nvapiExtnSlot
Definition slang-gfx.h:2459
Definition slang-gfx.h:2437
InteropHandle handles[3]
Definition slang-gfx.h:2438
Definition slang-gfx.h:2429
const char * shaderCachePath
Definition slang-gfx.h:2431
GfxCount maxEntryCount
Definition slang-gfx.h:2433
Definition slang-gfx.h:2408
SlangLineDirectiveMode lineDirectiveMode
Definition slang-gfx.h:2425
GfxCount preprocessorMacroCount
Definition slang-gfx.h:2418
char const *const * searchPaths
Definition slang-gfx.h:2414
SlangOptimizationLevel optimizationLevel
Definition slang-gfx.h:2423
SlangFloatingPointMode floatingPointMode
Definition slang-gfx.h:2422
slang::IGlobalSession * slangGlobalSession
Definition slang-gfx.h:2409
SlangMatrixLayoutMode defaultMatrixLayoutMode
Definition slang-gfx.h:2412
GfxCount searchPathCount
Definition slang-gfx.h:2415
slang::PreprocessorMacroDesc const * preprocessorMacros
Definition slang-gfx.h:2417
SlangTargetFlags targetFlags
Definition slang-gfx.h:2424
const char * targetProfile
Definition slang-gfx.h:2420
Definition slang-gfx.h:1126
uint64_t initialValue
Definition slang-gfx.h:1127
bool isShared
Definition slang-gfx.h:1128
Definition slang-gfx.h:1542
IResourceView * depthStencilView
Definition slang-gfx.h:1545
IFramebufferLayout * layout
Definition slang-gfx.h:1546
IResourceView *const * renderTargetViews
Definition slang-gfx.h:1544
GfxCount renderTargetCount
Definition slang-gfx.h:1543
Definition slang-gfx.h:1405
TargetLayout * renderTargets
Definition slang-gfx.h:1407
TargetLayout * depthStencil
Definition slang-gfx.h:1408
GfxCount renderTargetCount
Definition slang-gfx.h:1406
Definition slang-gfx.h:1400
GfxCount sampleCount
Definition slang-gfx.h:1402
Format format
Definition slang-gfx.h:1401
Definition slang-gfx.h:607
VertexStreamDesc const * vertexStreams
Definition slang-gfx.h:610
GfxCount inputElementCount
Definition slang-gfx.h:609
GfxCount vertexStreamCount
Definition slang-gfx.h:611
InputElementDesc const * inputElements
Definition slang-gfx.h:608
Definition slang-gfx.h:1652
GfxCount count
Definition slang-gfx.h:1654
QueryType type
Definition slang-gfx.h:1653
Definition slang-gfx.h:1625
TargetAccessDesc * depthStencilAccess
Definition slang-gfx.h:1629
IFramebufferLayout * framebufferLayout
Definition slang-gfx.h:1626
GfxCount renderTargetCount
Definition slang-gfx.h:1627
TargetAccessDesc * renderTargetAccess
Definition slang-gfx.h:1628
Definition slang-gfx.h:1616
ResourceState finalState
Definition slang-gfx.h:1622
TargetStoreOp storeOp
Definition slang-gfx.h:1619
ResourceState initialState
Definition slang-gfx.h:1621
TargetStoreOp stencilStoreOp
Definition slang-gfx.h:1620
TargetLoadOp stencilLoadOp
Definition slang-gfx.h:1618
TargetLoadOp loadOp
Definition slang-gfx.h:1617
Base class for Descs
Definition slang-gfx.h:641
Type type
Definition slang-gfx.h:642
bool isShared
Definition slang-gfx.h:647
ResourceStateSet allowedStates
Definition slang-gfx.h:644
ResourceState defaultState
Definition slang-gfx.h:643
MemoryType memoryType
Definition slang-gfx.h:645
InteropHandle existingHandle
Definition slang-gfx.h:646
Definition slang-gfx.h:928
Type type
Definition slang-gfx.h:929
BufferRange bufferRange
Definition slang-gfx.h:938
SubresourceRange subresourceRange
Definition slang-gfx.h:936
RenderTargetDesc renderTarget
Definition slang-gfx.h:933
Format format
Definition slang-gfx.h:930
Definition slang-gfx.h:922
IResource::Type shape
Definition slang-gfx.h:924
Definition slang-gfx.h:876
TextureAddressingMode addressU
Definition slang-gfx.h:881
float maxLOD
Definition slang-gfx.h:889
uint32_t maxAnisotropy
Definition slang-gfx.h:885
float mipLODBias
Definition slang-gfx.h:884
float minLOD
Definition slang-gfx.h:888
ComparisonFunc comparisonFunc
Definition slang-gfx.h:886
float borderColor[4]
Definition slang-gfx.h:887
TextureAddressingMode addressV
Definition slang-gfx.h:882
TextureAddressingMode addressW
Definition slang-gfx.h:883
TextureFilteringMode magFilter
Definition slang-gfx.h:878
TextureFilteringMode mipFilter
Definition slang-gfx.h:879
TextureReductionOp reductionOp
Definition slang-gfx.h:880
TextureFilteringMode minFilter
Definition slang-gfx.h:877
Definition slang-gfx.h:195
ShaderModuleSourceType sourceType
Definition slang-gfx.h:196
Size sourceDataSize
Definition slang-gfx.h:198
void * sourceData
Definition slang-gfx.h:197
GfxCount entryPointCount
Definition slang-gfx.h:202
const char ** entryPointNames
Definition slang-gfx.h:205
Definition slang-gfx.h:173
slang::IComponentType ** slangEntryPoints
Definition slang-gfx.h:188
slang::IComponentType * slangGlobalScope
Definition slang-gfx.h:179
GfxCount entryPointCount
Definition slang-gfx.h:184
LinkingStyle linkingStyle
Definition slang-gfx.h:176
DownstreamLinkMode downstreamLinkMode
Definition slang-gfx.h:191
Definition slang-gfx.h:1478
GfxCount rayGenShaderCount
Definition slang-gfx.h:1479
const ShaderRecordOverwrite * missShaderRecordOverwrites
Definition slang-gfx.h:1485
const char ** rayGenShaderEntryPointNames
Definition slang-gfx.h:1480
GfxCount callableShaderCount
Definition slang-gfx.h:1491
IShaderProgram * program
Definition slang-gfx.h:1495
GfxCount hitGroupCount
Definition slang-gfx.h:1487
GfxCount missShaderCount
Definition slang-gfx.h:1483
const ShaderRecordOverwrite * callableShaderRecordOverwrites
Definition slang-gfx.h:1493
const char ** callableShaderEntryPointNames
Definition slang-gfx.h:1492
const char ** missShaderEntryPointNames
Definition slang-gfx.h:1484
const char ** hitGroupNames
Definition slang-gfx.h:1488
const ShaderRecordOverwrite * rayGenShaderRecordOverwrites
Definition slang-gfx.h:1481
const ShaderRecordOverwrite * hitGroupRecordOverwrites
Definition slang-gfx.h:1489
Definition slang-gfx.h:1471
Offset offset
Definition slang-gfx.h:1472
uint8_t data[8]
Definition slang-gfx.h:1474
Size size
Definition slang-gfx.h:1473
Definition slang-gfx.h:2231
ICommandQueue * queue
Definition slang-gfx.h:2235
Format format
Definition slang-gfx.h:2232
GfxCount height
Definition slang-gfx.h:2233
bool enableVSync
Definition slang-gfx.h:2236
GfxCount imageCount
Definition slang-gfx.h:2234
GfxCount width
Definition slang-gfx.h:2233
Definition slang-gfx.h:770
GfxCount numMipLevels
Number of mip levels - if 0 will create all mip levels
Definition slang-gfx.h:775
Format format
The resources format
Definition slang-gfx.h:776
ClearValue * optimalClearValue
Definition slang-gfx.h:778
SampleDesc sampleDesc
How the resource is sampled
Definition slang-gfx.h:777
Extents size
Definition slang-gfx.h:771
GfxCount arraySize
Array size
Definition slang-gfx.h:773
Definition slang-gfx.h:763
GfxCount depth
Depth (if 3d)
Definition slang-gfx.h:766
GfxCount width
Width in pixels
Definition slang-gfx.h:764
GfxCount height
Height in pixels (if 2d or 3d)
Definition slang-gfx.h:765
Definition slang-gfx.h:745
GfxIndex z
Definition slang-gfx.h:748
GfxIndex y
Definition slang-gfx.h:747
Offset3D(GfxIndex _x, GfxIndex _y, GfxIndex _z)
Definition slang-gfx.h:750
GfxIndex x
Definition slang-gfx.h:746
Definition slang-gfx.h:757
GfxCount numSamples
Number of samples per pixel
Definition slang-gfx.h:758
int quality
The quality measure for the samples
Definition slang-gfx.h:759
Definition slang-gfx.h:801
gfx::Size strideZ
Definition slang-gfx.h:823
gfx::Size strideY
Definition slang-gfx.h:813
void const * data
Pointer to texel data for the subresource tensor.
Definition slang-gfx.h:803
Definition slang-gfx.h:2163
GfxCount accelerationStructureDescriptorCount
Definition slang-gfx.h:2170
Size constantBufferSize
Definition slang-gfx.h:2165
GfxCount uavDescriptorCount
Definition slang-gfx.h:2167
GfxCount srvDescriptorCount
Definition slang-gfx.h:2168
GfxCount constantBufferDescriptorCount
Definition slang-gfx.h:2169
Flags::Enum flags
Definition slang-gfx.h:2164
GfxCount samplerDescriptorCount
Definition slang-gfx.h:2166
Definition slang-gfx.h:2155
Enum
Definition slang-gfx.h:2157
@ AllowResizing
Definition slang-gfx.h:2159
@ None
Definition slang-gfx.h:2158
Definition slang-gfx.h:1686
GfxCount ThreadGroupCountY
Definition slang-gfx.h:1688
GfxCount ThreadGroupCountX
Definition slang-gfx.h:1687
GfxCount ThreadGroupCountZ
Definition slang-gfx.h:1689
Definition slang-gfx.h:1693
GfxIndex StartInstanceLocation
Definition slang-gfx.h:1697
GfxCount VertexCountPerInstance
Definition slang-gfx.h:1694
GfxIndex StartVertexLocation
Definition slang-gfx.h:1696
GfxCount InstanceCount
Definition slang-gfx.h:1695
Definition slang-gfx.h:1701
GfxIndex StartInstanceLocation
Definition slang-gfx.h:1706
GfxIndex BaseVertexLocation
Definition slang-gfx.h:1705
GfxCount IndexCountPerInstance
Definition slang-gfx.h:1702
GfxCount InstanceCount
Definition slang-gfx.h:1703
GfxIndex StartIndexLocation
Definition slang-gfx.h:1704
Definition slang-gfx.h:475
GfxIndex bufferSlotIndex
The index of the vertex stream to fetch this element's data from.
Definition slang-gfx.h:482
GfxIndex semanticIndex
Definition slang-gfx.h:477
Offset offset
Definition slang-gfx.h:480
char const * semanticName
The name of the corresponding parameter in shader code.
Definition slang-gfx.h:476
Format format
The format of the data being fetched for this element.
Definition slang-gfx.h:479
Definition slang-gfx.h:597
uint64_t handleValue
Definition slang-gfx.h:599
InteropHandleAPI api
Definition slang-gfx.h:598
Definition slang-gfx.h:666
uint64_t size
Definition slang-gfx.h:669
uint64_t offset
Definition slang-gfx.h:668
Definition slang-gfx.h:1307
CullMode cullMode
Definition slang-gfx.h:1309
int32_t depthBias
Definition slang-gfx.h:1311
float depthBiasClamp
Definition slang-gfx.h:1312
float slopeScaledDepthBias
Definition slang-gfx.h:1313
bool scissorEnable
Definition slang-gfx.h:1315
bool antialiasedLineEnable
Definition slang-gfx.h:1317
FrontFaceMode frontFace
Definition slang-gfx.h:1310
FillMode fillMode
Definition slang-gfx.h:1308
bool depthClipEnable
Definition slang-gfx.h:1314
uint32_t forcedSampleCount
Definition slang-gfx.h:1319
bool enableConservativeRasterization
Definition slang-gfx.h:1318
bool multisampleEnable
Definition slang-gfx.h:1316
Definition slang-gfx.h:1438
Enum
Definition slang-gfx.h:1440
@ SkipProcedurals
Definition slang-gfx.h:1443
@ None
Definition slang-gfx.h:1441
@ SkipTriangles
Definition slang-gfx.h:1442
Definition slang-gfx.h:1456
IShaderProgram * program
Definition slang-gfx.h:1457
const HitGroupDesc * hitGroups
Definition slang-gfx.h:1459
int maxRecursion
Definition slang-gfx.h:1460
RayTracingPipelineFlags::Enum flags
Definition slang-gfx.h:1463
Size maxAttributeSizeInBytes
Definition slang-gfx.h:1462
GfxCount hitGroupCount
Definition slang-gfx.h:1458
Size maxRayPayloadSize
Definition slang-gfx.h:1461
Definition slang-gfx.h:2977
bool enableRaytracingValidation
Definition slang-gfx.h:2979
StructType structType
Definition slang-gfx.h:2978
Definition slang-gfx.h:537
ResourceStateSet(TResourceState... states)
Definition slang-gfx.h:557
void add(ResourceState s, TResourceState... states)
Definition slang-gfx.h:541
ResourceStateSet operator&(const ResourceStateSet &that) const
Definition slang-gfx.h:562
void add()
Definition slang-gfx.h:571
ResourceStateSet(ResourceState state)
Definition slang-gfx.h:555
ResourceStateSet()
Definition slang-gfx.h:550
uint64_t m_bitFields
Definition slang-gfx.h:570
ResourceStateSet(const ResourceStateSet &other)=default
void add(ResourceState state)
Definition slang-gfx.h:539
bool contains(ResourceState state) const
Definition slang-gfx.h:546
Definition slang-gfx.h:1710
int8_t x
Definition slang-gfx.h:1711
int8_t y
Definition slang-gfx.h:1712
Definition slang-gfx.h:1521
int32_t minY
Definition slang-gfx.h:1523
int32_t maxY
Definition slang-gfx.h:1525
int32_t maxX
Definition slang-gfx.h:1524
int32_t minX
Definition slang-gfx.h:1522
Definition slang-gfx.h:2839
GfxCount missCount
Definition slang-gfx.h:2841
GfxCount hitCount
Definition slang-gfx.h:2840
GfxCount entryCount
Definition slang-gfx.h:2842
Definition slang-gfx.h:1149
bool operator>(const ShaderOffset &other) const
Definition slang-gfx.h:1177
GfxIndex bindingArrayIndex
Definition slang-gfx.h:1152
GfxIndex bindingRangeIndex
Definition slang-gfx.h:1151
bool operator==(const ShaderOffset &other) const
Definition slang-gfx.h:1157
bool operator!=(const ShaderOffset &other) const
Definition slang-gfx.h:1163
SlangInt uniformOffset
Definition slang-gfx.h:1150
bool operator<(const ShaderOffset &other) const
Definition slang-gfx.h:1164
bool operator>=(const ShaderOffset &other) const
Definition slang-gfx.h:1178
uint32_t getHashCode() const
Definition slang-gfx.h:1153
bool operator<=(const ShaderOffset &other) const
Definition slang-gfx.h:1176
Definition slang-gfx.h:2968
StructType structType
Definition slang-gfx.h:2969
uint32_t compilerOptionEntryCount
Definition slang-gfx.h:2970
slang::CompilerOptionEntry const * compilerOptionEntries
Definition slang-gfx.h:2971
Definition slang-gfx.h:732
GfxCount layerCount
Definition slang-gfx.h:737
GfxCount mipLevelCount
Definition slang-gfx.h:735
GfxIndex mipLevel
Definition slang-gfx.h:734
GfxIndex baseArrayLayer
Definition slang-gfx.h:736
TextureAspect aspectMask
Definition slang-gfx.h:733
Definition slang-gfx.h:1380
bool enableBlend
Definition slang-gfx.h:1383
LogicOp logicOp
Definition slang-gfx.h:1384
AspectBlendDesc alpha
Definition slang-gfx.h:1382
AspectBlendDesc color
Definition slang-gfx.h:1381
RenderTargetWriteMaskT writeMask
Definition slang-gfx.h:1385
Definition slang-gfx.h:486
InputSlotClass slotClass
Whether the stream contains per-vertex or per-instance data.
Definition slang-gfx.h:488
GfxCount instanceDataStepRate
How many instances to draw per chunk of data.
Definition slang-gfx.h:489
Size stride
The stride in bytes for this vertex stream.
Definition slang-gfx.h:487
Definition slang-gfx.h:1529
float originX
Definition slang-gfx.h:1530
float originY
Definition slang-gfx.h:1531
float extentY
Definition slang-gfx.h:1533
float minZ
Definition slang-gfx.h:1534
float maxZ
Definition slang-gfx.h:1535
float extentX
Definition slang-gfx.h:1532
Definition slang-gfx.h:1558
Type
Definition slang-gfx.h:1560
static WindowHandle FromHwnd(void *hwnd)
Definition slang-gfx.h:1568
intptr_t handleValues[2]
Definition slang-gfx.h:1567
static WindowHandle FromXWindow(void *xdisplay, uint32_t xwindow)
Definition slang-gfx.h:1582
Type type
Definition slang-gfx.h:1566
static WindowHandle FromNSWindow(void *nswindow)
Definition slang-gfx.h:1575
Definition slang.h:1197
Definition slang-gfx.h:701
uint32_t uintValues[4]
Definition slang-gfx.h:703
float floatValues[4]
Definition slang-gfx.h:702