slot 0.0.1
A real time UI render framework
载入中...
搜索中...
未找到
命名空间 | | 类型定义 | 枚举 | 函数 | 变量
gfx 命名空间参考

命名空间

namespace  RenderTargetWriteMask
 

struct  AccelerationStructureQueryDesc
 
struct  AdapterInfo
 
class  AdapterList
 
struct  AdapterLUID
 
struct  AspectBlendDesc
 
struct  BlendDesc
 
struct  BufferRange
 
struct  ClearResourceViewFlags
 
struct  ClearValue
 
union  ColorClearValue
 
struct  ComputePipelineStateDesc
 
struct  CooperativeVectorProperties
 
struct  D3D12DeviceExtendedDesc
 
struct  D3D12ExperimentalFeaturesDesc
 
struct  DepthStencilClearValue
 
struct  DepthStencilDesc
 
struct  DepthStencilOpDesc
 
struct  DeviceInfo
 
struct  DeviceLimits
 
struct  FaceMask
 
struct  FormatInfo
 
struct  GraphicsPipelineStateDesc
 
struct  HitGroupDesc
 
class  IAccelerationStructure
 
class  IBufferResource
 
class  ICommandBuffer
 
class  ICommandBufferD3D12
 
class  ICommandEncoder
 
class  ICommandQueue
 
class  IComputeCommandEncoder
 
class  IDebugCallback
 
class  IDevice
 
class  IFence
 
class  IFramebuffer
 
class  IFramebufferLayout
 
class  IInputLayout
 
struct  IndirectDispatchArguments
 
struct  IndirectDrawArguments
 
struct  IndirectDrawIndexedArguments
 
struct  InputElementDesc
 
struct  InteropHandle
 
class  IPipelineCreationAPIDispatcher
 
class  IPipelineState
 
class  IQueryPool
 
class  IRayTracingCommandEncoder
 
class  IRenderCommandEncoder
 
class  IRenderPassLayout
 
class  IResource
 
class  IResourceCommandEncoder
 
class  IResourceView
 
class  ISamplerState
 
class  IShaderCache
 
class  IShaderObject
 
class  IShaderProgram
 
class  IShaderTable
 
class  ISwapchain
 
class  ITextureResource
 
class  ITransientResourceHeap
 
class  ITransientResourceHeapD3D12
 
struct  MemoryRange
 
struct  RasterizerDesc
 
struct  RayTracingPipelineFlags
 
struct  RayTracingPipelineStateDesc
 
struct  RayTracingValidationDesc
 
struct  ResourceStateSet
 
struct  SamplePosition
 
struct  ScissorRect
 
struct  ShaderCacheStats
 
struct  ShaderOffset
 
struct  SlangSessionExtendedDesc
 
struct  SubresourceRange
 
struct  TargetBlendDesc
 
struct  VertexStreamDesc
 
struct  Viewport
 
struct  WindowHandle
 

类型定义

typedef SlangResult Result
 
typedef SlangInt Int
 
typedef SlangUInt UInt
 
typedef uint64_t DeviceAddress
 
typedef int GfxIndex
 
typedef int GfxCount
 
typedef size_t Size
 
typedef size_t Offset
 
typedef RenderTargetWriteMask::Type RenderTargetWriteMaskT
 

枚举

enum class  StructType { D3D12DeviceExtendedDesc , D3D12ExperimentalFeaturesDesc , SlangSessionExtendedDesc , RayTracingValidationDesc }
 
enum class  StageType {
  Unknown , Vertex , Hull , Domain ,
  Geometry , Fragment , Compute , RayGeneration ,
  Intersection , AnyHit , ClosestHit , Miss ,
  Callable , Amplification , Mesh , CountOf
}
 
enum class  DeviceType {
  Unknown , Default , DirectX11 , DirectX12 ,
  OpenGl , Vulkan , Metal , CPU ,
  CUDA , WebGPU , CountOf
}
 
enum class  ProjectionStyle {
  Unknown , OpenGl , DirectX , Vulkan ,
  Metal , CountOf
}
 
