Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for Slang intrinsics #5213

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

jkwak-work
Copy link
Collaborator

@jkwak-work jkwak-work commented Oct 2, 2024

  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 jkwak-work added the pr: non-breaking PRs without breaking changes label Oct 2, 2024
@jkwak-work jkwak-work self-assigned this Oct 2, 2024
@jkwak-work jkwak-work marked this pull request as ready for review October 2, 2024 23:18
@jkwak-work jkwak-work marked this pull request as draft October 17, 2024 18:46
@jkwak-work
Copy link
Collaborator Author

Changing to "draft" and this PR will be closed soon.
Because the content needs to be integrated into hlsl.meta.slang to work with the docgen tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: non-breaking PRs without breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant