1
2
3
/* automatically generated by rust-bindgen */

pub const SLANG_CLANG : u32 = 1 ; pub const SLANG_VC : u32 = 0 ; pub const SLANG_SNC : u32 = 0 ; pub const SLANG_GHS : u32 = 0 ; pub const SLANG_GCC : u32 = 0 ; pub const SLANG_LINUX : u32 = 1 ; pub const SLANG_WINRT : u32 = 0 ; pub const SLANG_XBOXONE : u32 = 0 ; pub const SLANG_WIN64 : u32 = 0 ; pub const SLANG_X360 : u32 = 0 ; pub const SLANG_WIN32 : u32 = 0 ; pub const SLANG_ANDROID : u32 = 0 ; pub const SLANG_IOS : u32 = 0 ; pub const SLANG_OSX : u32 = 0 ; pub const SLANG_PS3 : u32 = 0 ; pub const SLANG_PS4 : u32 = 0 ; pub const SLANG_PSP2 : u32 = 0 ; pub const SLANG_WIIU : u32 = 0 ; pub const SLANG_HAS_ENUM_CLASS : u32 = 0 ; pub const SLANG_HAS_MOVE_SEMANTICS : u32 = 0 ; pub const SLANG_FACILITY_WIN_GENERAL : u32 = 0 ; pub const SLANG_FACILITY_WIN_INTERFACE : u32 = 4 ; pub const SLANG_FACILITY_WIN_API : u32 = 7 ; pub const SLANG_FACILITY_BASE : u32 = 512 ; pub const SLANG_FACILITY_CORE : u32 = 512 ; pub const SLANG_FACILITY_INTERNAL : u32 = 513 ; pub const SLANG_FACILITY_EXTERNAL_BASE : u32 = 528 ; pub const SLANG_OK : u32 = 0 ; pub const SLANG_ERROR_INSUFFICIENT_BUFFER : i32 = -1 ; pub const SLANG_ERROR_INVALID_PARAMETER : i32 = -2 ; pub type __uint8_t = :: std :: os :: raw :: c_uchar ; pub type __uint16_t = :: std :: os :: raw :: c_ushort ; pub type __int32_t = :: std :: os :: raw :: c_int ; pub type __uint32_t = :: std :: os :: raw :: c_uint ; # [ doc = "@mainpage Introduction" ] # [ doc = "" ] # [ doc = "API Reference: slang.h" ] # [ doc = "" ] # [ doc = "@file slang.h" ] pub type SlangUInt32 = u32 ; pub type SlangInt = isize ; pub type SlangUInt = usize ; pub type SlangBool = bool ; # [ doc = "@brief Severity of a diagnostic generated by the compiler." ] # [ doc = "Values come from the enum below, with higher values representing more severe" ] # [ doc = "conditions, and all values >= SLANG_SEVERITY_ERROR indicating compilation" ] # [ doc = "failure." ] pub type SlangSeverity = :: std :: os :: raw :: c_int ; # [ doc = "< An informative message." ] pub const SLANG_SEVERITY_NOTE : _bindgen_ty_1 = 0 ; # [ doc = "< A warning, which indicates a possible proble." ] pub const SLANG_SEVERITY_WARNING : _bindgen_ty_1 = 1 ; # [ doc = "< An error, indicating that compilation failed." ] pub const SLANG_SEVERITY_ERROR : _bindgen_ty_1 = 2 ; # [ doc = "< An unrecoverable error, which forced compilation to abort." ] pub const SLANG_SEVERITY_FATAL : _bindgen_ty_1 = 3 ; # [ doc = "< An internal error, indicating a logic error in the compiler." ] pub const SLANG_SEVERITY_INTERNAL : _bindgen_ty_1 = 4 ; pub type _bindgen_ty_1 = u32 ; pub type SlangBindableResourceType = :: std :: os :: raw :: c_int ; pub const SLANG_NON_BINDABLE : _bindgen_ty_2 = 0 ; pub const SLANG_TEXTURE : _bindgen_ty_2 = 1 ; pub const SLANG_SAMPLER : _bindgen_ty_2 = 2 ; pub const SLANG_UNIFORM_BUFFER : _bindgen_ty_2 = 3 ; pub const SLANG_STORAGE_BUFFER : _bindgen_ty_2 = 4 ; pub type _bindgen_ty_2 = u32 ; pub type SlangCompileTarget = :: std :: os :: raw :: c_int ; pub const SLANG_TARGET_UNKNOWN : _bindgen_ty_3 = 0 ; pub const SLANG_TARGET_NONE : _bindgen_ty_3 = 1 ; pub const SLANG_GLSL : _bindgen_ty_3 = 2 ; pub const SLANG_GLSL_VULKAN : _bindgen_ty_3 = 3 ; pub const SLANG_GLSL_VULKAN_ONE_DESC : _bindgen_ty_3 = 4 ; pub const SLANG_HLSL : _bindgen_ty_3 = 5 ; pub const SLANG_SPIRV : _bindgen_ty_3 = 6 ; pub const SLANG_SPIRV_ASM : _bindgen_ty_3 = 7 ; pub const SLANG_DXBC : _bindgen_ty_3 = 8 ; pub const SLANG_DXBC_ASM : _bindgen_ty_3 = 9 ; pub const SLANG_DXIL : _bindgen_ty_3 = 10 ; pub const SLANG_DXIL_ASM : _bindgen_ty_3 = 11 ; pub type _bindgen_ty_3 = u32 ; pub type SlangContainerFormat = :: std :: os :: raw :: c_int ; pub const SLANG_CONTAINER_FORMAT_NONE : _bindgen_ty_4 = 0 ; pub const SLANG_CONTAINER_FORMAT_SLANG_MODULE : _bindgen_ty_4 = 1 ; pub type _bindgen_ty_4 = u32 ; pub type SlangPassThrough = :: std :: os :: raw :: c_int ; pub const SLANG_PASS_THROUGH_NONE : _bindgen_ty_5 = 0 ; pub const SLANG_PASS_THROUGH_FXC : _bindgen_ty_5 = 1 ; pub const SLANG_PASS_THROUGH_DXC : _bindgen_ty_5 = 2 ; pub const SLANG_PASS_THROUGH_GLSLANG : _bindgen_ty_5 = 3 ; pub type _bindgen_ty_5 = u32 ; # [ doc = "Flags to control compilation behavior." ] pub type SlangCompileFlags = :: std :: os :: raw :: c_uint ; pub const SLANG_COMPILE_FLAG_NO_MANGLING : _bindgen_ty_6 = 8 ; pub const SLANG_COMPILE_FLAG_NO_CODEGEN : _bindgen_ty_6 = 16 ; pub const SLANG_COMPILE_FLAG_NO_CHECKING : _bindgen_ty_6 = 0 ; pub const SLANG_COMPILE_FLAG_SPLIT_MIXED_TYPES : _bindgen_ty_6 = 0 ; pub type _bindgen_ty_6 = u32 ; # [ doc = "@brief Flags to control code generation behavior of a compilation target" ] pub type SlangTargetFlags = :: std :: os :: raw :: c_uint ; pub const SLANG_TARGET_FLAG_PARAMETER_BLOCKS_USE_REGISTER_SPACES : _bindgen_ty_7 = 16 ; pub type _bindgen_ty_7 = u32 ; # [ doc = "@brief Options to control floating-point precision guarantees for a target." ] pub type SlangFloatingPointMode = :: std :: os :: raw :: c_uint ; pub const SLANG_FLOATING_POINT_MODE_DEFAULT : _bindgen_ty_8 = 0 ; pub const SLANG_FLOATING_POINT_MODE_FAST : _bindgen_ty_8 = 1 ; pub const SLANG_FLOATING_POINT_MODE_PRECISE : _bindgen_ty_8 = 2 ; pub type _bindgen_ty_8 = u32 ; # [ doc = "@brief Options to control emission of `#line` directives" ] pub type SlangLineDirectiveMode = :: std :: os :: raw :: c_uint ; # [ doc = "< Default behavior: pick behavior base on target." ] pub const SLANG_LINE_DIRECTIVE_MODE_DEFAULT : _bindgen_ty_9 = 0 ; # [ doc = "< Don\'t emit line directives at all." ] pub const SLANG_LINE_DIRECTIVE_MODE_NONE : _bindgen_ty_9 = 1 ; # [ doc = "< Emit standard C-style `#line` directives." ] pub const SLANG_LINE_DIRECTIVE_MODE_STANDARD : _bindgen_ty_9 = 2 ; # [ doc = "< Emit GLSL-style directives with file *number* instead of name" ] pub const SLANG_LINE_DIRECTIVE_MODE_GLSL : _bindgen_ty_9 = 3 ; pub type _bindgen_ty_9 = u32 ; pub type SlangSourceLanguage = :: std :: os :: raw :: c_int ; pub const SLANG_SOURCE_LANGUAGE_UNKNOWN : _bindgen_ty_10 = 0 ; pub const SLANG_SOURCE_LANGUAGE_SLANG : _bindgen_ty_10 = 1 ; pub const SLANG_SOURCE_LANGUAGE_HLSL : _bindgen_ty_10 = 2 ; pub const SLANG_SOURCE_LANGUAGE_GLSL : _bindgen_ty_10 = 3 ; pub type _bindgen_ty_10 = u32 ; pub type SlangProfileID = :: std :: os :: raw :: c_uint ; pub const SLANG_PROFILE_UNKNOWN : _bindgen_ty_11 = 0 ; pub type _bindgen_ty_11 = u32 ; pub type SlangMatrixLayoutMode = :: std :: os :: raw :: c_uint ; pub const SLANG_MATRIX_LAYOUT_MODE_UNKNOWN : _bindgen_ty_12 = 0 ; pub const SLANG_MATRIX_LAYOUT_ROW_MAJOR : _bindgen_ty_12 = 1 ; pub const SLANG_MATRIX_LAYOUT_COLUMN_MAJOR : _bindgen_ty_12 = 2 ; pub type _bindgen_ty_12 = u32 ; pub type SlangStage = SlangUInt32 ; pub const SLANG_STAGE_NONE : _bindgen_ty_13 = 0 ; pub const SLANG_STAGE_VERTEX : _bindgen_ty_13 = 1 ; pub const SLANG_STAGE_HULL : _bindgen_ty_13 = 2 ; pub const SLANG_STAGE_DOMAIN : _bindgen_ty_13 = 3 ; pub const SLANG_STAGE_GEOMETRY : _bindgen_ty_13 = 4 ; pub const SLANG_STAGE_FRAGMENT : _bindgen_ty_13 = 5 ; pub const SLANG_STAGE_COMPUTE : _bindgen_ty_13 = 6 ; pub const SLANG_STAGE_RAY_GENERATION : _bindgen_ty_13 = 7 ; pub const SLANG_STAGE_INTERSECTION : _bindgen_ty_13 = 8 ; pub const SLANG_STAGE_ANY_HIT : _bindgen_ty_13 = 9 ; pub const SLANG_STAGE_CLOSEST_HIT : _bindgen_ty_13 = 10 ; pub const SLANG_STAGE_MISS : _bindgen_ty_13 = 11 ; pub const SLANG_STAGE_CALLABLE : _bindgen_ty_13 = 12 ; pub const SLANG_STAGE_PIXEL : _bindgen_ty_13 = 5 ; pub type _bindgen_ty_13 = u32 ; pub type SlangDebugInfoLevel = SlangUInt32 ; # [ doc = "< Don\'t emit debug information at all." ] pub const SLANG_DEBUG_INFO_LEVEL_NONE : _bindgen_ty_14 = 0 ; # [ doc = "< Emit as little debug information as possible, while still supporting stack trackes." ] pub const SLANG_DEBUG_INFO_LEVEL_MINIMAL : _bindgen_ty_14 = 1 ; # [ doc = "< Emit whatever is the standard level of debug information for each target." ] pub const SLANG_DEBUG_INFO_LEVEL_STANDARD : _bindgen_ty_14 = 2 ; # [ doc = "< Emit as much debug infromation as possible for each target." ] pub const SLANG_DEBUG_INFO_LEVEL_MAXIMAL : _bindgen_ty_14 = 3 ; pub type _bindgen_ty_14 = u32 ; pub type SlangOptimizationLevel = SlangUInt32 ; # [ doc = "< Don\'t optimize at all." ] pub const SLANG_OPTIMIZATION_LEVEL_NONE : _bindgen_ty_15 = 0 ; # [ doc = "< Default optimization level: balance code quality and compilation time." ] pub const SLANG_OPTIMIZATION_LEVEL_DEFAULT : _bindgen_ty_15 = 1 ; # [ doc = "< Optimize aggressively." ] pub const SLANG_OPTIMIZATION_LEVEL_HIGH : _bindgen_ty_15 = 2 ; # [ doc = "< Include optimizations that may take a very long time, or may involve severe space-vs-speed tradeoffs" ] pub const SLANG_OPTIMIZATION_LEVEL_MAXIMAL : _bindgen_ty_15 = 3 ; pub type _bindgen_ty_15 = u32 ; # [ doc = " A result code for a Slang API operation." ] # [ doc = "" ] # [ doc = "This type is generally compatible with the Windows API `HRESULT` type. In particular, negative values indicate" ] # [ doc = "failure results, while zero or positive results indicate success." ] # [ doc = "" ] # [ doc = "In general, Slang APIs always return a zero result on success, unless documented otherwise. Strictly speaking" ] # [ doc = "a negative value indicates an error, a positive (or 0) value indicates success. This can be tested for with the macros" ] # [ doc = "SLANG_SUCCEEDED(x) or SLANG_FAILED(x)." ] # [ doc = "" ] # [ doc = "It can represent if the call was successful or not. It can also specify in an extensible manner what facility" ] # [ doc = "produced the result (as the integral \'facility\') as well as what caused it (as an integral \'code\')." ] # [ doc = "Under the covers SlangResult is represented as a int32_t." ] # [ doc = "" ] # [ doc = "SlangResult is designed to be compatible with COM HRESULT." ] # [ doc = "" ] # [ doc = "It\'s layout in bits is as follows" ] # [ doc = "" ] # [ doc = "Severity | Facility | Code" ] # [ doc = "---------|----------|-----" ] # [ doc = "31       |    30-16 | 15-0" ] # [ doc = "" ] # [ doc = "Severity - 1 fail, 0 is success - as SlangResult is signed 32 bits, means negative number indicates failure." ] # [ doc = "Facility is where the error originated from. Code is the code specific to the facility." ] # [ doc = "" ] # [ doc = "Result codes have the following styles," ] # [ doc = "1) SLANG_name" ] # [ doc = "2) SLANG_s_f_name" ] # [ doc = "3) SLANG_s_name" ] # [ doc = "" ] # [ doc = "where s is S for success, E for error" ] # [ doc = "f is the short version of the facility name" ] # [ doc = "" ] # [ doc = "Style 1 is reserved for SLANG_OK and SLANG_FAIL as they are so commonly used." ] # [ doc = "" ] # [ doc = "It is acceptable to expand \'f\' to a longer name to differentiate a name or drop if unique without it." ] # [ doc = "ie for a facility \'DRIVER\' it might make sense to have an error of the form SLANG_E_DRIVER_OUT_OF_MEMORY" ] pub type SlangResult = i32 ; # [ doc = " A \"Universally Unique Identifier\" (UUID)" ] # [ doc = "" ] # [ doc = "The Slang API uses UUIDs to identify interfaces when" ] # [ doc = "using `queryInterface`." ] # [ doc = "" ] # [ doc = "This type is compatible with the `GUID` type defined" ] # [ doc = "by the Component Object Model (COM), but Slang is" ] # [ doc = "not dependent on COM." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct SlangUUID { pub data1 : u32 , pub data2 : u16 , pub data3 : u16 , pub data4 : [ u8 ; 8usize ] , } # [ test ] fn bindgen_test_layout_SlangUUID ( ) { assert_eq ! ( :: std :: mem :: size_of :: < SlangUUID > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( SlangUUID ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < SlangUUID > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( SlangUUID ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < SlangUUID > ( ) ) ) . data1 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( SlangUUID ) , "::" , stringify ! ( data1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < SlangUUID > ( ) ) ) . data2 as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( SlangUUID ) , "::" , stringify ! ( data2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < SlangUUID > ( ) ) ) . data3 as * const _ as usize } , 6usize , concat ! ( "Offset of field: " , stringify ! ( SlangUUID ) , "::" , stringify ! ( data3 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < SlangUUID > ( ) ) ) . data4 as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( SlangUUID ) , "::" , stringify ! ( data4 ) ) ) ; } # [ repr ( C ) ] pub struct ISlangUnknown__bindgen_vtable ( :: std :: os :: raw :: c_void ) ; # [ doc = " Base interface for components exchanged through the API." ] # [ doc = "" ] # [ doc = "This interface definition is compatible with the COM `IUnknown`," ] # [ doc = "and uses the same UUID, but Slang does not require applications" ] # [ doc = "to use or initialize COM." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct ISlangUnknown { pub vtable_ : * const ISlangUnknown__bindgen_vtable , } # [ test ] fn bindgen_test_layout_ISlangUnknown ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ISlangUnknown > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( ISlangUnknown ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ISlangUnknown > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( ISlangUnknown ) ) ) ; } # [ doc = " A \"blob\" of binary data." ] # [ doc = "" ] # [ doc = "This interface definition is compatible with the `ID3DBlob` and `ID3D10Blob` interfaces." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct ISlangBlob { pub _base : ISlangUnknown , } # [ test ] fn bindgen_test_layout_ISlangBlob ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ISlangBlob > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( ISlangBlob ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ISlangBlob > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( ISlangBlob ) ) ) ; } # [ doc = " A (real or virtual) file system." ] # [ doc = "" ] # [ doc = "Slang can make use of this interface whenever it would otherwise try to load files" ] # [ doc = "from disk, allowing applications to hook and/or override filesystem access from" ] # [ doc = "the compiler." ] # [ doc = "" ] # [ doc = "It is the responsibility of" ] # [ doc = "the caller of any method that returns a ISlangBlob to release the blob when it is no" ] # [ doc = "longer used (using \'release\')." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct ISlangFileSystem { pub _base : ISlangUnknown , } # [ test ] fn bindgen_test_layout_ISlangFileSystem ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ISlangFileSystem > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( ISlangFileSystem ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ISlangFileSystem > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( ISlangFileSystem ) ) ) ; } pub type SlangFuncPtr = :: std :: option :: Option < unsafe extern "C" fn ( ) > ; # [ doc = " An interface that can be used to encapsulate access to a shared library. An implementaion" ] # [ doc = "does not have to implement the library as a shared library." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct ISlangSharedLibrary { pub _base : ISlangUnknown , } # [ test ] fn bindgen_test_layout_ISlangSharedLibrary ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ISlangSharedLibrary > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( ISlangSharedLibrary ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ISlangSharedLibrary > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( ISlangSharedLibrary ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct ISlangSharedLibraryLoader { pub _base : ISlangUnknown , } # [ test ] fn bindgen_test_layout_ISlangSharedLibraryLoader ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ISlangSharedLibraryLoader > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( ISlangSharedLibraryLoader ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ISlangSharedLibraryLoader > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( ISlangSharedLibraryLoader ) ) ) ; } pub type SlangPathType = :: std :: os :: raw :: c_uint ; # [ doc = "< Path specified specifies a directory." ] pub const SLANG_PATH_TYPE_DIRECTORY : _bindgen_ty_16 = 0 ; # [ doc = "< Path specified is to a file." ] pub const SLANG_PATH_TYPE_FILE : _bindgen_ty_16 = 1 ; pub type _bindgen_ty_16 = u32 ; # [ doc = " An extended file system abstraction." ] # [ doc = "" ] # [ doc = "Implementing and using this interface over ISlangFileSystem gives much more control over how paths" ] # [ doc = "are managed, as well as how it is determined if two files \'are the same\'." ] # [ doc = "" ] # [ doc = "All paths as input char*, or output as ISlangBlobs are always encoded as UTF-8 strings." ] # [ doc = "Blobs that contain strings are always zero terminated." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct ISlangFileSystemExt { pub _base : ISlangFileSystem , } # [ test ] fn bindgen_test_layout_ISlangFileSystemExt ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ISlangFileSystemExt > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( ISlangFileSystemExt ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ISlangFileSystemExt > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( ISlangFileSystemExt ) ) ) ; } pub type SlangWriterChannel = :: std :: os :: raw :: c_uint ; pub const SLANG_WRITER_CHANNEL_DIAGNOSTIC : _bindgen_ty_17 = 0 ; pub const SLANG_WRITER_CHANNEL_STD_OUTPUT : _bindgen_ty_17 = 1 ; pub const SLANG_WRITER_CHANNEL_STD_ERROR : _bindgen_ty_17 = 2 ; pub const SLANG_WRITER_CHANNEL_COUNT_OF : _bindgen_ty_17 = 3 ; pub type _bindgen_ty_17 = u32 ; pub type SlangWriterMode = :: std :: os :: raw :: c_uint ; pub const SLANG_WRITER_MODE_TEXT : _bindgen_ty_18 = 0 ; pub const SLANG_WRITER_MODE_BINARY : _bindgen_ty_18 = 1 ; pub type _bindgen_ty_18 = u32 ; # [ doc = " A stream typically of text, used for outputting diagnostic as well as other information." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct ISlangWriter { pub _base : ISlangUnknown , } # [ test ] fn bindgen_test_layout_ISlangWriter ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ISlangWriter > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( ISlangWriter ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ISlangWriter > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( ISlangWriter ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct SlangSession { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct SlangLinkage { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct SlangModule { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct SlangCompileRequest { _unused : [ u8 ; 0 ] , } extern "C" { # [ doc = "@brief Initialize an instance of the Slang library." ] pub fn spCreateSession ( deprecated : * const :: std :: os :: raw :: c_char ) -> * mut SlangSession ; } extern "C" { # [ doc = "@brief Clean up after an instance of the Slang library." ] pub fn spDestroySession ( session : * mut SlangSession ) ; } extern "C" { # [ doc = "@brief Set the session shared library loader. If this changes the loader, it may cause shared libraries to be unloaded" ] # [ doc = "@param session Session to set the loader on" ] # [ doc = "@param loader The loader to set. Setting nullptr sets the default loader." ] pub fn spSessionSetSharedLibraryLoader ( session : * mut SlangSession , loader : * mut ISlangSharedLibraryLoader ) ; } extern "C" { # [ doc = "@brief Gets the currently set shared library loader" ] # [ doc = "@param session Session to get the loader from" ] # [ doc = "@return Gets the currently set loader. If returns nullptr, it\'s the default loader" ] pub fn spSessionGetSharedLibraryLoader ( session : * mut SlangSession ) -> * mut ISlangSharedLibraryLoader ; } extern "C" { # [ doc = "@brief Returns SLANG_OK if a the compilation target is supported for this session" ] # [ doc = "@param session Session" ] # [ doc = "@param target The compilation target to test" ] # [ doc = "@return SLANG_OK if the target is available" ] # [ doc = "SLANG_E_NOT_IMPLEMENTED if not implemented in this build" ] # [ doc = "SLANG_E_NOT_FOUND if other resources (such as shared libraries) required to make target work could not be found" ] # [ doc = "SLANG_FAIL other kinds of failures" ] pub fn spSessionCheckCompileTargetSupport ( session : * mut SlangSession , target : SlangCompileTarget ) -> SlangResult ; } extern "C" { # [ doc = "@brief Returns SLANG_OK if a the pass through support is supported for this session" ] # [ doc = "@param session Session" ] # [ doc = "@param target The compilation target to test" ] # [ doc = "@return SLANG_OK if the target is available" ] # [ doc = "SLANG_E_NOT_IMPLEMENTED if not implemented in this build" ] # [ doc = "SLANG_E_NOT_FOUND if other resources (such as shared libraries) required to make target work could not be found" ] # [ doc = "SLANG_FAIL other kinds of failures" ] pub fn spSessionCheckPassThroughSupport ( session : * mut SlangSession , passThrough : SlangPassThrough ) -> SlangResult ; } extern "C" { # [ doc = "@brief Add new builtin declarations to be used in subsequent compiles." ] pub fn spAddBuiltins ( session : * mut SlangSession , sourcePath : * const :: std :: os :: raw :: c_char , sourceString : * const :: std :: os :: raw :: c_char ) ; } extern "C" { pub fn spCreateLinkage ( session : * mut SlangSession ) -> * mut SlangLinkage ; } extern "C" { pub fn spDestroyLinkage ( linkage : * mut SlangLinkage ) ; } extern "C" { pub fn spLoadModule ( linkage : * mut SlangLinkage , moduleName : * const :: std :: os :: raw :: c_char ) -> * mut SlangModule ; } extern "C" { # [ doc = "@brief Create a compile request." ] pub fn spCreateCompileRequest ( session : * mut SlangSession ) -> * mut SlangCompileRequest ; } extern "C" { # [ doc = "@brief Destroy a compile request." ] pub fn spDestroyCompileRequest ( request : * mut SlangCompileRequest ) ; } extern "C" { # [ doc = " Set the filesystem hook to use for a compile request" ] # [ doc = "" ] # [ doc = "The provided `fileSystem` will be used to load any files that" ] # [ doc = "need to be loaded during processing of the compile `request`." ] # [ doc = "This includes:" ] # [ doc = "" ] # [ doc = "- Source files loaded via `spAddTranslationUnitSourceFile`" ] # [ doc = "- Files referenced via `#include`" ] # [ doc = "- Files loaded to resolve `#import` operations" ] # [ doc = "" ] pub fn spSetFileSystem ( request : * mut SlangCompileRequest , fileSystem : * mut ISlangFileSystem ) ; } extern "C" { # [ doc = "@brief Set flags to be used for compilation." ] pub fn spSetCompileFlags ( request : * mut SlangCompileRequest , flags : SlangCompileFlags ) ; } extern "C" { # [ doc = "@brief Set whether to dump intermediate results (for debugging) or not." ] pub fn spSetDumpIntermediates ( request : * mut SlangCompileRequest , enable : :: std :: os :: raw :: c_int ) ; } extern "C" { # [ doc = "@brief Set whether (and how) `#line` directives should be output." ] pub fn spSetLineDirectiveMode ( request : * mut SlangCompileRequest , mode : SlangLineDirectiveMode ) ; } extern "C" { # [ doc = "@brief Sets the target for code generation." ] # [ doc = "@param request The compilation context." ] # [ doc = "@param target The code generation target. Possible values are:" ] # [ doc = "- SLANG_GLSL. Generates GLSL code." ] # [ doc = "- SLANG_HLSL. Generates HLSL code." ] # [ doc = "- SLANG_SPIRV. Generates SPIR-V code." ] pub fn spSetCodeGenTarget ( request : * mut SlangCompileRequest , target : SlangCompileTarget ) ; } extern "C" { # [ doc = "@brief Add a code-generation target to be used." ] pub fn spAddCodeGenTarget ( request : * mut SlangCompileRequest , target : SlangCompileTarget ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn spSetTargetProfile ( request : * mut SlangCompileRequest , targetIndex : :: std :: os :: raw :: c_int , profile : SlangProfileID ) ; } extern "C" { pub fn spSetTargetFlags ( request : * mut SlangCompileRequest , targetIndex : :: std :: os :: raw :: c_int , flags : SlangTargetFlags ) ; } extern "C" { # [ doc = "@brief Set the floating point mode (e.g., precise or fast) to use a target." ] pub fn spSetTargetFloatingPointMode ( request : * mut SlangCompileRequest , targetIndex : :: std :: os :: raw :: c_int , mode : SlangFloatingPointMode ) ; } extern "C" { pub fn spSetTargetMatrixLayoutMode ( request : * mut SlangCompileRequest , targetIndex : :: std :: os :: raw :: c_int , mode : SlangMatrixLayoutMode ) ; } extern "C" { pub fn spSetMatrixLayoutMode ( request : * mut SlangCompileRequest , mode : SlangMatrixLayoutMode ) ; } extern "C" { # [ doc = "@brief Set the level of debug information to produce." ] pub fn spSetDebugInfoLevel ( request : * mut SlangCompileRequest , level : SlangDebugInfoLevel ) ; } extern "C" { # [ doc = "@brief Set the level of optimization to perform." ] pub fn spSetOptimizationLevel ( request : * mut SlangCompileRequest , level : SlangOptimizationLevel ) ; } extern "C" { # [ doc = "@brief Set the container format to be used for binary output." ] pub fn spSetOutputContainerFormat ( request : * mut SlangCompileRequest , format : SlangContainerFormat ) ; } extern "C" { pub fn spSetPassThrough ( request : * mut SlangCompileRequest , passThrough : SlangPassThrough ) ; } pub type SlangDiagnosticCallback = :: std :: option :: Option < unsafe extern "C" fn ( message : * const :: std :: os :: raw :: c_char , userData : * mut :: std :: os :: raw :: c_void ) > ; extern "C" { pub fn spSetDiagnosticCallback ( request : * mut SlangCompileRequest , callback : SlangDiagnosticCallback , userData : * const :: std :: os :: raw :: c_void ) ; } extern "C" { pub fn spSetWriter ( request : * mut SlangCompileRequest , channel : SlangWriterChannel , writer : * mut ISlangWriter ) ; } extern "C" { pub fn spGetWriter ( request : * mut SlangCompileRequest , channel : SlangWriterChannel ) -> * mut ISlangWriter ; } extern "C" { # [ doc = "@brief Add a path to use when searching for referenced files." ] # [ doc = "This will be used for both `#include` directives and also for explicit `__import` declarations." ] # [ doc = "@param ctx The compilation context." ] # [ doc = "@param searchDir The additional search directory." ] pub fn spAddSearchPath ( request : * mut SlangCompileRequest , searchDir : * const :: std :: os :: raw :: c_char ) ; } extern "C" { # [ doc = "@brief Add a macro definition to be used during preprocessing." ] # [ doc = "@param key The name of the macro to define." ] # [ doc = "@param value The value of the macro to define." ] pub fn spAddPreprocessorDefine ( request : * mut SlangCompileRequest , key : * const :: std :: os :: raw :: c_char , value : * const :: std :: os :: raw :: c_char ) ; } extern "C" { # [ doc = "@brief Set options using arguments as if specified via command line." ] # [ doc = "@return Returns SlangResult. On success SLANG_SUCCEEDED(result) is true." ] pub fn spProcessCommandLineArguments ( request : * mut SlangCompileRequest , args : * const * const :: std :: os :: raw :: c_char , argCount : :: std :: os :: raw :: c_int ) -> SlangResult ; } extern "C" { # [ doc = " Add a distinct translation unit to the compilation request" ] # [ doc = "" ] # [ doc = "`name` is optional." ] # [ doc = "Returns the zero-based index of the translation unit created." ] pub fn spAddTranslationUnit ( request : * mut SlangCompileRequest , language : SlangSourceLanguage , name : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Add a preprocessor definition that is scoped to a single translation unit." ] # [ doc = "" ] # [ doc = "@param translationUnitIndex The index of the translation unit to get the definition." ] # [ doc = "@param key The name of the macro to define." ] # [ doc = "@param value The value of the macro to define." ] pub fn spTranslationUnit_addPreprocessorDefine ( request : * mut SlangCompileRequest , translationUnitIndex : :: std :: os :: raw :: c_int , key : * const :: std :: os :: raw :: c_char , value : * const :: std :: os :: raw :: c_char ) ; } extern "C" { # [ doc = " Add a source file to the given translation unit." ] # [ doc = "" ] # [ doc = "If a user-defined file system has been specified via" ] # [ doc = "`spSetFileSystem`, then it will be used to load the" ] # [ doc = "file at `path`. Otherwise, Slang will use the OS" ] # [ doc = "file system." ] # [ doc = "" ] # [ doc = "This function does *not* search for a file using" ] # [ doc = "the registered search paths (`spAddSearchPath`)," ] # [ doc = "and instead using the given `path` as-is." ] pub fn spAddTranslationUnitSourceFile ( request : * mut SlangCompileRequest , translationUnitIndex : :: std :: os :: raw :: c_int , path : * const :: std :: os :: raw :: c_char ) ; } extern "C" { # [ doc = " Add a source string to the given translation unit." ] # [ doc = "" ] # [ doc = "@param request The compile request that owns the translation unit." ] # [ doc = "@param translationUnitIndex The index of the translation unit to add source to." ] # [ doc = "@param path The file-system path that should be assumed for the source code." ] # [ doc = "@param source A null-terminated UTF-8 encoded string of source code." ] # [ doc = "" ] # [ doc = "The implementation will make a copy of the source code data." ] # [ doc = "An application may free the buffer immediately after this call returns." ] # [ doc = "" ] # [ doc = "The `path` will be used in any diagnostic output, as well" ] # [ doc = "as to determine the base path when resolving relative" ] # [ doc = "`#include`s." ] pub fn spAddTranslationUnitSourceString ( request : * mut SlangCompileRequest , translationUnitIndex : :: std :: os :: raw :: c_int , path : * const :: std :: os :: raw :: c_char , source : * const :: std :: os :: raw :: c_char ) ; } extern "C" { # [ doc = " Add a source string to the given translation unit." ] # [ doc = "" ] # [ doc = "@param request The compile request that owns the translation unit." ] # [ doc = "@param translationUnitIndex The index of the translation unit to add source to." ] # [ doc = "@param path The file-system path that should be assumed for the source code." ] # [ doc = "@param sourceBegin A pointer to a buffer of UTF-8 encoded source code." ] # [ doc = "@param sourceEnd A pointer to to the end of the buffer specified in `sourceBegin`" ] # [ doc = "" ] # [ doc = "The implementation will make a copy of the source code data." ] # [ doc = "An application may free the buffer immediately after this call returns." ] # [ doc = "" ] # [ doc = "The `path` will be used in any diagnostic output, as well" ] # [ doc = "as to determine the base path when resolving relative" ] # [ doc = "`#include`s." ] pub fn spAddTranslationUnitSourceStringSpan ( request : * mut SlangCompileRequest , translationUnitIndex : :: std :: os :: raw :: c_int , path : * const :: std :: os :: raw :: c_char , sourceBegin : * const :: std :: os :: raw :: c_char , sourceEnd : * const :: std :: os :: raw :: c_char ) ; } extern "C" { # [ doc = " Add a blob of source code to the given translation unit." ] # [ doc = "" ] # [ doc = "@param request The compile request that owns the translation unit." ] # [ doc = "@param translationUnitIndex The index of the translation unit to add source to." ] # [ doc = "@param path The file-system path that should be assumed for the source code." ] # [ doc = "@param sourceBlob A blob containing UTF-8 encoded source code." ] # [ doc = "@param sourceEnd A pointer to to the end of the buffer specified in `sourceBegin`" ] # [ doc = "" ] # [ doc = "The compile request will retain a reference to the blob." ] # [ doc = "" ] # [ doc = "The `path` will be used in any diagnostic output, as well" ] # [ doc = "as to determine the base path when resolving relative" ] # [ doc = "`#include`s." ] pub fn spAddTranslationUnitSourceBlob ( request : * mut SlangCompileRequest , translationUnitIndex : :: std :: os :: raw :: c_int , path : * const :: std :: os :: raw :: c_char , sourceBlob : * mut ISlangBlob ) ; } extern "C" { # [ doc = " Look up a compilation profile by name." ] # [ doc = "" ] # [ doc = "For example, one could look up the string `\"ps_5_0\"` to find the corresponding target ID." ] pub fn spFindProfile ( session : * mut SlangSession , name : * const :: std :: os :: raw :: c_char ) -> SlangProfileID ; } extern "C" { # [ doc = " Add an entry point in a particular translation unit" ] pub fn spAddEntryPoint ( request : * mut SlangCompileRequest , translationUnitIndex : :: std :: os :: raw :: c_int , name : * const :: std :: os :: raw :: c_char , stage : SlangStage ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Add an entry point in a particular translation unit," ] # [ doc = "with additional arguments that specify the concrete" ] # [ doc = "type names for entry-point generic type parameters." ] pub fn spAddEntryPointEx ( request : * mut SlangCompileRequest , translationUnitIndex : :: std :: os :: raw :: c_int , name : * const :: std :: os :: raw :: c_char , stage : SlangStage , genericArgCount : :: std :: os :: raw :: c_int , genericArgs : * mut * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Specify the arguments to use for global generic parameters." ] pub fn spSetGlobalGenericArgs ( request : * mut SlangCompileRequest , genericArgCount : :: std :: os :: raw :: c_int , genericArgs : * mut * const :: std :: os :: raw :: c_char ) -> SlangResult ; } extern "C" { # [ doc = " Specify the concrete type to be used for a global \"existential slot.\"" ] # [ doc = "" ] # [ doc = "Every shader parameter (or leaf field of a `struct`-type shader parameter)" ] # [ doc = "that has an interface or array-of-interface type introduces an existential" ] # [ doc = "slot. The number of slots consumed by a shader parameter, and the starting" ] # [ doc = "slot of each parameter can be queried via the reflection API using" ] # [ doc = "`SLANG_PARAMETER_CATEGORY_EXISTENTIAL_TYPE_PARAM`." ] # [ doc = "" ] # [ doc = "In order to generate specialized code, a concrete type needs to be specified" ] # [ doc = "for each existential slot. This function specifies the name of the type" ] # [ doc = "(or in general a type *expression*) to use for a specific slot at the" ] # [ doc = "global scope." ] pub fn spSetTypeNameForGlobalExistentialTypeParam ( request : * mut SlangCompileRequest , slotIndex : :: std :: os :: raw :: c_int , typeName : * const :: std :: os :: raw :: c_char ) -> SlangResult ; } extern "C" { # [ doc = " Specify the concrete type to be used for an entry-point \"existential slot.\"" ] # [ doc = "" ] # [ doc = "Every shader parameter (or leaf field of a `struct`-type shader parameter)" ] # [ doc = "that has an interface or array-of-interface type introduces an existential" ] # [ doc = "slot. The number of slots consumed by a shader parameter, and the starting" ] # [ doc = "slot of each parameter can be queried via the reflection API using" ] # [ doc = "`SLANG_PARAMETER_CATEGORY_EXISTENTIAL_TYPE_PARAM`." ] # [ doc = "" ] # [ doc = "In order to generate specialized code, a concrete type needs to be specified" ] # [ doc = "for each existential slot. This function specifies the name of the type" ] # [ doc = "(or in general a type *expression*) to use for a specific slot at the" ] # [ doc = "entry-point scope." ] pub fn spSetTypeNameForEntryPointExistentialTypeParam ( request : * mut SlangCompileRequest , entryPointIndex : :: std :: os :: raw :: c_int , slotIndex : :: std :: os :: raw :: c_int , typeName : * const :: std :: os :: raw :: c_char ) -> SlangResult ; } extern "C" { # [ doc = " Execute the compilation request." ] # [ doc = "" ] # [ doc = "@returns  SlangResult, SLANG_OK on success. Use SLANG_SUCCEEDED() and SLANG_FAILED() to test SlangResult." ] pub fn spCompile ( request : * mut SlangCompileRequest ) -> SlangResult ; } extern "C" { # [ doc = " Get any diagnostic messages reported by the compiler." ] # [ doc = "" ] # [ doc = "@returns A null-terminated UTF-8 encoded string of diagnostic messages." ] # [ doc = "" ] # [ doc = "The returned pointer is only guaranteed to be valid" ] # [ doc = "until `request` is destroyed. Applications that wish to" ] # [ doc = "hold on to the diagnostic output for longer should use" ] # [ doc = "`spGetDiagnosticOutputBlob`." ] pub fn spGetDiagnosticOutput ( request : * mut SlangCompileRequest ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " Get diagnostic messages reported by the compiler." ] # [ doc = "" ] # [ doc = "@param request The compile request to get output from." ] # [ doc = "@param outBlob A pointer to receive a blob holding a nul-terminated UTF-8 encoded string of diagnostic messages." ] # [ doc = "@returns A `SlangResult` indicating success or failure." ] pub fn spGetDiagnosticOutputBlob ( request : * mut SlangCompileRequest , outBlob : * mut * mut ISlangBlob ) -> SlangResult ; } extern "C" { # [ doc = " Get the number of files that this compilation depended on." ] # [ doc = "" ] # [ doc = "This includes both the explicit source files, as well as any" ] # [ doc = "additional files that were transitively referenced (e.g., via" ] # [ doc = "a `#include` directive)." ] pub fn spGetDependencyFileCount ( request : * mut SlangCompileRequest ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Get the path to a file this compilation depended on." ] pub fn spGetDependencyFilePath ( request : * mut SlangCompileRequest , index : :: std :: os :: raw :: c_int ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " Get the number of translation units associated with the compilation request" ] pub fn spGetTranslationUnitCount ( request : * mut SlangCompileRequest ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Get the output source code associated with a specific entry point." ] # [ doc = "" ] # [ doc = "The lifetime of the output pointer is the same as `request`." ] pub fn spGetEntryPointSource ( request : * mut SlangCompileRequest , entryPointIndex : :: std :: os :: raw :: c_int ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " Get the output bytecode associated with a specific entry point." ] # [ doc = "" ] # [ doc = "The lifetime of the output pointer is the same as `request`." ] pub fn spGetEntryPointCode ( request : * mut SlangCompileRequest , entryPointIndex : :: std :: os :: raw :: c_int , outSize : * mut usize ) -> * const :: std :: os :: raw :: c_void ; } extern "C" { # [ doc = " Get the output code associated with a specific entry point." ] # [ doc = "" ] # [ doc = "@param entryPointIndex The index of the entry point to get code for." ] # [ doc = "@param targetIndex The index of the target to get code for (default: zero)." ] # [ doc = "@param outBlob A pointer that will receive the blob of code" ] # [ doc = "@returns A `SlangResult` to indicate success or failure." ] # [ doc = "" ] # [ doc = "The lifetime of the output pointer is the same as `request`." ] pub fn spGetEntryPointCodeBlob ( request : * mut SlangCompileRequest , entryPointIndex : :: std :: os :: raw :: c_int , targetIndex : :: std :: os :: raw :: c_int , outBlob : * mut * mut ISlangBlob ) -> SlangResult ; } extern "C" { # [ doc = " Get the output bytecode associated with an entire compile request." ] # [ doc = "" ] # [ doc = "The lifetime of the output pointer is the same as `request`." ] pub fn spGetCompileRequestCode ( request : * mut SlangCompileRequest , outSize : * mut usize ) -> * const :: std :: os :: raw :: c_void ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct SlangReflection { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct SlangReflectionEntryPoint { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct SlangReflectionModifier { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct SlangReflectionType { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct SlangReflectionTypeLayout { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct SlangReflectionVariable { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct SlangReflectionVariableLayout { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct SlangReflectionTypeParameter { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct SlangReflectionUserAttribute { _unused : [ u8 ; 0 ] , } extern "C" { pub fn spGetReflection ( request : * mut SlangCompileRequest ) -> * mut SlangReflection ; } pub type SlangTypeKind = :: std :: os :: raw :: c_uint ; pub const SLANG_TYPE_KIND_NONE : _bindgen_ty_19 = 0 ; pub const SLANG_TYPE_KIND_STRUCT : _bindgen_ty_19 = 1 ; pub const SLANG_TYPE_KIND_ARRAY : _bindgen_ty_19 = 2 ; pub const SLANG_TYPE_KIND_MATRIX : _bindgen_ty_19 = 3 ; pub const SLANG_TYPE_KIND_VECTOR : _bindgen_ty_19 = 4 ; pub const SLANG_TYPE_KIND_SCALAR : _bindgen_ty_19 = 5 ; pub const SLANG_TYPE_KIND_CONSTANT_BUFFER : _bindgen_ty_19 = 6 ; pub const SLANG_TYPE_KIND_RESOURCE : _bindgen_ty_19 = 7 ; pub const SLANG_TYPE_KIND_SAMPLER_STATE : _bindgen_ty_19 = 8 ; pub const SLANG_TYPE_KIND_TEXTURE_BUFFER : _bindgen_ty_19 = 9 ; pub const SLANG_TYPE_KIND_SHADER_STORAGE_BUFFER : _bindgen_ty_19 = 10 ; pub const SLANG_TYPE_KIND_PARAMETER_BLOCK : _bindgen_ty_19 = 11 ; pub const SLANG_TYPE_KIND_GENERIC_TYPE_PARAMETER : _bindgen_ty_19 = 12 ; pub const SLANG_TYPE_KIND_INTERFACE : _bindgen_ty_19 = 13 ; pub const SLANG_TYPE_KIND_OUTPUT_STREAM : _bindgen_ty_19 = 14 ; pub const SLANG_TYPE_KIND_COUNT : _bindgen_ty_19 = 15 ; pub type _bindgen_ty_19 = u32 ; pub type SlangScalarType = :: std :: os :: raw :: c_uint ; pub const SLANG_SCALAR_TYPE_NONE : _bindgen_ty_20 = 0 ; pub const SLANG_SCALAR_TYPE_VOID : _bindgen_ty_20 = 1 ; pub const SLANG_SCALAR_TYPE_BOOL : _bindgen_ty_20 = 2 ; pub const SLANG_SCALAR_TYPE_INT32 : _bindgen_ty_20 = 3 ; pub const SLANG_SCALAR_TYPE_UINT32 : _bindgen_ty_20 = 4 ; pub const SLANG_SCALAR_TYPE_INT64 : _bindgen_ty_20 = 5 ; pub const SLANG_SCALAR_TYPE_UINT64 : _bindgen_ty_20 = 6 ; pub const SLANG_SCALAR_TYPE_FLOAT16 : _bindgen_ty_20 = 7 ; pub const SLANG_SCALAR_TYPE_FLOAT32 : _bindgen_ty_20 = 8 ; pub const SLANG_SCALAR_TYPE_FLOAT64 : _bindgen_ty_20 = 9 ; pub const SLANG_SCALAR_TYPE_INT8 : _bindgen_ty_20 = 10 ; pub const SLANG_SCALAR_TYPE_UINT8 : _bindgen_ty_20 = 11 ; pub const SLANG_SCALAR_TYPE_INT16 : _bindgen_ty_20 = 12 ; pub const SLANG_SCALAR_TYPE_UINT16 : _bindgen_ty_20 = 13 ; pub type _bindgen_ty_20 = u32 ; pub type SlangResourceShape = :: std :: os :: raw :: c_uint ; pub const SLANG_RESOURCE_BASE_SHAPE_MASK : _bindgen_ty_21 = 15 ; pub const SLANG_RESOURCE_NONE : _bindgen_ty_21 = 0 ; pub const SLANG_TEXTURE_1D : _bindgen_ty_21 = 1 ; pub const SLANG_TEXTURE_2D : _bindgen_ty_21 = 2 ; pub const SLANG_TEXTURE_3D : _bindgen_ty_21 = 3 ; pub const SLANG_TEXTURE_CUBE : _bindgen_ty_21 = 4 ; pub const SLANG_TEXTURE_BUFFER : _bindgen_ty_21 = 5 ; pub const SLANG_STRUCTURED_BUFFER : _bindgen_ty_21 = 6 ; pub const SLANG_BYTE_ADDRESS_BUFFER : _bindgen_ty_21 = 7 ; pub const SLANG_RESOURCE_UNKNOWN : _bindgen_ty_21 = 8 ; pub const SLANG_ACCELERATION_STRUCTURE : _bindgen_ty_21 = 9 ; pub const SLANG_RESOURCE_EXT_SHAPE_MASK : _bindgen_ty_21 = 240 ; pub const SLANG_TEXTURE_ARRAY_FLAG : _bindgen_ty_21 = 64 ; pub const SLANG_TEXTURE_MULTISAMPLE_FLAG : _bindgen_ty_21 = 128 ; pub const SLANG_TEXTURE_1D_ARRAY : _bindgen_ty_21 = 65 ; pub const SLANG_TEXTURE_2D_ARRAY : _bindgen_ty_21 = 66 ; pub const SLANG_TEXTURE_CUBE_ARRAY : _bindgen_ty_21 = 68 ; pub const SLANG_TEXTURE_2D_MULTISAMPLE : _bindgen_ty_21 = 130 ; pub const SLANG_TEXTURE_2D_MULTISAMPLE_ARRAY : _bindgen_ty_21 = 194 ; pub type _bindgen_ty_21 = u32 ; pub type SlangResourceAccess = :: std :: os :: raw :: c_uint ; pub const SLANG_RESOURCE_ACCESS_NONE : _bindgen_ty_22 = 0 ; pub const SLANG_RESOURCE_ACCESS_READ : _bindgen_ty_22 = 1 ; pub const SLANG_RESOURCE_ACCESS_READ_WRITE : _bindgen_ty_22 = 2 ; pub const SLANG_RESOURCE_ACCESS_RASTER_ORDERED : _bindgen_ty_22 = 3 ; pub const SLANG_RESOURCE_ACCESS_APPEND : _bindgen_ty_22 = 4 ; pub const SLANG_RESOURCE_ACCESS_CONSUME : _bindgen_ty_22 = 5 ; pub type _bindgen_ty_22 = u32 ; pub type SlangParameterCategory = :: std :: os :: raw :: c_uint ; pub const SLANG_PARAMETER_CATEGORY_NONE : _bindgen_ty_23 = 0 ; pub const SLANG_PARAMETER_CATEGORY_MIXED : _bindgen_ty_23 = 1 ; pub const SLANG_PARAMETER_CATEGORY_CONSTANT_BUFFER : _bindgen_ty_23 = 2 ; pub const SLANG_PARAMETER_CATEGORY_SHADER_RESOURCE : _bindgen_ty_23 = 3 ; pub const SLANG_PARAMETER_CATEGORY_UNORDERED_ACCESS : _bindgen_ty_23 = 4 ; pub const SLANG_PARAMETER_CATEGORY_VARYING_INPUT : _bindgen_ty_23 = 5 ; pub const SLANG_PARAMETER_CATEGORY_VARYING_OUTPUT : _bindgen_ty_23 = 6 ; pub const SLANG_PARAMETER_CATEGORY_SAMPLER_STATE : _bindgen_ty_23 = 7 ; pub const SLANG_PARAMETER_CATEGORY_UNIFORM : _bindgen_ty_23 = 8 ; pub const SLANG_PARAMETER_CATEGORY_DESCRIPTOR_TABLE_SLOT : _bindgen_ty_23 = 9 ; pub const SLANG_PARAMETER_CATEGORY_SPECIALIZATION_CONSTANT : _bindgen_ty_23 = 10 ; pub const SLANG_PARAMETER_CATEGORY_PUSH_CONSTANT_BUFFER : _bindgen_ty_23 = 11 ; pub const SLANG_PARAMETER_CATEGORY_REGISTER_SPACE : _bindgen_ty_23 = 12 ; pub const SLANG_PARAMETER_CATEGORY_GENERIC : _bindgen_ty_23 = 13 ; pub const SLANG_PARAMETER_CATEGORY_RAY_PAYLOAD : _bindgen_ty_23 = 14 ; pub const SLANG_PARAMETER_CATEGORY_HIT_ATTRIBUTES : _bindgen_ty_23 = 15 ; pub const SLANG_PARAMETER_CATEGORY_CALLABLE_PAYLOAD : _bindgen_ty_23 = 16 ; pub const SLANG_PARAMETER_CATEGORY_SHADER_RECORD : _bindgen_ty_23 = 17 ; pub const SLANG_PARAMETER_CATEGORY_EXISTENTIAL_TYPE_PARAM : _bindgen_ty_23 = 18 ; pub const SLANG_PARAMETER_CATEGORY_EXISTENTIAL_OBJECT_PARAM : _bindgen_ty_23 = 19 ; pub const SLANG_PARAMETER_CATEGORY_COUNT : _bindgen_ty_23 = 20 ; pub const SLANG_PARAMETER_CATEGORY_VERTEX_INPUT : _bindgen_ty_23 = 5 ; pub const SLANG_PARAMETER_CATEGORY_FRAGMENT_OUTPUT : _bindgen_ty_23 = 6 ; pub type _bindgen_ty_23 = u32 ; pub type SlangLayoutRules = SlangUInt32 ; pub const SLANG_LAYOUT_RULES_DEFAULT : _bindgen_ty_24 = 0 ; pub type _bindgen_ty_24 = u32 ; pub type SlangModifierID = SlangUInt32 ; pub const SLANG_MODIFIER_SHARED : _bindgen_ty_25 = 0 ; pub type _bindgen_ty_25 = u32 ; extern "C" { pub fn spReflectionUserAttribute_GetName ( attrib : * mut SlangReflectionUserAttribute ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn spReflectionUserAttribute_GetArgumentCount ( attrib : * mut SlangReflectionUserAttribute ) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn spReflectionUserAttribute_GetArgumentType ( attrib : * mut SlangReflectionUserAttribute , index : :: std :: os :: raw :: c_uint ) -> * mut SlangReflectionType ; } extern "C" { pub fn spReflectionUserAttribute_GetArgumentValueInt ( attrib : * mut SlangReflectionUserAttribute , index : :: std :: os :: raw :: c_uint , rs : * mut :: std :: os :: raw :: c_int ) -> SlangResult ; } extern "C" { pub fn spReflectionUserAttribute_GetArgumentValueFloat ( attrib : * mut SlangReflectionUserAttribute , index : :: std :: os :: raw :: c_uint , rs : * mut f32 ) -> SlangResult ; } extern "C" { # [ doc = " Returns the string-typed value of a user attribute argument" ] # [ doc = "The string returned is not null-terminated. The length of the string is returned via `outSize`." ] # [ doc = "If index of out of range, or if the specified argument is not a string, the function will return nullptr." ] pub fn spReflectionUserAttribute_GetArgumentValueString ( attrib : * mut SlangReflectionUserAttribute , index : :: std :: os :: raw :: c_uint , outSize : * mut usize ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn spReflectionType_GetKind ( type_ : * mut SlangReflectionType ) -> SlangTypeKind ; } extern "C" { pub fn spReflectionType_GetUserAttributeCount ( type_ : * mut SlangReflectionType ) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn spReflectionType_GetUserAttribute ( type_ : * mut SlangReflectionType , index : :: std :: os :: raw :: c_uint ) -> * mut SlangReflectionUserAttribute ; } extern "C" { pub fn spReflectionType_FindUserAttributeByName ( type_ : * mut SlangReflectionType , name : * const :: std :: os :: raw :: c_char ) -> * mut SlangReflectionUserAttribute ; } extern "C" { pub fn spReflectionType_GetFieldCount ( type_ : * mut SlangReflectionType ) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn spReflectionType_GetFieldByIndex ( type_ : * mut SlangReflectionType , index : :: std :: os :: raw :: c_uint ) -> * mut SlangReflectionVariable ; } extern "C" { # [ doc = " Returns the number of elements in the given type." ] # [ doc = "" ] # [ doc = "This operation is valid for vector and array types. For other types it returns zero." ] # [ doc = "" ] # [ doc = "When invoked on an unbounded-size array it will return `SLANG_UNBOUNDED_SIZE`," ] # [ doc = "which is defined to be `~size_t(0)`." ] # [ doc = "" ] # [ doc = "If the size of a type cannot be statically computed, perhaps because it depends on" ] # [ doc = "a generic parameter that has not been bound to a specific value, this function returns zero." ] pub fn spReflectionType_GetElementCount ( type_ : * mut SlangReflectionType ) -> usize ; } extern "C" { pub fn spReflectionType_GetElementType ( type_ : * mut SlangReflectionType ) -> * mut SlangReflectionType ; } extern "C" { pub fn spReflectionType_GetRowCount ( type_ : * mut SlangReflectionType ) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn spReflectionType_GetColumnCount ( type_ : * mut SlangReflectionType ) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn spReflectionType_GetScalarType ( type_ : * mut SlangReflectionType ) -> SlangScalarType ; } extern "C" { pub fn spReflectionType_GetResourceShape ( type_ : * mut SlangReflectionType ) -> SlangResourceShape ; } extern "C" { pub fn spReflectionType_GetResourceAccess ( type_ : * mut SlangReflectionType ) -> SlangResourceAccess ; } extern "C" { pub fn spReflectionType_GetResourceResultType ( type_ : * mut SlangReflectionType ) -> * mut SlangReflectionType ; } extern "C" { pub fn spReflectionType_GetName ( type_ : * mut SlangReflectionType ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn spReflectionTypeLayout_GetType ( type_ : * mut SlangReflectionTypeLayout ) -> * mut SlangReflectionType ; } extern "C" { pub fn spReflectionTypeLayout_GetSize ( type_ : * mut SlangReflectionTypeLayout , category : SlangParameterCategory ) -> usize ; } extern "C" { pub fn spReflectionTypeLayout_GetFieldByIndex ( type_ : * mut SlangReflectionTypeLayout , index : :: std :: os :: raw :: c_uint ) -> * mut SlangReflectionVariableLayout ; } extern "C" { pub fn spReflectionTypeLayout_GetElementStride ( type_ : * mut SlangReflectionTypeLayout , category : SlangParameterCategory ) -> usize ; } extern "C" { pub fn spReflectionTypeLayout_GetElementTypeLayout ( type_ : * mut SlangReflectionTypeLayout ) -> * mut SlangReflectionTypeLayout ; } extern "C" { pub fn spReflectionTypeLayout_GetElementVarLayout ( type_ : * mut SlangReflectionTypeLayout ) -> * mut SlangReflectionVariableLayout ; } extern "C" { pub fn spReflectionTypeLayout_GetParameterCategory ( type_ : * mut SlangReflectionTypeLayout ) -> SlangParameterCategory ; } extern "C" { pub fn spReflectionTypeLayout_GetCategoryCount ( type_ : * mut SlangReflectionTypeLayout ) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn spReflectionTypeLayout_GetCategoryByIndex ( type_ : * mut SlangReflectionTypeLayout , index : :: std :: os :: raw :: c_uint ) -> SlangParameterCategory ; } extern "C" { pub fn spReflectionTypeLayout_GetMatrixLayoutMode ( type_ : * mut SlangReflectionTypeLayout ) -> SlangMatrixLayoutMode ; } extern "C" { pub fn spReflectionTypeLayout_getGenericParamIndex ( type_ : * mut SlangReflectionTypeLayout ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn spReflectionVariable_GetName ( var : * mut SlangReflectionVariable ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn spReflectionVariable_GetType ( var : * mut SlangReflectionVariable ) -> * mut SlangReflectionType ; } extern "C" { pub fn spReflectionVariable_FindModifier ( var : * mut SlangReflectionVariable , modifierID : SlangModifierID ) -> * mut SlangReflectionModifier ; } extern "C" { pub fn spReflectionVariable_GetUserAttributeCount ( var : * mut SlangReflectionVariable ) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn spReflectionVariable_GetUserAttribute ( var : * mut SlangReflectionVariable , index : :: std :: os :: raw :: c_uint ) -> * mut SlangReflectionUserAttribute ; } extern "C" { pub fn spReflectionVariable_FindUserAttributeByName ( var : * mut SlangReflectionVariable , session : * mut SlangSession , name : * const :: std :: os :: raw :: c_char ) -> * mut SlangReflectionUserAttribute ; } extern "C" { pub fn spReflectionVariableLayout_GetVariable ( var : * mut SlangReflectionVariableLayout ) -> * mut SlangReflectionVariable ; } extern "C" { pub fn spReflectionVariableLayout_GetTypeLayout ( var : * mut SlangReflectionVariableLayout ) -> * mut SlangReflectionTypeLayout ; } extern "C" { pub fn spReflectionVariableLayout_GetOffset ( var : * mut SlangReflectionVariableLayout , category : SlangParameterCategory ) -> usize ; } extern "C" { pub fn spReflectionVariableLayout_GetSpace ( var : * mut SlangReflectionVariableLayout , category : SlangParameterCategory ) -> usize ; } extern "C" { pub fn spReflectionVariableLayout_GetSemanticName ( var : * mut SlangReflectionVariableLayout ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn spReflectionVariableLayout_GetSemanticIndex ( var : * mut SlangReflectionVariableLayout ) -> usize ; } extern "C" { # [ doc = " Get the stage that a variable belongs to (if any)." ] # [ doc = "" ] # [ doc = "A variable \"belongs\" to a specific stage when it is a varying input/output" ] # [ doc = "parameter either defined as part of the parameter list for an entry" ] # [ doc = "point *or* at the global scope of a stage-specific GLSL code file (e.g.," ] # [ doc = "an `in` parameter in a GLSL `.vs` file belongs to the vertex stage)." ] pub fn spReflectionVariableLayout_getStage ( var : * mut SlangReflectionVariableLayout ) -> SlangStage ; } pub type SlangReflectionParameter = SlangReflectionVariableLayout ; extern "C" { pub fn spReflectionParameter_GetBindingIndex ( parameter : * mut SlangReflectionParameter ) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn spReflectionParameter_GetBindingSpace ( parameter : * mut SlangReflectionParameter ) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn spReflectionEntryPoint_getName ( entryPoint : * mut SlangReflectionEntryPoint ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn spReflectionEntryPoint_getParameterCount ( entryPoint : * mut SlangReflectionEntryPoint ) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn spReflectionEntryPoint_getParameterByIndex ( entryPoint : * mut SlangReflectionEntryPoint , index : :: std :: os :: raw :: c_uint ) -> * mut SlangReflectionVariableLayout ; } extern "C" { pub fn spReflectionEntryPoint_getStage ( entryPoint : * mut SlangReflectionEntryPoint ) -> SlangStage ; } extern "C" { pub fn spReflectionEntryPoint_getComputeThreadGroupSize ( entryPoint : * mut SlangReflectionEntryPoint , axisCount : SlangUInt , outSizeAlongAxis : * mut SlangUInt ) ; } extern "C" { pub fn spReflectionEntryPoint_usesAnySampleRateInput ( entryPoint : * mut SlangReflectionEntryPoint ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn spReflectionTypeParameter_GetName ( typeParam : * mut SlangReflectionTypeParameter ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn spReflectionTypeParameter_GetIndex ( typeParam : * mut SlangReflectionTypeParameter ) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn spReflectionTypeParameter_GetConstraintCount ( typeParam : * mut SlangReflectionTypeParameter ) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn spReflectionTypeParameter_GetConstraintByIndex ( typeParam : * mut SlangReflectionTypeParameter , index : :: std :: os :: raw :: c_uint ) -> * mut SlangReflectionType ; } extern "C" { pub fn spReflection_GetParameterCount ( reflection : * mut SlangReflection ) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn spReflection_GetParameterByIndex ( reflection : * mut SlangReflection , index : :: std :: os :: raw :: c_uint ) -> * mut SlangReflectionParameter ; } extern "C" { pub fn spReflection_GetTypeParameterCount ( reflection : * mut SlangReflection ) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn spReflection_GetTypeParameterByIndex ( reflection : * mut SlangReflection , index : :: std :: os :: raw :: c_uint ) -> * mut SlangReflectionTypeParameter ; } extern "C" { pub fn spReflection_FindTypeParameter ( reflection : * mut SlangReflection , name : * const :: std :: os :: raw :: c_char ) -> * mut SlangReflectionTypeParameter ; } extern "C" { pub fn spReflection_FindTypeByName ( reflection : * mut SlangReflection , name : * const :: std :: os :: raw :: c_char ) -> * mut SlangReflectionType ; } extern "C" { pub fn spReflection_GetTypeLayout ( reflection : * mut SlangReflection , reflectionType : * mut SlangReflectionType , rules : SlangLayoutRules ) -> * mut SlangReflectionTypeLayout ; } extern "C" { pub fn spReflection_getEntryPointCount ( reflection : * mut SlangReflection ) -> SlangUInt ; } extern "C" { pub fn spReflection_getEntryPointByIndex ( reflection : * mut SlangReflection , index : SlangUInt ) -> * mut SlangReflectionEntryPoint ; } extern "C" { pub fn spReflection_findEntryPointByName ( reflection : * mut SlangReflection , name : * const :: std :: os :: raw :: c_char ) -> * mut SlangReflectionEntryPoint ; } extern "C" { pub fn spReflection_getGlobalConstantBufferBinding ( reflection : * mut SlangReflection ) -> SlangUInt ; } extern "C" { pub fn spReflection_getGlobalConstantBufferSize ( reflection : * mut SlangReflection ) -> usize ; } extern "C" { pub fn spGetTranslationUnitSource ( request : * mut SlangCompileRequest , translationUnitIndex : :: std :: os :: raw :: c_int ) -> * const :: std :: os :: raw :: c_char ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct _GUID { pub _address : u8 , }