enum class  BindingStyle {
  Unknown , DirectX , OpenGl , Vulkan ,
  Metal , CPU , CUDA , CountOf
}
 The style of the binding 更多...
 
enum class  AccessFlag { None , Read , Write }
 
enum class  ShaderModuleSourceType { SlangSource , SlangModuleBinary , SlangSourceFile , SlangModuleBinaryFile }
 
enum class  Format {
  Unknown , R32G32B32A32_TYPELESS , R32G32B32_TYPELESS , R32G32_TYPELESS ,
  R32_TYPELESS , R16G16B16A16_TYPELESS , R16G16_TYPELESS , R16_TYPELESS ,
  R8G8B8A8_TYPELESS , R8G8_TYPELESS , R8_TYPELESS , B8G8R8A8_TYPELESS ,
  R32G32B32A32_FLOAT , R32G32B32_FLOAT , R32G32_FLOAT , R32_FLOAT ,
  R16G16B16A16_FLOAT , R16G16_FLOAT , R16_FLOAT , R32G32B32A32_UINT ,
  R32G32B32_UINT , R32G32_UINT , R32_UINT , R16G16B16A16_UINT ,
  R16G16_UINT , R16_UINT , R8G8B8A8_UINT , R8G8_UINT ,
  R8_UINT , R32G32B32A32_SINT , R32G32B32_SINT , R32G32_SINT ,
  R32_SINT , R16G16B16A16_SINT , R16G16_SINT , R16_SINT ,
  R8G8B8A8_SINT , R8G8_SINT , R8_SINT , R16G16B16A16_UNORM ,
  R16G16_UNORM , R16_UNORM , R8G8B8A8_UNORM , R8G8B8A8_UNORM_SRGB ,
  R8G8_UNORM , R8_UNORM , B8G8R8A8_UNORM , B8G8R8A8_UNORM_SRGB ,
  B8G8R8X8_UNORM , B8G8R8X8_UNORM_SRGB , R16G16B16A16_SNORM , R16G16_SNORM ,
  R16_SNORM , R8G8B8A8_SNORM , R8G8_SNORM , R8_SNORM ,
  D32_FLOAT , D16_UNORM , D32_FLOAT_S8_UINT , R32_FLOAT_X32_TYPELESS ,
  B4G4R4A4_UNORM , B5G6R5_UNORM , B5G5R5A1_UNORM , R9G9B9E5_SHAREDEXP ,
  R10G10B10A2_TYPELESS , R10G10B10A2_UNORM , R10G10B10A2_UINT , R11G11B10_FLOAT ,
  BC1_UNORM , BC1_UNORM_SRGB , BC2_UNORM , BC2_UNORM_SRGB ,
  BC3_UNORM , BC3_UNORM_SRGB , BC4_UNORM , BC4_SNORM ,
  BC5_UNORM , BC5_SNORM , BC6H_UF16 , BC6H_SF16 ,
  BC7_UNORM , BC7_UNORM_SRGB , R64_UINT , R64_SINT ,
  _Count
}
 
enum class  InputSlotClass { PerVertex , PerInstance }
 
enum class  PrimitiveType { Point , Line , Triangle , Patch }
 
enum class  PrimitiveTopology {
  TriangleList , TriangleStrip , PointList , LineList ,
  LineStrip
}
 
enum class  ResourceState {
  Undefined , General , PreInitialized , VertexBuffer ,
  IndexBuffer , ConstantBuffer , StreamOutput , ShaderResource ,
  UnorderedAccess , RenderTarget , DepthRead , DepthWrite ,
  Present , IndirectArgument , CopySource , CopyDestination ,
  ResolveSource , ResolveDestination , AccelerationStructure , AccelerationStructureBuildInput ,
  PixelShaderResource , NonPixelShaderResource , _Count
}
 
enum class  MemoryType { DeviceLocal , Upload , ReadBack }
 Describes how memory for the resource should be allocated for CPU access. 更多...
 
enum class  InteropHandleAPI {
  Unknown , D3D12 , Vulkan , CUDA ,
  Win32 , FileDescriptor , DeviceAddress , D3D12CpuDescriptorHandle ,
  Metal
}
 
