slang icon indicating copy to clipboard operation
slang copied to clipboard

Documentation for Slang intrinsics

Open jkwak-work opened this issue 5 months ago • 1 comments

  1. Interface
    • Common Interfaces : IArray IBufferDataLayout IFunc IMutatingFunc IRWArray
    • Math Interfaces : IArithmetic ICompareable IFloat IInteger ILogical IRangedValue
    • Atomic Interfaces : IAtomicable IArithmeticAtomicable IBitAtomicable
    • Auto-diff Interfaces : IDiffTensorWrapper IDifferentiable IDifferentiableFunc IDifferentiableMutatingFunc IDifferentiablePtrType
  2. Types
    • Common Types : Optional Tuple matrix vector
    • Texture Types : FeedbackTexture2D FeedbackTexture2DArray RWTexture1D RWTexture1DArray RWTexture2D RWTexture2DArray RWTexture2DMS RWTexture2DMSArray RWTexture3D RasterizerOrderedTexture1D RasterizerOrderedTexture1DArray RasterizerOrderedTexture2D RasterizerOrderedTexture2DArray RasterizerOrderedTexture3D Texture1D Texture1DArray Texture2D Texture2DArray Texture2DMS Texture2DMSArray Texture3D TextureCube TextureCubeArray TextureFootprint
    • Sampler Types : SamplerComparisonState SamplerState
    • Uniform Buffer Types : AppendStructuredBuffer ByteAddressBuffer ConstantBuffer ConsumeStructuredBuffer ParameterBlock RWByteAddressBuffer RWStructuredBuffer RasterizerOrderedByteAddressBuffer RasterizerOrderedStructuredBuffer StructuredBuffer TextureBuffer
    • Pointer Types : ConstBufferPointer NullPtr Ptr
    • Atomic Types : Atomic
    • Auto-diff Types : AtomicAdd DifferentialPair DifferentialPtrPair DiffTensorView
    • Misc Types : Array ConstRef InOut Out Ref TensorView TorchTensor
  3. Global Functions
    • Common Functions : clamp, isfinite, isinf, isnan, lerp, saturate, sign, smoothstep, step
    • Relational Functions : all, any
    • Bitwise Functions : and, countbits, firstbithigh, firstbitlow, msad4, or, reversebits
    • Trigonometry Functions : acos, acosh, asin, asinh, atan, atan2, atanh, cos, cosh, degrees, radians, sin, sincos, sinh, tan, tanh
    • Exponential Functions : exp, exp10, exp2, log, log10, log2, pow, rsqrt, sqrt
    • Matrix Functions : determinant, mul, transpose
    • Math Functions : abs, ceil, fabs, floor, fma, fmax, fmin, fmod, frac, frexp, ldexp, mad, max, min, modf, rcp, round, trunc
    • Geometric Functions : cross, distance, dot, faceforward, length, lit, normalize, reflect, refract
    • Conversion Functions : asdouble, asfloat, asfloat16, asint, asint16, asuint, asuint16, bit_cast, f16tof32, f32tof16
    • Atomic Functions : InterlockedAdd, InterlockedAnd, InterlockedCompareExchange, InterlockedCompareExchangeFloatBitwise, InterlockedCompareStore, InterlockedCompareStoreFloatBitwise, InterlockedExchange, InterlockedMax, InterlockedMin, InterlockedOr, InterlockedXor
    • Synchronization Functions : AllMemoryBarrier, AllMemoryBarrierWithGroupSync, DeviceMemoryBarrier, DeviceMemoryBarrierWithGroupSync, GroupMemoryBarrier, GroupMemoryBarrierWithGroupSync, beginInvocationInterlock, endInvocationInterlock
    • Wave Functions : AllMemoryBarrierWithWaveMaskSync, AllMemoryBarrierWithWaveSync, GroupMemoryBarrierWithWaveMaskSync, GroupMemoryBarrierWithWaveSync, QuadReadAcrossDiagonal, QuadReadAcrossX, QuadReadAcrossY, QuadReadLaneAt, WaveActiveAllEqual, WaveActiveAllTrue, WaveActiveAnyTrue, WaveActiveBallot, WaveActiveBitAnd, WaveActiveBitOr, WaveActiveBitXor, WaveActiveCountBits, WaveActiveMax, WaveActiveMin, WaveActiveProduct, WaveActiveSum, WaveBroadcastLaneAt, WaveGetActiveMask, WaveGetActiveMulti, WaveGetConvergedMask, WaveGetConvergedMulti, WaveGetLaneCount, WaveGetLaneIndex, WaveIsFirstLane, WaveMaskBroadcastLaneAt, WaveMaskIsFirstLane, WaveMaskAllEqual, WaveMaskAllTrue, WaveMaskAnyTrue, WaveMaskBallot, WaveMaskBitAnd, WaveMaskBitOr, WaveMaskBitXor, WaveMaskCountBits, WaveMaskMatch, WaveMaskMax, WaveMaskMin, WaveMaskPrefixBitAnd, WaveMaskPrefixBitOr, WaveMaskPrefixBitXor, WaveMaskPrefixCountBits, WaveMaskPrefixProduct, WaveMaskPrefixSum, WaveMaskProduct, WaveMaskReadLaneAt, WaveMaskReadLaneFirst, WaveMaskShuffle, WaveMaskSum, WaveMatch, WaveMultiPrefixBitAnd, WaveMultiPrefixBitOr, WaveMultiPrefixBitXor, WaveMultiPrefixCountBits, WaveMultiPrefixProduct, WaveMultiPrefixSum, WavePrefixCountBits, WavePrefixProduct, WavePrefixSum, WaveReadLaneAt, WaveReadLaneFirst, WaveShuffle
    • Auto-diff Functions : isDifferentialNull, detach, diffPair, updatePrimal, updateDiff, updatePair
    • Misc Functions : CheckAccessFullyMapped, GetRenderTargetSampleCount, GetRenderTargetSamplePosition, NonUniformResourceIndex, asDynamicUniform, clock2x32ARB, clockARB, concat, createDynamicObject, getRealtimeClockLow, getRealtimeClock, makeArrayFromElement, makeTuple, reinterpret, static_assert, unmodified
  4. Stage specific
    • Fragment Shader Functions : EvaluateAttributeAtCentroid, EvaluateAttributeAtSample, EvaluateAttributeSnapped, GetAttributeAtVertex, IsHelperLane, clip, ddx, ddx_coarse, ddx_fine, ddy, ddy_coarse, ddy_fine, discard, fwidth
    • Compute Shader Functions : WorkgroupSize
    • Hull Shader Functions : Process2DQuadTessFactorsAvg, Process2DQuadTessFactorsMax, Process2DQuadTessFactorsMin, ProcessIsolineTessFactors, ProcessQuadTessFactorsAvg, ProcessQuadTessFactorsMax, ProcessQuadTessFactorsMin, ProcessTriTessFactorsAvg, ProcessTriTessFactorsMax, ProcessTriTessFactorsMin
    • Hull Shader Types : InputPatch OutputPatch
    • Geometry Shader Functions : LineStream::Append, LineStream::RestartStrip, PointStream::Append, PointStream::RestartStrip, TriangleStream::Append, TriangleStream::RestartStrip
    • Geometry Shader Types : LineStream PointStream TriangleStream
    • Mesh Shader Functions : DispatchMesh, SetMeshOutputCounts
    • Mesh Shader Types : OutputIndices OutputPrimitives OutputVertices
    • Ray-Tracing Functions : AcceptHitAndEndSearch, CallShader, DispatchRaysIndex, DispatchRaysDimensions, GeometryIndex, HitKind, HitTriangleVertexPosition, IgnoreHit, InstanceID, InstanceIndex, ObjectRayDirection, ObjectRayOrigin, ObjectToWorld3x4, ObjectToWorld4x3, PrimitiveIndex, RayCurrentTime, RayFlags, RayTCurrent, RayTMin, ReorderThread, ReportHit, TraceMotionRay, TraceRay, WorldRayDirection, WorldRayOrigin, WorldToObject3x4, WorldToObject4x3
    • Ray-tracing Types : RayDesc RaytracingAccelerationStructure BuiltInTriangleIntersectionAttributes RayQuery HitObject

jkwak-work avatar Oct 02 '24 00:10 jkwak-work