slot 0.0.1
A real time UI render framework
载入中...
搜索中...
未找到
slang-deprecated.h
浏览该文件的文档.
1#pragma once
2
3#include "slang.h"
4
5/* DEPRECATED DEFINITIONS
6
7Everything in this file represents deprecated APIs/definition that are only
8being kept around for source/binary compatibility with old client code. New
9code should not use any of these declarations, and the Slang API will drop these
10declarations over time.
11*/
12
13#ifdef __cplusplus
14extern "C"
15{
16#endif
17
21 SLANG_API SlangSession* spCreateSession(const char* deprecated = 0);
22
27
31 SlangSession* session,
33
37
42
47
51 SlangSession* session,
52 char const* sourcePath,
53 char const* sourceString);
54
55 /* @see slang::IGlobalSession::createCompileRequest
56 */
58
64
67
70
73
76
78 SLANG_API void spSetDumpIntermediatePrefix(SlangCompileRequest* request, const char* prefix);
79
83 SlangCompileRequest* request,
85
88 SlangCompileRequest* request,
89 int targetIndex,
91
94 SlangCompileRequest* request,
95 int targetIndex,
96 bool forceScalarLayout);
97
100 slang::ICompileRequest* request,
101 int targetIndex,
102 bool val);
103
105 SLANG_API void spSetIgnoreCapabilityCheck(slang::ICompileRequest* request, bool val);
106
109
112
115 SlangCompileRequest* request,
116 int targetIndex,
117 SlangProfileID profile);
118
121 SlangCompileRequest* request,
122 int targetIndex,
123 SlangTargetFlags flags);
124
125
128 SlangCompileRequest* request,
129 int targetIndex,
131
134 slang::ICompileRequest* request,
135 int targetIndex,
136 SlangCapabilityID capability);
137
138 /* DEPRECATED: use `spSetMatrixLayoutMode` instead. */
140 SlangCompileRequest* request,
141 int targetIndex,
143
146
149
152
155 SlangCompileRequest* request,
157
158
161 SlangCompileRequest* request,
162 SlangContainerFormat format);
163
166
169 SlangCompileRequest* request,
171 void const* userData);
172
175 SlangCompileRequest* request,
176 SlangWriterChannel channel,
177 ISlangWriter* writer);
178
181
183 SLANG_API void spAddSearchPath(SlangCompileRequest* request, const char* searchDir);
184
187 SlangCompileRequest* request,
188 const char* key,
189 const char* value);
190
193 SlangCompileRequest* request,
194 char const* const* args,
195 int argCount);
196
199 SlangCompileRequest* request,
200 SlangSourceLanguage language,
201 char const* name);
202
203
206 SlangCompileRequest* request,
207 const char* defaultModuleName);
208
211 SlangCompileRequest* request,
212 int translationUnitIndex,
213 const char* key,
214 const char* value);
215
216
219 SlangCompileRequest* request,
220 int translationUnitIndex,
221 char const* path);
222
225 SlangCompileRequest* request,
226 int translationUnitIndex,
227 char const* path,
228 char const* source);
229
230
233 SlangCompileRequest* request,
234 const char* basePath,
235 const void* libData,
236 size_t libDataSize);
237
240 SlangCompileRequest* request,
241 int translationUnitIndex,
242 char const* path,
243 char const* sourceBegin,
244 char const* sourceEnd);
245
248 SlangCompileRequest* request,
249 int translationUnitIndex,
250 char const* path,
251 ISlangBlob* sourceBlob);
252
255
258
261 SlangCompileRequest* request,
262 int translationUnitIndex,
263 char const* name,
264 SlangStage stage);
265
268 SlangCompileRequest* request,
269 int translationUnitIndex,
270 char const* name,
271 SlangStage stage,
272 int genericArgCount,
273 char const** genericArgs);
274
277 SlangCompileRequest* request,
278 int genericArgCount,
279 char const** genericArgs);
280
283 SlangCompileRequest* request,
284 int slotIndex,
285 char const* typeName);
286
289 SlangCompileRequest* request,
290 int entryPointIndex,
291 int slotIndex,
292 char const* typeName);
293
296
297
300
304
305
308
310 SLANG_API char const* spGetDependencyFilePath(SlangCompileRequest* request, int index);
311
314
316 SLANG_API char const* spGetEntryPointSource(SlangCompileRequest* request, int entryPointIndex);
317
320 SlangCompileRequest* request,
321 int entryPointIndex,
322 size_t* outSize);
323
326 SlangCompileRequest* request,
327 int entryPointIndex,
328 int targetIndex,
329 ISlangBlob** outBlob);
330
333 SlangCompileRequest* request,
334 int entryPointIndex,
335 int targetIndex,
336 ISlangSharedLibrary** outSharedLibrary);
337
340 spGetTargetCodeBlob(SlangCompileRequest* request, int targetIndex, ISlangBlob** outBlob);
341
344 SlangCompileRequest* request,
345 int targetIndex,
346 ISlangSharedLibrary** outSharedLibrary);
347
349 SLANG_API void const* spGetCompileRequestCode(SlangCompileRequest* request, size_t* outSize);
350
353
356 SlangCompileRequest* request,
357 ISlangFileSystem* fileSystem,
358 const void* data,
359 size_t size);
360
363
366
369 SlangCompileRequest* request,
370 ISlangProfiler** compileTimeProfile,
371 bool shouldClear);
372
373
386 SlangSession* session,
387 const void* reproData,
388 size_t reproDataSize,
389 ISlangMutableFileSystem* fileSystem);
390
391 /* Turns a repro into a file system.
392
393 Makes the contents of the repro available as a file system - that is able to access the files
394 with the same paths as were used on the original repro file system.
395
396 @param session The slang session
397 @param reproData The repro data
398 @param reproDataSize The size of the repro data
399 @param replaceFileSystem Will attempt to load by unique names from this file system before
400 using contents of the repro. Optional.
401 @param outFileSystem The file system that can be used to access contents
402 @returns A `SlangResult` to indicate success or failure.
403 */
405 SlangSession* session,
406 const void* reproData,
407 size_t reproDataSize,
408 ISlangFileSystem* replaceFileSystem,
409 ISlangFileSystemExt** outFileSystem);
410
413 SlangCompileRequest* request,
414 SlangInt messageID,
415 SlangSeverity overrideSeverity);
416
419
422
423
424 // get reflection data from a compilation request
426
427 // User Attribute
433 unsigned int index);
436 unsigned int index,
437 int* rs);
440 unsigned int index,
441 float* rs);
442
450 unsigned int index,
451 size_t* outSize);
452
453 // Type Reflection
454
459 unsigned int index);
462 char const* name);
465 SlangReflectionGeneric* generic);
466
470 unsigned index);
471
486
492 SlangReflection* reflection);
493
495
499
503 SlangReflectionType* type);
504
509 SlangReflectionType* type);
510
511 // Type Layout Reflection
512
523 SlangParameterCategory category);
524
533 SlangParameterCategory category);
536 SlangParameterCategory category);
537
541 unsigned index);
542
544 SlangReflectionTypeLayout* typeLayout,
545 const char* nameBegin,
546 const char* nameEnd);
547
549 SlangReflectionTypeLayout* typeLayout);
550
559 SlangParameterCategory category);
566
569
573
576
578
581
587 SlangInt index);
588
592 SlangReflectionTypeLayout* typeLayout,
593 SlangInt index);
595 SlangReflectionTypeLayout* typeLayout,
596 SlangInt index);
604 SlangReflectionTypeLayout* typeLayout,
605 SlangInt index);
607 SlangReflectionTypeLayout* typeLayout,
608 SlangInt index);
610 SlangReflectionTypeLayout* typeLayout,
611 SlangInt index);
613 SlangReflectionTypeLayout* typeLayout,
614 SlangInt index);
616 SlangReflectionTypeLayout* typeLayout,
617 SlangInt fieldIndex);
619 SlangReflectionTypeLayout* inTypeLayout);
620
622 SlangReflectionTypeLayout* typeLayout,
623 SlangInt index);
625 SlangReflectionTypeLayout* typeLayout,
626 SlangInt index);
628 SlangReflectionTypeLayout* typeLayout,
629 SlangInt index);
630
634 SlangReflectionTypeLayout* typeLayout,
635 SlangInt setIndex);
637 SlangReflectionTypeLayout* typeLayout,
638 SlangInt setIndex);
645 SlangReflectionTypeLayout* typeLayout,
646 SlangInt setIndex,
647 SlangInt rangeIndex);
648
656 SlangReflectionTypeLayout* typeLayout,
657 SlangInt setIndex,
658 SlangInt rangeIndex);
660 SlangReflectionTypeLayout* typeLayout,
661 SlangInt setIndex,
662 SlangInt rangeIndex);
664 SlangReflectionTypeLayout* typeLayout,
665 SlangInt setIndex,
666 SlangInt rangeIndex);
667
671 SlangReflectionTypeLayout* typeLayout,
672 SlangInt subObjectRangeIndex);
679 SlangReflectionTypeLayout* typeLayout,
680 SlangInt subObjectRangeIndex);
682 SlangReflectionTypeLayout* typeLayout,
683 SlangInt subObjectRangeIndex);
684
685#if 0
687 SLANG_API SlangInt spReflectionTypeLayout_getSubObjectRangeObjectCount(SlangReflectionTypeLayout* typeLayout, SlangInt index);
689 SLANG_API SlangReflectionTypeLayout* spReflectionTypeLayout_getSubObjectRangeTypeLayout(SlangReflectionTypeLayout* typeLayout, SlangInt index);
690
691 SLANG_API SlangInt spReflectionTypeLayout_getSubObjectRangeDescriptorRangeCount(SlangReflectionTypeLayout* typeLayout, SlangInt subObjectRangeIndex);
692 SLANG_API SlangBindingType spReflectionTypeLayout_getSubObjectRangeDescriptorRangeBindingType(SlangReflectionTypeLayout* typeLayout, SlangInt subObjectRangeIndex, SlangInt bindingRangeIndexInSubObject);
693 SLANG_API SlangInt spReflectionTypeLayout_getSubObjectRangeDescriptorRangeBindingCount(SlangReflectionTypeLayout* typeLayout, SlangInt subObjectRangeIndex, SlangInt bindingRangeIndexInSubObject);
694 SLANG_API SlangInt spReflectionTypeLayout_getSubObjectRangeDescriptorRangeIndexOffset(SlangReflectionTypeLayout* typeLayout, SlangInt subObjectRangeIndex, SlangInt bindingRangeIndexInSubObject);
695 SLANG_API SlangInt spReflectionTypeLayout_getSubObjectRangeDescriptorRangeSpaceOffset(SlangReflectionTypeLayout* typeLayout, SlangInt subObjectRangeIndex, SlangInt bindingRangeIndexInSubObject);
696#endif
697
698 // Variable Reflection
699
704 SlangModifierID modifierID);
708 unsigned int index);
711 SlangSession* globalSession,
712 char const* name);
722 SlangReflectionGeneric* generic);
723
724 // Variable Layout Reflection
725
728
731
739 SlangParameterCategory category);
740
748 SlangParameterCategory category);
751
754 SLANG_API size_t
756
757
758 // Function Reflection
759
764 SlangModifierID modifierID);
769 unsigned int index);
772 SlangSession* globalSession,
773 char const* name);
777 unsigned index);
784 SlangReflectionGeneric* generic);
787 SlangInt argTypeCount,
788 SlangReflectionType* const* argTypes);
793 unsigned int index);
794
795 // Abstract Decl Reflection
796
799 SlangReflectionDecl* parentDecl,
800 unsigned int index);
810 SlangModifierID modifierID);
811
812 // Generic Reflection
813
817 SlangReflectionGeneric* generic);
819 SlangReflectionGeneric* generic,
820 unsigned index);
822 SlangReflectionGeneric* generic);
824 SlangReflectionGeneric* generic,
825 unsigned index);
827 SlangReflectionGeneric* generic,
828 SlangReflectionVariable* typeParam);
830 SlangReflectionGeneric* generic,
831 SlangReflectionVariable* typeParam,
832 unsigned index);
835 SlangReflectionGeneric* generic);
837 SlangReflectionGeneric* generic);
839 SlangReflectionGeneric* generic,
840 SlangReflectionVariable* typeParam);
842 SlangReflectionGeneric* generic,
843 SlangReflectionVariable* valueParam);
845 SlangReflectionGeneric* currGeneric,
846 SlangReflectionGeneric* generic);
847
848
857
858
861
862 // Shader Parameter Reflection
863
870
877
879 SlangCompileRequest* request,
880 SlangInt entryPointIndex,
881 SlangInt targetIndex,
882 SlangParameterCategory category, // is this a `t` register? `s` register?
883 SlangUInt spaceIndex, // `space` for D3D12, `set` for Vulkan
884 SlangUInt registerIndex, // `register` for D3D12, `binding` for Vulkan
885 bool& outUsed);
886
887 // Entry Point Reflection
888
890
892 SlangReflectionEntryPoint* entryPoint);
893
895 SlangReflectionEntryPoint* entryPoint);
896
898 SlangReflectionEntryPoint* entryPoint);
899
901 SlangReflectionEntryPoint* entryPoint,
902 unsigned index);
903
905
907 SlangReflectionEntryPoint* entryPoint,
908 SlangUInt axisCount,
909 SlangUInt* outSizeAlongAxis);
910
912 SlangReflectionEntryPoint* entryPoint,
913 SlangUInt* outWaveSize);
914
916 SlangReflectionEntryPoint* entryPoint);
917
919 SlangReflectionEntryPoint* entryPoint);
920
922 SlangReflectionEntryPoint* entryPoint);
923
925 SlangReflectionEntryPoint* entryPoint);
926
927 // SlangReflectionTypeParameter
935 unsigned int index);
936
937 // Shader Reflection
938
940 SlangReflection* reflection,
941 SlangCompileRequest* request,
942 ISlangBlob** outBlob);
943
946 SlangReflection* reflection,
947 unsigned index);
948
951 SlangReflection* reflection,
952 unsigned int index);
954 SlangReflection* reflection,
955 char const* name);
956
958 SlangReflection* reflection,
959 char const* name);
961 SlangReflection* reflection,
962 SlangReflectionType* reflectionType,
963 SlangLayoutRules rules);
964
966 SlangReflection* reflection,
967 char const* name);
969 SlangReflection* reflection,
970 SlangReflectionType* reflType,
971 char const* name);
973 SlangReflection* reflection,
974 SlangReflectionType* reflType,
975 char const* name);
977 SlangReflection* reflection,
978 uint32_t candidateCount,
979 SlangReflectionFunction** candidates);
980
983 SlangReflection* reflection,
984 SlangUInt index);
986 SlangReflection* reflection,
987 char const* name);
988
995
1003
1005 SlangReflection* reflection,
1006 SlangReflectionType* type,
1007 SlangInt specializationArgCount,
1008 SlangReflectionType* const* specializationArgs,
1009 ISlangBlob** outDiagnostics);
1010
1012 SlangReflection* inProgramLayout,
1013 SlangReflectionGeneric* generic,
1014 SlangInt argCount,
1015 SlangReflectionGenericArgType const* argTypes,
1016 SlangReflectionGenericArg const* args,
1017 ISlangBlob** outDiagnostics);
1018
1020 SlangReflection* reflection,
1021 SlangReflectionType* subType,
1022 SlangReflectionType* superType);
1023
1026
1030 SlangReflection* reflection,
1031 SlangUInt index,
1032 size_t* outCount);
1033
1036 SLANG_API SlangUInt32 spComputeStringHash(const char* chars, size_t count);
1037
1040 SlangReflection* reflection);
1041
1044 SlangReflection* reflection);
1045
1047 SlangCompileRequest* request,
1048 int translationUnitIndex);
1049
1054#ifdef __cplusplus
1055}
1056#endif
1057
1058#ifdef __cplusplus
1059SLANG_API slang::ISession* spReflection_GetSession(SlangReflection* reflection);
1060
1061namespace slang
1062{
1063struct IComponentType;
1064struct IModule;
1065} // namespace slang
1066
1067extern "C"
1068{
1072 spCompileRequest_getProgram(SlangCompileRequest* request, slang::IComponentType** outProgram);
1073
1076 SLANG_API SlangResult spCompileRequest_getProgramWithEntryPoints(
1077 SlangCompileRequest* request,
1078 slang::IComponentType** outProgram);
1079
1082 SLANG_API SlangResult spCompileRequest_getEntryPoint(
1083 SlangCompileRequest* request,
1084 SlangInt entryPointIndex,
1085 slang::IComponentType** outEntryPoint);
1086
1089 SLANG_API SlangResult spCompileRequest_getModule(
1090 SlangCompileRequest* request,
1091 SlangInt translationUnitIndex,
1092 slang::IModule** outModule);
1093
1097 spCompileRequest_getSession(SlangCompileRequest* request, slang::ISession** outSession);
1098}
1099
1100namespace slang
1101{
1105struct ICompileRequest : public ISlangUnknown
1106{
1108 0x96d33993,
1109 0x317c,
1110 0x4db5,
1111 {0xaf, 0xd8, 0x66, 0x6e, 0xe7, 0x72, 0x48, 0xe2})
1112
1123 virtual SLANG_NO_THROW void SLANG_MCALL setFileSystem(ISlangFileSystem* fileSystem) = 0;
1124
1128 virtual SLANG_NO_THROW void SLANG_MCALL setCompileFlags(SlangCompileFlags flags) = 0;
1129
1133 virtual SLANG_NO_THROW SlangCompileFlags SLANG_MCALL getCompileFlags() = 0;
1134
1138 virtual SLANG_NO_THROW void SLANG_MCALL setDumpIntermediates(int enable) = 0;
1139
1140 virtual SLANG_NO_THROW void SLANG_MCALL setDumpIntermediatePrefix(const char* prefix) = 0;
1141
1145 virtual SLANG_NO_THROW void SLANG_MCALL setLineDirectiveMode(SlangLineDirectiveMode mode) = 0;
1146
1154 virtual SLANG_NO_THROW void SLANG_MCALL setCodeGenTarget(SlangCompileTarget target) = 0;
1155
1159 virtual SLANG_NO_THROW int SLANG_MCALL addCodeGenTarget(SlangCompileTarget target) = 0;
1160
1161 virtual SLANG_NO_THROW void SLANG_MCALL
1162 setTargetProfile(int targetIndex, SlangProfileID profile) = 0;
1163
1164 virtual SLANG_NO_THROW void SLANG_MCALL
1165 setTargetFlags(int targetIndex, SlangTargetFlags flags) = 0;
1166
1170 virtual SLANG_NO_THROW void SLANG_MCALL
1171 setTargetFloatingPointMode(int targetIndex, SlangFloatingPointMode mode) = 0;
1172
1173 /* DEPRECATED: use `spSetMatrixLayoutMode` instead. */
1174 virtual SLANG_NO_THROW void SLANG_MCALL
1175 setTargetMatrixLayoutMode(int targetIndex, SlangMatrixLayoutMode mode) = 0;
1176
1177 virtual SLANG_NO_THROW void SLANG_MCALL setMatrixLayoutMode(SlangMatrixLayoutMode mode) = 0;
1178
1182 virtual SLANG_NO_THROW void SLANG_MCALL setDebugInfoLevel(SlangDebugInfoLevel level) = 0;
1183
1187 virtual SLANG_NO_THROW void SLANG_MCALL setOptimizationLevel(SlangOptimizationLevel level) = 0;
1188
1189
1193 virtual SLANG_NO_THROW void SLANG_MCALL
1194 setOutputContainerFormat(SlangContainerFormat format) = 0;
1195
1196 virtual SLANG_NO_THROW void SLANG_MCALL setPassThrough(SlangPassThrough passThrough) = 0;
1197
1198
1199 virtual SLANG_NO_THROW void SLANG_MCALL
1200 setDiagnosticCallback(SlangDiagnosticCallback callback, void const* userData) = 0;
1201
1202 virtual SLANG_NO_THROW void SLANG_MCALL
1203 setWriter(SlangWriterChannel channel, ISlangWriter* writer) = 0;
1204
1205 virtual SLANG_NO_THROW ISlangWriter* SLANG_MCALL getWriter(SlangWriterChannel channel) = 0;
1206
1213 virtual SLANG_NO_THROW void SLANG_MCALL addSearchPath(const char* searchDir) = 0;
1214
1220 virtual SLANG_NO_THROW void SLANG_MCALL
1221 addPreprocessorDefine(const char* key, const char* value) = 0;
1222
1228 processCommandLineArguments(char const* const* args, int argCount) = 0;
1229
1235 virtual SLANG_NO_THROW int SLANG_MCALL
1236 addTranslationUnit(SlangSourceLanguage language, char const* name) = 0;
1237
1238
1242 virtual SLANG_NO_THROW void SLANG_MCALL setDefaultModuleName(const char* defaultModuleName) = 0;
1243
1250 virtual SLANG_NO_THROW void SLANG_MCALL addTranslationUnitPreprocessorDefine(
1251 int translationUnitIndex,
1252 const char* key,
1253 const char* value) = 0;
1254
1255
1267 virtual SLANG_NO_THROW void SLANG_MCALL
1268 addTranslationUnitSourceFile(int translationUnitIndex, char const* path) = 0;
1269
1283 virtual SLANG_NO_THROW void SLANG_MCALL addTranslationUnitSourceString(
1284 int translationUnitIndex,
1285 char const* path,
1286 char const* source) = 0;
1287
1288
1297 addLibraryReference(const char* basePath, const void* libData, size_t libDataSize) = 0;
1298
1313 virtual SLANG_NO_THROW void SLANG_MCALL addTranslationUnitSourceStringSpan(
1314 int translationUnitIndex,
1315 char const* path,
1316 char const* sourceBegin,
1317 char const* sourceEnd) = 0;
1318
1332 virtual SLANG_NO_THROW void SLANG_MCALL addTranslationUnitSourceBlob(
1333 int translationUnitIndex,
1334 char const* path,
1335 ISlangBlob* sourceBlob) = 0;
1336
1339 virtual SLANG_NO_THROW int SLANG_MCALL
1340 addEntryPoint(int translationUnitIndex, char const* name, SlangStage stage) = 0;
1341
1346 virtual SLANG_NO_THROW int SLANG_MCALL addEntryPointEx(
1347 int translationUnitIndex,
1348 char const* name,
1349 SlangStage stage,
1350 int genericArgCount,
1351 char const** genericArgs) = 0;
1352
1356 setGlobalGenericArgs(int genericArgCount, char const** genericArgs) = 0;
1357
1372 setTypeNameForGlobalExistentialTypeParam(int slotIndex, char const* typeName) = 0;
1373
1387 virtual SLANG_NO_THROW SlangResult SLANG_MCALL setTypeNameForEntryPointExistentialTypeParam(
1388 int entryPointIndex,
1389 int slotIndex,
1390 char const* typeName) = 0;
1391
1394 virtual SLANG_NO_THROW void SLANG_MCALL setAllowGLSLInput(bool value) = 0;
1395
1401 virtual SLANG_NO_THROW SlangResult SLANG_MCALL compile() = 0;
1402
1403
1413 virtual SLANG_NO_THROW char const* SLANG_MCALL getDiagnosticOutput() = 0;
1414
1422 getDiagnosticOutputBlob(ISlangBlob** outBlob) = 0;
1423
1424
1431 virtual SLANG_NO_THROW int SLANG_MCALL getDependencyFileCount() = 0;
1432
1435 virtual SLANG_NO_THROW char const* SLANG_MCALL getDependencyFilePath(int index) = 0;
1436
1439 virtual SLANG_NO_THROW int SLANG_MCALL getTranslationUnitCount() = 0;
1440
1445 virtual SLANG_NO_THROW char const* SLANG_MCALL getEntryPointSource(int entryPointIndex) = 0;
1446
1451 virtual SLANG_NO_THROW void const* SLANG_MCALL
1452 getEntryPointCode(int entryPointIndex, size_t* outSize) = 0;
1453
1462 getEntryPointCodeBlob(int entryPointIndex, int targetIndex, ISlangBlob** outBlob) = 0;
1463
1476 virtual SLANG_NO_THROW SlangResult SLANG_MCALL getEntryPointHostCallable(
1477 int entryPointIndex,
1478 int targetIndex,
1479 ISlangSharedLibrary** outSharedLibrary) = 0;
1480
1488 getTargetCodeBlob(int targetIndex, ISlangBlob** outBlob) = 0;
1489
1502 getTargetHostCallable(int targetIndex, ISlangSharedLibrary** outSharedLibrary) = 0;
1503
1513 virtual SLANG_NO_THROW void const* SLANG_MCALL getCompileRequestCode(size_t* outSize) = 0;
1514
1520 getCompileRequestResultAsFileSystem() = 0;
1521
1528 virtual SLANG_NO_THROW SlangResult SLANG_MCALL getContainerCode(ISlangBlob** outBlob) = 0;
1529
1544 loadRepro(ISlangFileSystem* fileSystem, const void* data, size_t size) = 0;
1545
1552 virtual SLANG_NO_THROW SlangResult SLANG_MCALL saveRepro(ISlangBlob** outBlob) = 0;
1553
1563 virtual SLANG_NO_THROW SlangResult SLANG_MCALL enableReproCapture() = 0;
1564
1573 getProgram(slang::IComponentType** outProgram) = 0;
1574
1588 getEntryPoint(SlangInt entryPointIndex, slang::IComponentType** outEntryPoint) = 0;
1589
1603 getModule(SlangInt translationUnitIndex, slang::IModule** outModule) = 0;
1604
1608 virtual SLANG_NO_THROW SlangResult SLANG_MCALL getSession(slang::ISession** outSession) = 0;
1609
1611 virtual SLANG_NO_THROW SlangReflection* SLANG_MCALL getReflection() = 0;
1612
1614 virtual SLANG_NO_THROW void SLANG_MCALL setCommandLineCompilerMode() = 0;
1615
1618 addTargetCapability(SlangInt targetIndex, SlangCapabilityID capability) = 0;
1619
1629 getProgramWithEntryPoints(slang::IComponentType** outProgram) = 0;
1630
1631 virtual SLANG_NO_THROW SlangResult SLANG_MCALL isParameterLocationUsed(
1632 SlangInt entryPointIndex,
1633 SlangInt targetIndex,
1634 SlangParameterCategory category,
1635 SlangUInt spaceIndex,
1636 SlangUInt registerIndex,
1637 bool& outUsed) = 0;
1638
1641 virtual SLANG_NO_THROW void SLANG_MCALL
1642 setTargetLineDirectiveMode(SlangInt targetIndex, SlangLineDirectiveMode mode) = 0;
1643
1648 virtual SLANG_NO_THROW void SLANG_MCALL
1649 setTargetForceGLSLScalarBufferLayout(int targetIndex, bool forceScalarLayout) = 0;
1650
1658 virtual SLANG_NO_THROW void SLANG_MCALL
1659 overrideDiagnosticSeverity(SlangInt messageID, SlangSeverity overrideSeverity) = 0;
1660
1662 virtual SLANG_NO_THROW SlangDiagnosticFlags SLANG_MCALL getDiagnosticFlags() = 0;
1663
1666 virtual SLANG_NO_THROW void SLANG_MCALL setDiagnosticFlags(SlangDiagnosticFlags flags) = 0;
1667
1669 virtual SLANG_NO_THROW void SLANG_MCALL
1670 setDebugInfoFormat(SlangDebugInfoFormat debugFormat) = 0;
1671
1672 virtual SLANG_NO_THROW void SLANG_MCALL setEnableEffectAnnotations(bool value) = 0;
1673
1674 virtual SLANG_NO_THROW void SLANG_MCALL setReportDownstreamTime(bool value) = 0;
1675
1676 virtual SLANG_NO_THROW void SLANG_MCALL setReportPerfBenchmark(bool value) = 0;
1677
1678 virtual SLANG_NO_THROW void SLANG_MCALL setSkipSPIRVValidation(bool value) = 0;
1679
1680 virtual SLANG_NO_THROW void SLANG_MCALL
1681 setTargetUseMinimumSlangOptimization(int targetIndex, bool value) = 0;
1682
1683 virtual SLANG_NO_THROW void SLANG_MCALL setIgnoreCapabilityCheck(bool value) = 0;
1684
1685 // return a copy of internal profiling results, and if `shouldClear` is true, clear the internal
1686 // profiling results before returning.
1688 getCompileTimeProfile(ISlangProfiler** compileTimeProfile, bool shouldClear) = 0;
1689
1690 virtual SLANG_NO_THROW void SLANG_MCALL
1691 setTargetGenerateWholeProgram(int targetIndex, bool value) = 0;
1692
1693 virtual SLANG_NO_THROW void SLANG_MCALL setTargetForceDXLayout(int targetIndex, bool value) = 0;
1694
1695 virtual SLANG_NO_THROW void SLANG_MCALL
1696 setTargetEmbedDownstreamIR(int targetIndex, bool value) = 0;
1697
1698 virtual SLANG_NO_THROW void SLANG_MCALL setTargetForceCLayout(int targetIndex, bool value) = 0;
1699};
1700
1701 #define SLANG_UUID_ICompileRequest ICompileRequest::getTypeGuid()
1702
1703} // namespace slang
1704#endif
Definition slang.h:963
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
SLANG_API void spSetFileSystem(SlangCompileRequest *request, ISlangFileSystem *fileSystem)
SLANG_API char const * spReflectionDecl_getName(SlangReflectionDecl *decl)
SLANG_API SlangResult spExtractRepro(SlangSession *session, const void *reproData, size_t reproDataSize, ISlangMutableFileSystem *fileSystem)
SLANG_API SlangReflectionTypeLayout * spReflectionTypeLayout_GetElementTypeLayout(SlangReflectionTypeLayout *type)
SLANG_API void spSetPassThrough(SlangCompileRequest *request, SlangPassThrough passThrough)
SLANG_API SlangReflectionEntryPoint * spReflection_findEntryPointByName(SlangReflection *reflection, char const *name)
SLANG_API SlangResult spReflectionVariable_GetDefaultValueFloat(SlangReflectionVariable *inVar, float *rs)
SLANG_API SlangInt spReflectionTypeLayout_getDescriptorSetSpaceOffset(SlangReflectionTypeLayout *typeLayout, SlangInt setIndex)
SLANG_API int spReflectionEntryPoint_hasDefaultConstantBuffer(SlangReflectionEntryPoint *entryPoint)
SLANG_API size_t spReflectionVariableLayout_GetSemanticIndex(SlangReflectionVariableLayout *var)
SLANG_API unsigned spReflectionTypeParameter_GetConstraintCount(SlangReflectionTypeParameter *typeParam)
SLANG_API SlangInt spReflectionTypeLayout_getSubObjectRangeSpaceOffset(SlangReflectionTypeLayout *typeLayout, SlangInt subObjectRangeIndex)
SLANG_API SlangResult spSessionCheckPassThroughSupport(SlangSession *session, SlangPassThrough passThrough)
SLANG_API char const * spReflectionEntryPoint_getName(SlangReflectionEntryPoint *entryPoint)
SLANG_API int32_t spReflectionTypeLayout_getAlignment(SlangReflectionTypeLayout *type, SlangParameterCategory category)
SLANG_API SlangReflectionType * spReflectionType_getSpecializedTypeArgType(SlangReflectionType *type, SlangInt index)
SLANG_API SlangUInt spReflection_getHashedStringCount(SlangReflection *reflection)
Get the number of hashed strings
SLANG_API size_t spReflectionTypeLayout_GetElementStride(SlangReflectionTypeLayout *type, SlangParameterCategory category)
SLANG_API SlangResult spEnableReproCapture(SlangCompileRequest *request)
SLANG_API void spDestroyCompileRequest(SlangCompileRequest *request)
Destroy a compile request. Note a request is a COM object and can be destroyed via 'Release'.
SLANG_API SlangReflectionType * spReflectionVariable_GetType(SlangReflectionVariable *var)
SLANG_API SlangReflectionVariable * spReflectionGeneric_GetValueParameter(SlangReflectionGeneric *generic, unsigned index)
SLANG_API SlangBindingType spReflectionTypeLayout_getBindingRangeType(SlangReflectionTypeLayout *typeLayout, SlangInt index)
SLANG_API SlangInt spReflectionType_getSpecializedTypeArgCount(SlangReflectionType *type)
SLANG_API SlangUInt spReflection_getGlobalConstantBufferBinding(SlangReflection *reflection)
SLANG_API unsigned int spReflectionUserAttribute_GetArgumentCount(SlangReflectionUserAttribute *attrib)
SLANG_API unsigned int spReflectionGeneric_GetValueParameterCount(SlangReflectionGeneric *generic)
SLANG_API SlangInt spReflection_getBindlessSpaceIndex(SlangReflection *reflection)
SLANG_API SlangResult spSetGlobalGenericArgs(SlangCompileRequest *request, int genericArgCount, char const **genericArgs)
SLANG_API SlangScalarType spReflectionType_GetScalarType(SlangReflectionType *type)
SLANG_API SlangStage spReflectionEntryPoint_getStage(SlangReflectionEntryPoint *entryPoint)
SLANG_API SlangReflectionVariable * spReflectionVariable_applySpecializations(SlangReflectionVariable *var, SlangReflectionGeneric *generic)
SLANG_API ISlangWriter * spGetWriter(SlangCompileRequest *request, SlangWriterChannel channel)
SLANG_API void spSetDiagnosticCallback(SlangCompileRequest *request, SlangDiagnosticCallback callback, void const *userData)
SLANG_API void spSetDiagnosticFlags(SlangCompileRequest *request, SlangDiagnosticFlags flags)
SLANG_API SlangTypeKind spReflectionType_GetKind(SlangReflectionType *type)
SLANG_API SlangImageFormat spReflectionTypeLayout_getBindingRangeImageFormat(SlangReflectionTypeLayout *typeLayout, SlangInt index)
SLANG_API SlangResult spGetContainerCode(SlangCompileRequest *request, ISlangBlob **outBlob)
SLANG_API SlangCapabilityID spFindCapability(SlangSession *session, char const *name)
SLANG_API SlangResult spReflectionVariable_GetDefaultValueInt(SlangReflectionVariable *inVar, int64_t *rs)
SLANG_API SlangParameterCategory spReflectionTypeLayout_getDescriptorSetDescriptorRangeCategory(SlangReflectionTypeLayout *typeLayout, SlangInt setIndex, SlangInt rangeIndex)
SLANG_API void spSetCodeGenTarget(SlangCompileRequest *request, SlangCompileTarget target)
SLANG_API int64_t spReflectionGeneric_GetConcreteIntVal(SlangReflectionGeneric *generic, SlangReflectionVariable *valueParam)
SLANG_API int spGetDependencyFileCount(SlangCompileRequest *request)
SLANG_API unsigned int spReflectionType_GetFieldCount(SlangReflectionType *type)
SLANG_API void spSetTargetFlags(SlangCompileRequest *request, int targetIndex, SlangTargetFlags flags)
SLANG_API unsigned spReflectionEntryPoint_getParameterCount(SlangReflectionEntryPoint *entryPoint)
SLANG_API void const * spGetEntryPointCode(SlangCompileRequest *request, int entryPointIndex, size_t *outSize)
SLANG_API size_t spReflectionTypeLayout_GetSize(SlangReflectionTypeLayout *type, SlangParameterCategory category)
SLANG_API SlangReflectionType * spReflectionType_GetElementType(SlangReflectionType *type)
SLANG_API SlangReflectionUserAttribute * spReflectionType_GetUserAttribute(SlangReflectionType *type, unsigned int index)
SLANG_API SlangInt spReflectionTypeLayout_getDescriptorSetCount(SlangReflectionTypeLayout *typeLayout)
SLANG_API const char * spReflection_getHashedString(SlangReflection *reflection, SlangUInt index, size_t *outCount)
SLANG_API SlangCompileRequest * spCreateCompileRequest(SlangSession *session)
SLANG_API SlangResult spGetEntryPointHostCallable(SlangCompileRequest *request, int entryPointIndex, int targetIndex, ISlangSharedLibrary **outSharedLibrary)
SLANG_API void spSetMatrixLayoutMode(SlangCompileRequest *request, SlangMatrixLayoutMode mode)
SLANG_API SlangReflectionUserAttribute * spReflectionType_FindUserAttributeByName(SlangReflectionType *type, char const *name)
SLANG_API void spSetTargetMatrixLayoutMode(SlangCompileRequest *request, int targetIndex, SlangMatrixLayoutMode mode)
SLANG_API SlangReflectionType * spReflectionGeneric_GetTypeParameterConstraintType(SlangReflectionGeneric *generic, SlangReflectionVariable *typeParam, unsigned index)
SLANG_API SlangReflectionType * spReflectionTypeLayout_GetType(SlangReflectionTypeLayout *type)
SLANG_API char const * spGetEntryPointSource(SlangCompileRequest *request, int entryPointIndex)
SLANG_API SlangReflectionGeneric * spReflectionGeneric_applySpecializations(SlangReflectionGeneric *currGeneric, SlangReflectionGeneric *generic)
SLANG_API SlangResult spAddLibraryReference(SlangCompileRequest *request, const char *basePath, const void *libData, size_t libDataSize)
SLANG_API SlangResourceAccess spReflectionType_GetResourceAccess(SlangReflectionType *type)
SLANG_API unsigned int spReflection_GetTypeParameterCount(SlangReflection *reflection)
SLANG_API SlangCompileFlags spGetCompileFlags(SlangCompileRequest *request)
SLANG_API SlangUInt spReflection_getEntryPointCount(SlangReflection *reflection)
SLANG_API SlangReflectionGeneric * spReflectionType_GetGenericContainer(SlangReflectionType *type)
SLANG_API void spDestroySession(SlangSession *session)
Clean up after an instance of the Slang library.
SLANG_API char const * spReflectionGeneric_GetName(SlangReflectionGeneric *generic)
SLANG_API void spReflectionEntryPoint_getComputeWaveSize(SlangReflectionEntryPoint *entryPoint, SlangUInt *outWaveSize)
SLANG_API unsigned int spReflectionGeneric_GetTypeParameterConstraintCount(SlangReflectionGeneric *generic, SlangReflectionVariable *typeParam)
SLANG_API void spAddBuiltins(SlangSession *session, char const *sourcePath, char const *sourceString)
SLANG_API SlangReflectionFunction * spReflectionEntryPoint_getFunction(SlangReflectionEntryPoint *entryPoint)
SLANG_API SlangReflectionTypeParameter * spReflection_GetTypeParameterByIndex(SlangReflection *reflection, unsigned int index)
SLANG_API SlangResult spLoadRepro(SlangCompileRequest *request, ISlangFileSystem *fileSystem, const void *data, size_t size)
SLANG_API char const * spReflectionType_GetName(SlangReflectionType *type)
SLANG_API SlangInt spReflectionTypeLayout_getBindingRangeDescriptorRangeCount(SlangReflectionTypeLayout *typeLayout, SlangInt index)
SLANG_API SlangReflectionGeneric * spReflectionFunction_GetGenericContainer(SlangReflectionFunction *func)
SLANG_API SlangReflectionParameter * spReflection_GetParameterByIndex(SlangReflection *reflection, unsigned index)
SLANG_API SlangResult spSaveRepro(SlangCompileRequest *request, ISlangBlob **outBlob)
SLANG_API unsigned int spReflectionType_GetRowCount(SlangReflectionType *type)
SLANG_API size_t spReflectionType_GetSpecializedElementCount(SlangReflectionType *type, SlangReflection *reflection)
SLANG_API SlangReflectionModifier * spReflectionFunction_FindModifier(SlangReflectionFunction *var, SlangModifierID modifierID)
SLANG_API SlangResult spGetTargetHostCallable(SlangCompileRequest *request, int targetIndex, ISlangSharedLibrary **outSharedLibrary)
SLANG_API void spAddTranslationUnitSourceFile(SlangCompileRequest *request, int translationUnitIndex, char const *path)
SLANG_API unsigned int spReflectionFunction_GetParameterCount(SlangReflectionFunction *func)
SLANG_API SlangInt spReflectionTypeLayout_getBindingRangeFirstDescriptorRangeIndex(SlangReflectionTypeLayout *typeLayout, SlangInt index)
SLANG_API void spSetTargetLineDirectiveMode(SlangCompileRequest *request, int targetIndex, SlangLineDirectiveMode mode)
SLANG_API char const * spReflectionUserAttribute_GetName(SlangReflectionUserAttribute *attrib)
SLANG_API void spSetCompileFlags(SlangCompileRequest *request, SlangCompileFlags flags)
SLANG_API SlangResult spGetEntryPointCodeBlob(SlangCompileRequest *request, int entryPointIndex, int targetIndex, ISlangBlob **outBlob)
SLANG_API SlangResult spSetTypeNameForEntryPointExistentialTypeParam(SlangCompileRequest *request, int entryPointIndex, int slotIndex, char const *typeName)
SLANG_API void const * spGetCompileRequestCode(SlangCompileRequest *request, size_t *outSize)
SLANG_API SlangReflectionType * spReflectionType_GetResourceResultType(SlangReflectionType *type)
SLANG_API SlangReflectionVariable * spReflectionTypeLayout_getBindingRangeLeafVariable(SlangReflectionTypeLayout *typeLayout, SlangInt index)
SLANG_API unsigned spReflection_GetParameterCount(SlangReflection *reflection)
SLANG_API int spAddTranslationUnit(SlangCompileRequest *request, SlangSourceLanguage language, char const *name)
SLANG_API void spAddSearchPath(SlangCompileRequest *request, const char *searchDir)
SLANG_API SlangReflectionFunction * spReflection_FindFunctionByNameInType(SlangReflection *reflection, SlangReflectionType *reflType, char const *name)
SLANG_API void spSetOptimizationLevel(SlangCompileRequest *request, SlangOptimizationLevel level)
SLANG_API SlangBindingType spReflectionTypeLayout_getDescriptorSetDescriptorRangeType(SlangReflectionTypeLayout *typeLayout, SlangInt setIndex, SlangInt rangeIndex)
SLANG_API size_t spReflection_getGlobalConstantBufferSize(SlangReflection *reflection)
SLANG_API SlangReflectionVariableLayout * spReflectionTypeLayout_getSpecializedTypePendingDataVarLayout(SlangReflectionTypeLayout *type)
SLANG_API SlangReflectionUserAttribute * spReflectionFunction_GetUserAttribute(SlangReflectionFunction *func, unsigned int index)
SLANG_API SlangInt spReflectionTypeLayout_getBindingRangeBindingCount(SlangReflectionTypeLayout *typeLayout, SlangInt index)
SLANG_API size_t spReflectionVariableLayout_GetOffset(SlangReflectionVariableLayout *var, SlangParameterCategory category)
SLANG_API SlangResult spReflectionUserAttribute_GetArgumentValueFloat(SlangReflectionUserAttribute *attrib, unsigned int index, float *rs)
SLANG_API SlangReflectionTypeLayout * spReflectionVariableLayout_GetTypeLayout(SlangReflectionVariableLayout *var)
SLANG_API SlangReflectionVariable * spReflectionDecl_castToVariable(SlangReflectionDecl *decl)
SLANG_API int spGetTranslationUnitCount(SlangCompileRequest *request)
SLANG_API SlangReflectionFunction * spReflectionDecl_castToFunction(SlangReflectionDecl *decl)
SLANG_API SlangDeclKind spReflectionGeneric_GetInnerKind(SlangReflectionGeneric *generic)
SLANG_API SlangResult spGetDiagnosticOutputBlob(SlangCompileRequest *request, ISlangBlob **outBlob)
SLANG_API SlangReflectionType * spReflectionUserAttribute_GetArgumentType(SlangReflectionUserAttribute *attrib, unsigned int index)
SLANG_API SlangReflectionUserAttribute * spReflectionVariable_GetUserAttribute(SlangReflectionVariable *var, unsigned int index)
SLANG_API SlangReflectionType * spReflection_specializeType(SlangReflection *reflection, SlangReflectionType *type, SlangInt specializationArgCount, SlangReflectionType *const *specializationArgs, ISlangBlob **outDiagnostics)
SLANG_API SlangInt spReflectionTypeLayout_getBindingRangeDescriptorSetIndex(SlangReflectionTypeLayout *typeLayout, SlangInt index)
SLANG_API void spSetDebugInfoLevel(SlangCompileRequest *request, SlangDebugInfoLevel level)
SLANG_API unsigned int spReflectionType_GetUserAttributeCount(SlangReflectionType *type)
SLANG_API unsigned int spReflectionGeneric_GetTypeParameterCount(SlangReflectionGeneric *generic)
SLANG_API SlangReflectionType * spReflectionFunction_GetResultType(SlangReflectionFunction *func)
SLANG_API SlangReflectionGeneric * spReflectionVariable_GetGenericContainer(SlangReflectionVariable *var)
SLANG_API void spSetDebugInfoFormat(SlangCompileRequest *request, SlangDebugInfoFormat format)
SLANG_API int spReflectionTypeLayout_getGenericParamIndex(SlangReflectionTypeLayout *type)
SLANG_API ISlangSharedLibraryLoader * spSessionGetSharedLibraryLoader(SlangSession *session)
SLANG_API SlangReflectionType * spReflectionType_applySpecializations(SlangReflectionType *type, SlangReflectionGeneric *generic)
SLANG_API SlangResult spIsParameterLocationUsed(SlangCompileRequest *request, SlangInt entryPointIndex, SlangInt targetIndex, SlangParameterCategory category, SlangUInt spaceIndex, SlangUInt registerIndex, bool &outUsed)
SLANG_API SlangResult spLoadReproAsFileSystem(SlangSession *session, const void *reproData, size_t reproDataSize, ISlangFileSystem *replaceFileSystem, ISlangFileSystemExt **outFileSystem)
SLANG_API SlangReflectionFunction * spReflectionFunction_getOverload(SlangReflectionFunction *func, unsigned int index)
SLANG_API void spAddTranslationUnitSourceString(SlangCompileRequest *request, int translationUnitIndex, char const *path, char const *source)
SLANG_API SlangMatrixLayoutMode spReflectionTypeLayout_GetMatrixLayoutMode(SlangReflectionTypeLayout *type)
SLANG_API SlangResult spSessionCheckCompileTargetSupport(SlangSession *session, SlangCompileTarget target)
SLANG_API SlangReflectionDecl * spReflectionGeneric_asDecl(SlangReflectionGeneric *generic)
SLANG_API SlangReflectionVariableLayout * spReflectionTypeLayout_GetFieldByIndex(SlangReflectionTypeLayout *type, unsigned index)
SLANG_API SlangReflectionVariable * spReflection_FindVarByNameInType(SlangReflection *reflection, SlangReflectionType *reflType, char const *name)
SLANG_API SlangReflectionTypeLayout * spReflectionTypeLayout_getBindingRangeLeafTypeLayout(SlangReflectionTypeLayout *typeLayout, SlangInt index)
SLANG_API void spSetOutputContainerFormat(SlangCompileRequest *request, SlangContainerFormat format)
SLANG_API int spReflectionEntryPoint_usesAnySampleRateInput(SlangReflectionEntryPoint *entryPoint)
SLANG_API unsigned int spReflectionDecl_getChildrenCount(SlangReflectionDecl *parentDecl)
SLANG_API SlangInt spReflectionTypeLayout_getSubObjectRangeCount(SlangReflectionTypeLayout *typeLayout)
SLANG_API size_t spReflectionType_GetElementCount(SlangReflectionType *type)
SLANG_API SlangReflectionVariableLayout * spReflectionVariableLayout_getPendingDataLayout(SlangReflectionVariableLayout *var)
SLANG_API SlangReflectionVariable * spReflectionGeneric_GetTypeParameter(SlangReflectionGeneric *generic, unsigned index)
SLANG_API SlangReflectionVariableLayout * spReflectionEntryPoint_getResultVarLayout(SlangReflectionEntryPoint *entryPoint)
SLANG_API char const * spReflectionEntryPoint_getNameOverride(SlangReflectionEntryPoint *entryPoint)
SLANG_API void spOverrideDiagnosticSeverity(SlangCompileRequest *request, SlangInt messageID, SlangSeverity overrideSeverity)
SLANG_API void spSetDumpIntermediates(SlangCompileRequest *request, int enable)
SLANG_API SlangReflectionVariableLayout * spReflectionTypeLayout_getContainerVarLayout(SlangReflectionTypeLayout *type)
SLANG_API void spAddTargetCapability(slang::ICompileRequest *request, int targetIndex, SlangCapabilityID capability)
SLANG_API SlangReflectionVariableLayout * spReflectionEntryPoint_getVarLayout(SlangReflectionEntryPoint *entryPoint)
SLANG_API char const * spReflectionVariable_GetName(SlangReflectionVariable *var)
SLANG_API bool spReflectionFunction_isOverloaded(SlangReflectionFunction *func)
SLANG_API SlangReflectionEntryPoint * spReflection_getEntryPointByIndex(SlangReflection *reflection, SlangUInt index)
SLANG_API void spSetIgnoreCapabilityCheck(slang::ICompileRequest *request, bool val)
SLANG_API SlangInt spReflectionTypeLayout_getExplicitCounterBindingRangeOffset(SlangReflectionTypeLayout *inTypeLayout)
SLANG_API SlangReflectionFunction * spReflectionFunction_applySpecializations(SlangReflectionFunction *func, SlangReflectionGeneric *generic)
SLANG_API SlangReflectionGeneric * spReflectionDecl_castToGeneric(SlangReflectionDecl *decl)
SLANG_API const char * spReflectionUserAttribute_GetArgumentValueString(SlangReflectionUserAttribute *attrib, unsigned int index, size_t *outSize)
SLANG_API SlangReflectionTypeLayout * spReflection_getGlobalParamsTypeLayout(SlangReflection *reflection)
Get a type layout representing reflection information for the global-scope parameters.
SLANG_API int spAddEntryPoint(SlangCompileRequest *request, int translationUnitIndex, char const *name, SlangStage stage)
SLANG_API SlangReflectionType * spReflection_getTypeFromDecl(SlangReflectionDecl *decl)
SLANG_API unsigned int spReflectionFunction_getOverloadCount(SlangReflectionFunction *func)
SLANG_API SlangReflectionTypeLayout * spReflectionTypeLayout_getPendingDataTypeLayout(SlangReflectionTypeLayout *type)
SLANG_API void spSetTargetForceGLSLScalarBufferLayout(SlangCompileRequest *request, int targetIndex, bool forceScalarLayout)
SLANG_API SlangInt spReflectionTypeLayout_getSubObjectRangeBindingRangeIndex(SlangReflectionTypeLayout *typeLayout, SlangInt subObjectRangeIndex)
SLANG_API void spSetTargetProfile(SlangCompileRequest *request, int targetIndex, SlangProfileID profile)
SLANG_API unsigned int spReflectionType_GetColumnCount(SlangReflectionType *type)
SLANG_API SlangReflectionDecl * spReflectionDecl_getParent(SlangReflectionDecl *decl)
SLANG_API void spAddTranslationUnitSourceBlob(SlangCompileRequest *request, int translationUnitIndex, char const *path, ISlangBlob *sourceBlob)
SLANG_API SlangInt spReflectionTypeLayout_getBindingRangeCount(SlangReflectionTypeLayout *typeLayout)
SLANG_API int spAddEntryPointEx(SlangCompileRequest *request, int translationUnitIndex, char const *name, SlangStage stage, int genericArgCount, char const **genericArgs)
SLANG_API SlangResult spCompile(SlangCompileRequest *request)
SLANG_API SlangResourceShape spReflectionType_GetResourceShape(SlangReflectionType *type)
SLANG_API char const * spReflectionVariableLayout_GetSemanticName(SlangReflectionVariableLayout *var)
SLANG_API void spSessionSetSharedLibraryLoader(SlangSession *session, ISlangSharedLibraryLoader *loader)
SLANG_API SlangReflectionDecl * spReflectionGeneric_GetInnerDecl(SlangReflectionGeneric *generic)
SLANG_API SlangUInt32 spComputeStringHash(const char *chars, size_t count)
SLANG_API SlangReflectionModifier * spReflectionVariable_FindModifier(SlangReflectionVariable *var, SlangModifierID modifierID)
SLANG_API SlangReflectionFunction * spReflectionFunction_specializeWithArgTypes(SlangReflectionFunction *func, SlangInt argTypeCount, SlangReflectionType *const *argTypes)
SLANG_API SlangReflectionGeneric * spReflectionGeneric_GetOuterGenericContainer(SlangReflectionGeneric *generic)
SLANG_API void spReflectionEntryPoint_getComputeThreadGroupSize(SlangReflectionEntryPoint *entryPoint, SlangUInt axisCount, SlangUInt *outSizeAlongAxis)
SLANG_API SlangReflection * spGetReflection(SlangCompileRequest *request)
SLANG_API char const * spReflectionFunction_GetName(SlangReflectionFunction *func)
SLANG_API SlangInt spReflectionTypeLayout_getFieldBindingRangeOffset(SlangReflectionTypeLayout *typeLayout, SlangInt fieldIndex)
SLANG_API SlangReflectionVariableLayout * spReflectionTypeLayout_GetExplicitCounter(SlangReflectionTypeLayout *typeLayout)
SLANG_API void spTranslationUnit_addPreprocessorDefine(SlangCompileRequest *request, int translationUnitIndex, const char *key, const char *value)
SLANG_API SlangReflectionVariable * spReflectionType_GetFieldByIndex(SlangReflectionType *type, unsigned index)
SLANG_API SlangParameterCategory spReflectionTypeLayout_GetCategoryByIndex(SlangReflectionTypeLayout *type, unsigned index)
SLANG_API SlangReflectionDecl * spReflectionDecl_getChild(SlangReflectionDecl *parentDecl, unsigned int index)
SLANG_API void spAddTranslationUnitSourceStringSpan(SlangCompileRequest *request, int translationUnitIndex, char const *path, char const *sourceBegin, char const *sourceEnd)
SLANG_API unsigned spReflectionTypeParameter_GetIndex(SlangReflectionTypeParameter *typeParam)
SLANG_API SlangInt spReflectionTypeLayout_getDescriptorSetDescriptorRangeDescriptorCount(SlangReflectionTypeLayout *typeLayout, SlangInt setIndex, SlangInt rangeIndex)
SLANG_API void spSetTargetFloatingPointMode(SlangCompileRequest *request, int targetIndex, SlangFloatingPointMode mode)
SLANG_API unsigned spReflectionTypeLayout_GetCategoryCount(SlangReflectionTypeLayout *type)
SLANG_API SlangReflectionVariableLayout * spReflection_getGlobalParamsVarLayout(SlangReflection *reflection)
Get a variable layout representing reflection information for the global-scope parameters.
SLANG_API size_t spReflectionVariableLayout_GetSpace(SlangReflectionVariableLayout *var, SlangParameterCategory category)
SLANG_API SlangReflectionGeneric * spReflection_specializeGeneric(SlangReflection *inProgramLayout, SlangReflectionGeneric *generic, SlangInt argCount, SlangReflectionGenericArgType const *argTypes, SlangReflectionGenericArg const *args, ISlangBlob **outDiagnostics)
SLANG_API SlangReflectionType * spReflectionGeneric_GetConcreteType(SlangReflectionGeneric *generic, SlangReflectionVariable *typeParam)
SLANG_API unsigned spReflectionParameter_GetBindingIndex(SlangReflectionParameter *parameter)
SLANG_API SlangReflectionVariableLayout * spReflectionTypeLayout_getSubObjectRangeOffset(SlangReflectionTypeLayout *typeLayout, SlangInt subObjectRangeIndex)
SLANG_API SlangDeclKind spReflectionDecl_getKind(SlangReflectionDecl *decl)
SLANG_API SlangReflectionModifier * spReflectionDecl_findModifier(SlangReflectionDecl *decl, SlangModifierID modifierID)
SLANG_API void spSetDumpIntermediatePrefix(SlangCompileRequest *request, const char *prefix)
SLANG_API void spSetWriter(SlangCompileRequest *request, SlangWriterChannel channel, ISlangWriter *writer)
SLANG_API SlangResult spReflectionUserAttribute_GetArgumentValueInt(SlangReflectionUserAttribute *attrib, unsigned int index, int *rs)
SLANG_API SlangReflectionFunction * spReflection_FindFunctionByName(SlangReflection *reflection, char const *name)
SLANG_API SlangResult spProcessCommandLineArguments(SlangCompileRequest *request, char const *const *args, int argCount)
SLANG_API SlangStage spReflectionVariableLayout_getStage(SlangReflectionVariableLayout *var)
SLANG_API SlangParameterCategory spReflectionTypeLayout_GetParameterCategory(SlangReflectionTypeLayout *type)
SLANG_API SlangProfileID spFindProfile(SlangSession *session, char const *name)
SLANG_API uint32_t spReflectionTypeLayout_GetFieldCount(SlangReflectionTypeLayout *type)
SLANG_API SlangResult spGetTargetCodeBlob(SlangCompileRequest *request, int targetIndex, ISlangBlob **outBlob)
SLANG_API SlangTypeKind spReflectionTypeLayout_getKind(SlangReflectionTypeLayout *type)
SLANG_API SlangResult spReflection_ToJson(SlangReflection *reflection, SlangCompileRequest *request, ISlangBlob **outBlob)
SLANG_API SlangReflectionVariable * spReflectionVariableLayout_GetVariable(SlangReflectionVariableLayout *var)
SLANG_API SlangReflectionType * spReflectionTypeParameter_GetConstraintByIndex(SlangReflectionTypeParameter *typeParam, unsigned int index)
SLANG_API SlangSession * spCreateSession(const char *deprecated=0)
Initialize an instance of the Slang library.
SLANG_API SlangReflectionVariableLayout * spReflectionEntryPoint_getParameterByIndex(SlangReflectionEntryPoint *entryPoint, unsigned index)
SLANG_API SlangResult spSetTypeNameForGlobalExistentialTypeParam(SlangCompileRequest *request, int slotIndex, char const *typeName)
SLANG_API SlangReflectionType * spReflection_FindTypeByName(SlangReflection *reflection, char const *name)
SLANG_API char const * spReflectionTypeParameter_GetName(SlangReflectionTypeParameter *typeParam)
SLANG_API SlangResult spReflectionType_GetFullName(SlangReflectionType *type, ISlangBlob **outNameBlob)
SLANG_API void spSetDefaultModuleName(SlangCompileRequest *request, const char *defaultModuleName)
SLANG_API void spAddPreprocessorDefine(SlangCompileRequest *request, const char *key, const char *value)
SLANG_API unsigned int spReflectionFunction_GetUserAttributeCount(SlangReflectionFunction *func)
SLANG_API char const * spGetTranslationUnitSource(SlangCompileRequest *request, int translationUnitIndex)
SLANG_API size_t spReflectionTypeLayout_GetStride(SlangReflectionTypeLayout *type, SlangParameterCategory category)
SLANG_API bool spReflectionVariable_HasDefaultValue(SlangReflectionVariable *inVar)
SLANG_API void spSetTargetUseMinimumSlangOptimization(slang::ICompileRequest *request, int targetIndex, bool val)
SLANG_API SlangReflectionVariableLayout * spReflectionTypeLayout_GetElementVarLayout(SlangReflectionTypeLayout *type)
SLANG_API SlangResult spGetCompileTimeProfile(SlangCompileRequest *request, ISlangProfiler **compileTimeProfile, bool shouldClear)
SLANG_API SlangInt spReflectionTypeLayout_isBindingRangeSpecializable(SlangReflectionTypeLayout *typeLayout, SlangInt index)
SLANG_API SlangDiagnosticFlags spGetDiagnosticFlags(SlangCompileRequest *request)
SLANG_API void spSetLineDirectiveMode(SlangCompileRequest *request, SlangLineDirectiveMode mode)
SLANG_API unsigned spReflectionParameter_GetBindingSpace(SlangReflectionParameter *parameter)
SLANG_API SlangInt spReflectionTypeLayout_findFieldIndexByName(SlangReflectionTypeLayout *typeLayout, const char *nameBegin, const char *nameEnd)
SLANG_API SlangReflectionTypeLayout * spReflection_GetTypeLayout(SlangReflection *reflection, SlangReflectionType *reflectionType, SlangLayoutRules rules)
SLANG_API SlangReflectionUserAttribute * spReflectionFunction_FindUserAttributeByName(SlangReflectionFunction *func, SlangSession *globalSession, char const *name)
SLANG_API SlangReflectionUserAttribute * spReflectionVariable_FindUserAttributeByName(SlangReflectionVariable *var, SlangSession *globalSession, char const *name)
SLANG_API SlangReflectionVariable * spReflectionFunction_GetParameter(SlangReflectionFunction *func, unsigned index)
SLANG_API SlangReflectionTypeParameter * spReflection_FindTypeParameter(SlangReflection *reflection, char const *name)
SLANG_API char const * spGetDependencyFilePath(SlangCompileRequest *request, int index)
SLANG_API int spAddCodeGenTarget(SlangCompileRequest *request, SlangCompileTarget target)
SLANG_API SlangInt spReflectionTypeLayout_getDescriptorSetDescriptorRangeIndexOffset(SlangReflectionTypeLayout *typeLayout, SlangInt setIndex, SlangInt rangeIndex)
SLANG_API bool spReflection_isSubType(SlangReflection *reflection, SlangReflectionType *subType, SlangReflectionType *superType)
SLANG_API SlangReflectionFunction * spReflection_TryResolveOverloadedFunction(SlangReflection *reflection, uint32_t candidateCount, SlangReflectionFunction **candidates)
SLANG_API SlangInt spReflectionTypeLayout_getDescriptorSetDescriptorRangeCount(SlangReflectionTypeLayout *typeLayout, SlangInt setIndex)
SLANG_API SlangReflectionDecl * spReflectionFunction_asDecl(SlangReflectionFunction *func)
SLANG_API SlangImageFormat spReflectionVariableLayout_GetImageFormat(SlangReflectionVariableLayout *var)
SLANG_API char const * spGetDiagnosticOutput(SlangCompileRequest *request)
SLANG_API unsigned int spReflectionVariable_GetUserAttributeCount(SlangReflectionVariable *var)
struct SlangReflectionGeneric SlangReflectionGeneric
Definition slang.h:1951
SlangSeverity
Definition slang.h:577
int32_t SlangInt
Definition slang.h:559
struct SlangReflectionModifier SlangReflectionModifier
Definition slang.h:1942
int SlangDiagnosticFlags
Definition slang.h:588
SlangResourceShape
Definition slang.h:2044
unsigned int SlangTargetFlags
Flags to control code generation behavior of a compilation target
Definition slang.h:733
uint32_t SlangUInt32
Definition slang.h:542
struct SlangReflectionFunction SlangReflectionFunction
Definition slang.h:1950
struct SlangReflectionVariableLayout SlangReflectionVariableLayout
Definition slang.h:1946
slang::IGlobalSession SlangSession
An instance of the Slang library.
Definition slang.h:1899
SlangLayoutRules
Definition slang.h:2251
SlangReflectionVariableLayout SlangReflectionParameter
Definition slang.h:2287
SlangPassThrough
Definition slang.h:677
SlangEntryPointLayout SlangReflectionEntryPoint
Definition slang.h:1971
SlangProfileID
Definition slang.h:816
SlangParameterCategory
Definition slang.h:2095
SlangContainerFormat
Definition slang.h:666
#define SLANG_API
Definition slang.h:255
SlangDeclKind
Definition slang.h:2029
SlangResourceAccess
Definition slang.h:2081
SlangLineDirectiveMode
Definition slang.h:786
struct slang::ICompileRequest SlangCompileRequest
A request for one or more compilation actions to be performed.
Definition slang.h:1907
SlangImageFormat
Definition slang.h:2276
SlangReflectionGenericArgType
Definition slang.h:1961
struct SlangReflectionUserAttribute SlangReflectionUserAttribute
Definition slang.h:1948
void(* SlangDiagnosticCallback)(char const *message, void *userData)
Callback type used for diagnostic output.
Definition slang.h:1913
SlangSourceLanguage
Definition slang.h:799
struct SlangReflectionTypeParameter SlangReflectionTypeParameter
Definition slang.h:1947
SlangCapabilityID
Definition slang.h:823
SlangMatrixLayoutMode
Definition slang.h:829
SlangDebugInfoLevel
Definition slang.h:889
struct SlangReflectionDecl SlangReflectionDecl
Definition slang.h:1941
SlangBindingType
Definition slang.h:2216
uint32_t SlangUInt
Definition slang.h:560
SlangStage
Definition slang.h:837
SlangCompileTarget
Definition slang.h:615
SlangOptimizationLevel
Definition slang.h:918
struct SlangReflectionType SlangReflectionType
Definition slang.h:1943
struct SlangReflectionVariable SlangReflectionVariable
Definition slang.h:1945
SlangFloatingPointMode
Definition slang.h:764
SlangScalarType
Definition slang.h:2004
struct SlangReflectionTypeLayout SlangReflectionTypeLayout
Definition slang.h:1944
SlangTypeKind
Definition slang.h:1977
SlangDebugInfoFormat
Definition slang.h:902
unsigned int SlangCompileFlags
Definition slang.h:712
SlangWriterChannel
Definition slang.h:1818
SlangProgramLayout SlangReflection
Definition slang.h:1970
SlangModifierID
Definition slang.h:2260
Definition slang.h:1460
Definition slang.h:1653
Definition slang.h:1498
Definition slang.h:1760
Definition slang.h:1876
Definition slang.h:1545
Definition slang.h:1570
Definition slang-cpp-prelude.h:303
Definition slang.h:1835
Definition slang.h:1954