enum class  TextureAspect : uint32_t {
  Default = 0 , Color = 0x00000001 , Depth = 0x00000002 , Stencil = 0x00000004 ,
  MetaData = 0x00000008 , Plane0 = 0x00000010 , Plane1 = 0x00000020 , Plane2 = 0x00000040 ,
  DepthStencil = Depth | Stencil
}
 
enum class  ComparisonFunc : uint8_t {
  Never = 0x0 , Less = 0x1 , Equal = 0x2 , LessEqual = 0x3 ,
  Greater = 0x4 , NotEqual = 0x5 , GreaterEqual = 0x6 , Always = 0x7
}
 
enum class  TextureFilteringMode { Point , Linear }
 
enum class  TextureAddressingMode {
  Wrap , ClampToEdge , ClampToBorder , MirrorRepeat ,
  MirrorOnce
}
 
enum class  TextureReductionOp { Average , Comparison , Minimum , Maximum }
 
enum class  ShaderObjectContainerType { None , Array , StructuredBuffer }
 
enum class  StencilOp : uint8_t {
  Keep , Zero , Replace , IncrementSaturate ,
  DecrementSaturate , Invert , IncrementWrap , DecrementWrap
}
 
enum class  FillMode : uint8_t { Solid , Wireframe }
 
enum class  CullMode : uint8_t { None , Front , Back }
 
enum class  FrontFaceMode : uint8_t { CounterClockwise , Clockwise }
 
enum class  LogicOp { NoOp }
 
enum class  BlendOp {
  Add , Subtract , ReverseSubtract , Min ,
  Max
}
 
enum class  BlendFactor {
  Zero , One , SrcColor , InvSrcColor ,
  SrcAlpha , InvSrcAlpha , DestAlpha , InvDestAlpha ,
  DestColor , InvDestColor , SrcAlphaSaturate , BlendColor ,
  InvBlendColor , SecondarySrcColor , InvSecondarySrcColor , SecondarySrcAlpha ,
  InvSecondarySrcAlpha
}
 
enum class  QueryType { Timestamp , AccelerationStructureCompactedSize , AccelerationStructureSerializedSize , AccelerationStructureCurrentSize }
 
enum class  CooperativeVectorComponentType {
  Float16 = 0 , Float32 = 1 , Float64 = 2 , SInt8 = 3 ,
  SInt16 = 4 , SInt32 = 5 , SInt64 = 6 , UInt8 = 7 ,
  UInt16 = 8 , UInt32 = 9 , UInt64 = 10 , SInt8Packed = 11 ,
  UInt8Packed = 12 , FloatE4M3 = 13 , FloatE5M2 = 14
}
 
enum class  AccelerationStructureCopyMode { Clone , Compact }
 
enum class  DebugMessageType { Info , Warning , Error }
 
enum class  DebugMessageSource { Layer , Driver , Slang }
 

函数

SLANG_GFX_API bool SLANG_MCALL gfxIsCompressedFormat (Format format)
 Checks if format is compressed
 
SLANG_GFX_API bool SLANG_MCALL gfxIsTypelessFormat (Format format)
 Checks if format is typeless
 
SLANG_GFX_API SlangResult SLANG_MCALL gfxGetFormatInfo (Format format, FormatInfo *outInfo)
 Gets information about the format
 
SLANG_GFX_API SlangResult SLANG_MCALL gfxGetAdapters (DeviceType type, ISlangBlob **outAdaptersBlob)
 Gets a list of available adapters for a given device type
 
SLANG_GFX_API SlangResult SLANG_MCALL gfxCreateDevice (const IDevice::Desc *desc, IDevice **outDevice)
 Given a type returns a function that can construct it, or nullptr if there isn't one
 
SLANG_GFX_API SlangResult SLANG_MCALL gfxReportLiveObjects ()
 
SLANG_GFX_API SlangResult SLANG_MCALL gfxSetDebugCallback (IDebugCallback *callback)
 
SLANG_GFX_API void SLANG_MCALL gfxEnableDebugLayer (bool enable)
 
SLANG_GFX_API const char *SLANG_MCALL gfxGetDeviceTypeName (DeviceType type)
 
AdapterList gfxGetAdapters (DeviceType type)
 Gets a list of available adapters for a given device type
 

变量

const uint64_t kTimeoutInfinite = 0xFFFFFFFFFFFFFFFF
 
const GfxCount kMaxRenderTargetCount = 8
 

类型定义说明

◆ DeviceAddress

typedef uint64_t gfx::DeviceAddress

◆ GfxCount

typedef int gfx::GfxCount

◆ GfxIndex

typedef int gfx::GfxIndex

◆ Int

typedef SlangInt gfx::Int

◆ Offset

◆ RenderTargetWriteMaskT

◆ Result

◆ Size

typedef size_t gfx::Size

◆ UInt

枚举类型说明

◆ AccelerationStructureCopyMode

枚举值
Clone 
Compact 

◆ AccessFlag

enum class gfx::AccessFlag
strong
枚举值
None 
Read 
Write 

◆ BindingStyle

enum class gfx::BindingStyle
strong

The style of the binding

枚举值
Unknown 
DirectX 
OpenGl 
Vulkan 
Metal 
CPU 
CUDA 
CountOf 

◆ BlendFactor

enum class gfx::BlendFactor
strong
枚举值
Zero 
One 
SrcColor 
InvSrcColor 
SrcAlpha 
InvSrcAlpha 
DestAlpha 
InvDestAlpha 
DestColor 
InvDestColor 
SrcAlphaSaturate 
BlendColor 
InvBlendColor 
SecondarySrcColor 
InvSecondarySrcColor 
SecondarySrcAlpha 
InvSecondarySrcAlpha 

◆ BlendOp

enum class gfx::BlendOp
strong
枚举值
Add 
Subtract 
ReverseSubtract 
Min 
Max 

◆ ComparisonFunc

enum class gfx::ComparisonFunc : uint8_t
strong
枚举值
Never 
Less 
Equal 
LessEqual 
Greater 
NotEqual 
GreaterEqual 
Always 

◆ CooperativeVectorComponentType

枚举值
Float16 
Float32 
Float64 
SInt8 
SInt16 
SInt32 
SInt64 
UInt8 
UInt16 
UInt32 
UInt64 
SInt8Packed 
UInt8Packed 
FloatE4M3 
FloatE5M2 

◆ CullMode

enum class gfx::CullMode : uint8_t
strong
枚举值
None 
Front 
Back 

◆ DebugMessageSource

enum class gfx::DebugMessageSource
strong
枚举值
Layer 
Driver 
Slang 

◆ DebugMessageType

enum class gfx::DebugMessageType
strong
枚举值
Info 
Warning 
Error 

◆ DeviceType

enum class gfx::DeviceType
strong
枚举值
Unknown 
Default 
DirectX11 
DirectX12 
OpenGl 
Vulkan 
Metal 
CPU 
CUDA 
WebGPU 
CountOf 

◆ FillMode

enum class gfx::FillMode : uint8_t
strong
枚举值
Solid 
Wireframe 

◆ Format

enum class gfx::Format
strong

Different formats of things like pixels or elements of vertices NOTE! Any change to this type (adding, removing, changing order) - must also be reflected in changes GFX_FORMAT

