sdl3/sdl_shadercross
library
Functions
-
sdlShaderCrossCompileComputePipelineFromSpirv(Pointer<SdlGpuDevice> device, Pointer<SdlShaderCrossSpirvInfo> info, Pointer<SdlShaderCrossComputePipelineMetadata> metadata, int props)
→ Pointer<SdlGpuComputePipeline>
shadercross
-
Compile an SDL GPU compute pipeline from SPIRV code. If your shader source is HLSL, you should obtain SPIR-V bytecode from SDL_ShaderCross_CompileSPIRVFromHLSL().
-
sdlShaderCrossCompileDxbcFromHlsl(Pointer<SdlShaderCrossHlslInfo> info, Pointer<Uint32> size)
→ Pointer<NativeType>
shadercross
-
Compile to DXBC bytecode from HLSL code via a SPIRV-Cross round trip.
-
sdlShaderCrossCompileDxbcFromSpirv(Pointer<SdlShaderCrossSpirvInfo> info, Pointer<Uint32> size)
→ Pointer<NativeType>
shadercross
-
Compile DXBC bytecode from SPIRV code.
-
sdlShaderCrossCompileDxilFromHlsl(Pointer<SdlShaderCrossHlslInfo> info, Pointer<Uint32> size)
→ Pointer<NativeType>
shadercross
-
Compile to DXIL bytecode from HLSL code via a SPIRV-Cross round trip.
-
sdlShaderCrossCompileDxilFromSpirv(Pointer<SdlShaderCrossSpirvInfo> info, Pointer<Uint32> size)
→ Pointer<NativeType>
shadercross
-
Compile DXIL bytecode from SPIRV code.
-
sdlShaderCrossCompileGraphicsShaderFromSpirv(Pointer<SdlGpuDevice> device, Pointer<SdlShaderCrossSpirvInfo> info, Pointer<SdlShaderCrossGraphicsShaderResourceInfo> resourceInfo, int props)
→ Pointer<SdlGpuShader>
shadercross
-
Compile an SDL GPU shader from SPIRV code. If your shader source is HLSL, you should obtain SPIR-V bytecode from SDL_ShaderCross_CompileSPIRVFromHLSL().
-
sdlShaderCrossCompileSpirvFromHlsl(Pointer<SdlShaderCrossHlslInfo> info, Pointer<Uint32> size)
→ Pointer<NativeType>
shadercross
-
Compile to SPIRV bytecode from HLSL code.
-
sdlShaderCrossGetHlslShaderFormats()
→ int
shadercross
-
Get the supported shader formats that HLSL cross-compilation can output
-
sdlShaderCrossGetSpirvShaderFormats()
→ int
shadercross
-
Get the supported shader formats that SPIRV cross-compilation can output
-
sdlShaderCrossInit()
→ bool
shadercross
-
Initializes SDL_shadercross
-
sdlShaderCrossQuit()
→ void
shadercross
-
De-initializes SDL_shadercross
-
sdlShaderCrossReflectComputeSpirv(Pointer<Uint8> bytecode, int bytecodeSize, int props)
→ Pointer<SdlShaderCrossComputePipelineMetadata>
shadercross
-
Reflect compute pipeline info from SPIRV code. If your shader source is HLSL, you should obtain SPIR-V bytecode from SDL_ShaderCross_CompileSPIRVFromHLSL(). This must be freed with SDL_free() when you are done with the metadata.
-
sdlShaderCrossReflectGraphicsSpirv(Pointer<Uint8> bytecode, int bytecodeSize, int props)
→ Pointer<SdlShaderCrossGraphicsShaderMetadata>
shadercross
-
Reflect graphics shader info from SPIRV code. If your shader source is HLSL, you should obtain SPIR-V bytecode from SDL_ShaderCross_CompileSPIRVFromHLSL(). This must be freed with SDL_free() when you are done with the metadata.
-
sdlShaderCrossTranspileHlslFromSpirv(Pointer<SdlShaderCrossSpirvInfo> info)
→ Pointer<NativeType>
shadercross
-
Transpile to HLSL code from SPIRV code.
-
sdlShaderCrossTranspileMslFromSpirv(Pointer<SdlShaderCrossSpirvInfo> info)
→ Pointer<NativeType>
shadercross
-
Transpile to MSL code from SPIRV code.