This repository was archived by the owner on Jan 29, 2025. It is now read-only.
[glsl-out] Add built-in functions to keywords #2410
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add built-in functions to keywords. Fixes #2276 and part of gfx-rs/wgpu#4555.
As the comment shows this is taken from https://dawn.googlesource.com/dawn/+/refs/heads/main/src/tint/lang/wgsl/ast/transform/renamer.cc#39 - is that ok? Any ideas for a reference of this?
List of removed keywords:
Rect
uimage2DMSArraystruct
List of added keywords:
abs
acos
acosh
all
any
asin
asinh
atan
atanh
atomicAdd
atomicAnd
atomicCompSwap
atomicCounter
atomicCounterDecrement
atomicCounterIncrement
atomicExchange
atomicMax
atomicMin
atomicOr
atomicXor
barrier
bitCount
bitfieldExtract
bitfieldInsert
bitfieldReverse
ceil
clamp
cos
cosh
cross
dFdx
dFdy
degrees
determinant
distance
dot
equal
exp
exp2
faceforward
findLSB
findMSB
floatBitsToInt
floatBitsToUint
floor
fract
frexp
fwidth
gl_BaseInstance
gl_BaseVertex
gl_ClipDistance
gl_DepthRangeParameters
gl_DrawID
gl_FragCoord
gl_FragDepth
gl_FrontFacing
gl_GlobalInvocationID
gl_InstanceID
gl_LocalInvocationID
gl_LocalInvocationIndex
gl_NumSamples
gl_NumWorkGroups
gl_PerVertex
gl_PointCoord
gl_PointSize
gl_Position
gl_PrimitiveID
gl_SampleID
gl_SampleMask
gl_SampleMaskIn
gl_SamplePosition
gl_VertexID
gl_WorkGroupID
gl_WorkGroupSize
greaterThan
greaterThanEqual
groupMemoryBarrier
imageLoad
imageSize
imageStore
imulExtended
intBitsToFloat
inverse
inversesqrt
isampler2DRect
isinf
isnan
ldexp
length
lessThan
lessThanEqual
log
log2
matrixCompMult
max
memoryBarrier
memoryBarrierAtomicCounter
memoryBarrierBuffer
memoryBarrierImage
memoryBarrierShared
min
mix
mod
modf
normalize
not
notEqual
outerProduct
packHalf2x16
packSnorm2x16
packSnorm4x8
packUnorm2x16
packUnorm4x8
pow
radians
reflect
refract
round
roundEven
sign
sin
sinh
smoothstep
sqrt
step
struct
tan
tanh
texelFetch
texelFetchOffset
texture
textureGather
textureGatherOffset
textureGrad
textureGradOffset
textureLod
textureLodOffset
textureOffset
textureProj
textureProjGrad
textureProjGradOffset
textureProjLod
textureProjLodOffset
textureProjOffset
textureSize
transpose
trunc
uaddCarry
uimage2DMSArray
uintBitsToFloat
umulExtended
unpackHalf2x16
unpackSnorm2x16
unpackSnorm4x8
unpackUnorm2x16
unpackUnorm4x8
usubBorrow