枚举值
Unknown 
R32G32B32A32_TYPELESS 
R32G32B32_TYPELESS 
R32G32_TYPELESS 
R32_TYPELESS 
R16G16B16A16_TYPELESS 
R16G16_TYPELESS 
R16_TYPELESS 
R8G8B8A8_TYPELESS 
R8G8_TYPELESS 
R8_TYPELESS 
B8G8R8A8_TYPELESS 
R32G32B32A32_FLOAT 
R32G32B32_FLOAT 
R32G32_FLOAT 
R32_FLOAT 
R16G16B16A16_FLOAT 
R16G16_FLOAT 
R16_FLOAT 
R32G32B32A32_UINT 
R32G32B32_UINT 
R32G32_UINT 
R32_UINT 
R16G16B16A16_UINT 
R16G16_UINT 
R16_UINT 
R8G8B8A8_UINT 
R8G8_UINT 
R8_UINT 
R32G32B32A32_SINT 
R32G32B32_SINT 
R32G32_SINT 
R32_SINT 
R16G16B16A16_SINT 
R16G16_SINT 
R16_SINT 
R8G8B8A8_SINT 
R8G8_SINT 
R8_SINT 
R16G16B16A16_UNORM 
R16G16_UNORM 
R16_UNORM 
R8G8B8A8_UNORM 
R8G8B8A8_UNORM_SRGB 
R8G8_UNORM 
R8_UNORM 
B8G8R8A8_UNORM 
B8G8R8A8_UNORM_SRGB 
B8G8R8X8_UNORM 
B8G8R8X8_UNORM_SRGB 
R16G16B16A16_SNORM 
R16G16_SNORM 
R16_SNORM 
R8G8B8A8_SNORM 
R8G8_SNORM 
R8_SNORM 
D32_FLOAT 
D16_UNORM 
D32_FLOAT_S8_UINT 
R32_FLOAT_X32_TYPELESS 
B4G4R4A4_UNORM 
B5G6R5_UNORM 
B5G5R5A1_UNORM 
R9G9B9E5_SHAREDEXP 
R10G10B10A2_TYPELESS 
R10G10B10A2_UNORM 
R10G10B10A2_UINT 
R11G11B10_FLOAT 
BC1_UNORM 
BC1_UNORM_SRGB 
BC2_UNORM 
BC2_UNORM_SRGB 
BC3_UNORM 
BC3_UNORM_SRGB 
BC4_UNORM 
BC4_SNORM 
BC5_UNORM 
BC5_SNORM 
BC6H_UF16 
BC6H_SF16 
BC7_UNORM 
BC7_UNORM_SRGB 
R64_UINT 
R64_SINT 
_Count 

◆ FrontFaceMode

enum class gfx::FrontFaceMode : uint8_t
strong
枚举值
CounterClockwise 
Clockwise 

◆ InputSlotClass

enum class gfx::InputSlotClass
strong
枚举值
PerVertex 
PerInstance 

◆ InteropHandleAPI

enum class gfx::InteropHandleAPI
strong
枚举值
Unknown 
D3D12 
Vulkan 
CUDA 
Win32 
FileDescriptor 
DeviceAddress 
D3D12CpuDescriptorHandle 
Metal 

◆ LogicOp

enum class gfx::LogicOp
strong
枚举值
NoOp 

◆ MemoryType

enum class gfx::MemoryType
strong

Describes how memory for the resource should be allocated for CPU access.

枚举值
DeviceLocal 
Upload 
ReadBack 

◆ PrimitiveTopology

enum class gfx::PrimitiveTopology
strong
枚举值
TriangleList 
TriangleStrip 
PointList 
LineList 
LineStrip 

◆ PrimitiveType

enum class gfx::PrimitiveType
strong
枚举值
Point 
Line 
Triangle 
Patch 

◆ ProjectionStyle

enum class gfx::ProjectionStyle
strong
枚举值
Unknown 
OpenGl 
DirectX 
Vulkan 
Metal 
CountOf 

◆ QueryType

enum class gfx::QueryType
strong
枚举值
Timestamp 
AccelerationStructureCompactedSize 
AccelerationStructureSerializedSize 
AccelerationStructureCurrentSize 

◆ ResourceState

enum class gfx::ResourceState
strong
枚举值
Undefined 
General 
PreInitialized 
VertexBuffer 
IndexBuffer 
ConstantBuffer 
StreamOutput 
ShaderResource 
UnorderedAccess 
RenderTarget 
DepthRead 
DepthWrite 
Present 
IndirectArgument 
CopySource 
CopyDestination 
ResolveSource 
ResolveDestination 
AccelerationStructure 
AccelerationStructureBuildInput 
PixelShaderResource 
NonPixelShaderResource 
_Count 

◆ ShaderModuleSourceType

enum class gfx::ShaderModuleSourceType
strong
枚举值
SlangSource 
SlangModuleBinary 
SlangSourceFile 
SlangModuleBinaryFile 

◆ ShaderObjectContainerType

enum class gfx::ShaderObjectContainerType
strong
枚举值
None 
Array 
StructuredBuffer 

◆ StageType

enum class gfx::StageType
strong
枚举值
Unknown 
Vertex 
Hull 
Domain 
Geometry 
Fragment 
Compute 
RayGeneration 
Intersection 
AnyHit 
ClosestHit 
Miss 
Callable 
Amplification 
Mesh 
CountOf 

◆ StencilOp

enum class gfx::StencilOp : uint8_t
strong
枚举值
Keep 
Zero 
Replace 
IncrementSaturate 
DecrementSaturate 
Invert 
IncrementWrap 
DecrementWrap 

◆ StructType

enum class gfx::StructType
strong
枚举值
D3D12DeviceExtendedDesc 
D3D12ExperimentalFeaturesDesc 
SlangSessionExtendedDesc 
RayTracingValidationDesc 

◆ TextureAddressingMode

enum class gfx::TextureAddressingMode
strong
枚举值
Wrap 
ClampToEdge 
ClampToBorder 
MirrorRepeat 
MirrorOnce 

◆ TextureAspect

enum class gfx::TextureAspect : uint32_t
strong
枚举值
Default 
Color 
Depth 
Stencil 
MetaData 
Plane0 
Plane1 
Plane2 
DepthStencil 

◆ TextureFilteringMode

enum class gfx::TextureFilteringMode
strong
枚举值
Point 
Linear 

◆ TextureReductionOp

enum class gfx::TextureReductionOp
strong
枚举值
Average 
Comparison 
Minimum 
Maximum 

函数说明

◆ gfxCreateDevice()

SLANG_GFX_API SlangResult SLANG_MCALL gfx::gfxCreateDevice ( const IDevice::Desc * desc,
IDevice ** outDevice )

Given a type returns a function that can construct it, or nullptr if there isn't one

◆ gfxEnableDebugLayer()

SLANG_GFX_API void SLANG_MCALL gfx::gfxEnableDebugLayer ( bool enable)

Enables debug layer. The debug layer will check all gfx calls and verify that uses are valid.

◆ gfxGetAdapters() [1/2]

AdapterList gfx::gfxGetAdapters ( DeviceType type)
inline

Gets a list of available adapters for a given device type

函数调用图:

◆ gfxGetAdapters() [2/2]

SLANG_GFX_API SlangResult SLANG_MCALL gfx::gfxGetAdapters ( DeviceType type,
ISlangBlob ** outAdaptersBlob )

Gets a list of available adapters for a given device type

这是这个函数的调用关系图:

◆ gfxGetDeviceTypeName()

SLANG_GFX_API const char *SLANG_MCALL gfx::gfxGetDeviceTypeName ( DeviceType type)

◆ gfxGetFormatInfo()

SLANG_GFX_API SlangResult SLANG_MCALL gfx::gfxGetFormatInfo ( Format format,
FormatInfo * outInfo )

Gets information about the format

◆ gfxIsCompressedFormat()

SLANG_GFX_API bool SLANG_MCALL gfx::gfxIsCompressedFormat ( Format format)

Checks if format is compressed

◆ gfxIsTypelessFormat()

SLANG_GFX_API bool SLANG_MCALL gfx::gfxIsTypelessFormat ( Format format)

Checks if format is typeless

◆ gfxReportLiveObjects()

SLANG_GFX_API SlangResult SLANG_MCALL gfx::gfxReportLiveObjects ( )

Reports current set of live objects in gfx. Currently this only calls D3D's ReportLiveObjects.

◆ gfxSetDebugCallback()

SLANG_GFX_API SlangResult SLANG_MCALL gfx::gfxSetDebugCallback ( IDebugCallback * callback)

Sets a callback for receiving debug messages. The layer does not hold a strong reference to the callback object. The user is responsible for holding the callback object alive.

变量说明

◆ kMaxRenderTargetCount

const GfxCount gfx::kMaxRenderTargetCount = 8

◆ kTimeoutInfinite

const uint64_t gfx::kTimeoutInfinite = 0xFFFFFFFFFFFFFFFF