robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
561580aba5
master
1" Vim syntax file 2" Language: Slang 3" Maintainer: Austin Shijo <epestr@proton.me> 4" Last Change: 2024 Jan 05 5 6if exists ( "b:current_syntax" ) 7finish 8endif 9 10" Read the C syntax to start with 11runtime ! syntax/c.vim 12unlet b: current_syntax 13 14" Annotations 15syn match shaderslangAnnotation /<. * ;> / 16 17" Attributes 18syn match shaderslangAttribute /^\s * \[maxvertexcount(\s * \w\+\s * )\] / 19syn match shaderslangAttribute /^\s * \[domain(\s * "\(tri\|quad\|isoline\)"\s * )\] / 20syn match shaderslangAttribute /^\s * \[earlydepthstencil\] / 21syn match shaderslangAttribute /^\s * \[instance(\s * \w\+\s * )\] / 22syn match shaderslangAttribute /^\s * \[maxtessfactor(\s * \w\+\s * )\] / 23syn match shaderslangAttribute /^\s * \[numthreads(\s * \w\+\s * ,\s * \w\+\s * ,\s * \w\+\s * )\] / 24syn match shaderslangAttribute /^\s * \[outputcontrolpoints(\s * \w\+\s * )\] / 25syn match shaderslangAttribute /^\s * \[outputtopology(\s * "\(point\|line\|triangle_cw\|triangle_ccw\|triangle\)"\s * )\] / 26syn match shaderslangAttribute /^\s * \[partitioning(\s * "\(integer\|fractional_even\|fractional_odd\|pow2\)"\s * )\] / 27syn match shaderslangAttribute /^\s * \[patchconstantfunc(\s * "\(\d\|\w\|_\)\+"\s * )\] / 28syn match shaderslangAttribute /^\s * \[WaveSize(\s * \w\+\(\s * ,\s * \w\+\(\s * ,\s * \w\+\)\?\)\?\s * )\] / 29syn match shaderslangAttribute /^\s * \[shader(\s * "\(anyhit\|callable\|closesthit\|intersection\|miss\|raygeneration\)"\s * )\] / 30 31syn match shaderslangAttribute /^\s * \[fastopt\] / 32syn match shaderslangAttribute /^\s * \[loop\] / 33syn match shaderslangAttribute /^\s * \[unroll\] / 34syn match shaderslangAttribute /^\s * \[allow_uav_condition\] / 35syn match shaderslangAttribute /^\s * \[branch\] / 36syn match shaderslangAttribute /^\s * \[flatten\] / 37syn match shaderslangAttribute /^\s * \[forcecase\] / 38syn match shaderslangAttribute /^\s * \[call\] / 39syn match shaderslangAttribute /^\s * \[WaveOpsIncludeHelperLanes\] / 40 41syn match shaderslangAttribute /\[raypayload\] / 42 43" Work graph shader target attributes 44syn match shaderslangAttribute /^\s * \[Shader(\s * "\(\d\|\w\|_\)\+"\s * )\] / 45 46" Work graph shader function attributes 47syn match shaderslangAttribute /^\s * \[NodeLaunch(\s * "\(broadcasting\|coalescing\|thread\)"\s * )\] / 48syn match shaderslangAttribute /^\s * \[NodeIsProgramEntry\] / 49syn match shaderslangAttribute /^\s * \[NodeLocalRootArgumentsTableIndex(\s * \w\+\s * )\] / 50syn match shaderslangAttribute /^\s * \[NumThreads(\s * \w\+\s * ,\s * \w\+\s * ,\s * \w\+\s * )\] / 51syn match shaderslangAttribute /^\s * \[NodeShareInputOf(\s * "\w\+"\(\s * ,\s * \w\+\)\?\s * )\] / 52syn match shaderslangAttribute /^\s * \[NodeDispatchGrid(\s * \w\+\s * ,\s * \w\+\s * ,\s * \w\+\s * )\] / 53syn match shaderslangAttribute /^\s * \[NodeMaxDispatchGrid(\s * \w\+\s * ,\s * \w\+\s * ,\s * \w\+\s * )\] / 54syn match shaderslangAttribute /^\s * \[NodeMaxRecursionDepth(\s * \w\+\s * )\] / 55syn match shaderslangAttribute /^\s * \[NodeMaxInputRecordsPerGraphEntryRecord(\s * \w\+\s * ,\s * \(true\|false\)\s * )\] / 56 57" Work graph record attributes 58syn match shaderslangAttribute /\[NodeTrackRWInputSharing\] / 59syn match shaderslangAttribute /\[MaxRecords(\s * \w\+\s * )\] / 60syn match shaderslangAttribute /\[NodeID(\s * "\w\+"\(\s * ,\s * \w\+\)\?\s * )\] / 61syn match shaderslangAttribute /\[MaxRecordsSharedWith(\s * \w\+\s * )\] / 62syn match shaderslangAttribute /\[AllowSparseNodes\] / 63syn match shaderslangAttribute /\[NodeArraySize(\s * \w\+\s * )\] / 64syn match shaderslangAttribute /\[UnboundedSparseNodes\] / 65 66" Intrinsic functions 67syn keyword shaderslangFunc abs acos acosh asin asinh atan atanh cos cosh exp exp2 floor log log10 log2 round rsqrt sin sincos sinh sqrt tan tanh trunc 68syn keyword shaderslangFunc AllMemoryBarrier AllMemoryBarrierWithGroupSync DeviceMemoryBarrier DeviceMemoryBarrierWithGroupSync GroupMemoryBarrier GroupMemoryBarrierWithGroupSync 69syn keyword shaderslangFunc abort clip errorf printf 70syn keyword shaderslangFunc all any countbits faceforward firstbithigh firstbitlow isfinite isinf isnan max min noise pow reversebits sign 71syn keyword shaderslangFunc asdouble asfloat asint asuint D3DCOLORtoUBYTE4 f16tof32 f32tof16 72syn keyword shaderslangFunc ceil clamp degrees fma fmod frac frexp ldexp lerp mad modf radiants saturate smoothstep step 73syn keyword shaderslangFunc cross determinant distance dot dst length lit msad4 mul normalize rcp reflect refract transpose 74syn keyword shaderslangFunc ddx ddx_coarse ddx_fine ddy ddy_coarse ddy_fine fwidth 75syn keyword shaderslangFunc EvaluateAttributeAtCentroid EvaluateAttributeAtSample EvaluateAttributeSnapped 76syn keyword shaderslangFunc GetRenderTargetSampleCount GetRenderTargetSamplePosition 77syn keyword shaderslangFunc InterlockedAdd InterlockedAnd InterlockedCompareExchange InterlockedCompareStore InterlockedExchange InterlockedMax InterlockedMin InterlockedOr InterlockedXor 78syn keyword shaderslangFunc InterlockedCompareStoreFloatBitwise InterlockedCompareExchangeFloatBitwise 79syn keyword shaderslangFunc Process2DQuadTessFactorsAvg Process2DQuadTessFactorsMax Process2DQuadTessFactorsMin ProcessIsolineTessFactors 80syn keyword shaderslangFunc ProcessQuadTessFactorsAvg ProcessQuadTessFactorsMax ProcessQuadTessFactorsMin ProcessTriTessFactorsAvg ProcessTriTessFactorsMax ProcessTriTessFactorsMin 81syn keyword shaderslangFunc tex1D tex1Dbias tex1Dgrad tex1Dlod tex1Dproj 82syn keyword shaderslangFunc tex2D tex2Dbias tex2Dgrad tex2Dlod tex2Dproj 83syn keyword shaderslangFunc tex3D tex3Dbias tex3Dgrad tex3Dlod tex3Dproj 84syn keyword shaderslangFunc texCUBE texCUBEbias texCUBEgrad texCUBElod texCUBEproj 85syn keyword shaderslangFunc WaveIsFirstLane WaveGetLaneCount WaveGetLaneIndex 86syn keyword shaderslangFunc IsHelperLane 87syn keyword shaderslangFunc WaveActiveAnyTrue WaveActiveAllTrue WaveActiveBallot 88syn keyword shaderslangFunc WaveReadLaneFirst WaveReadLaneAt 89syn keyword shaderslangFunc WaveActiveAllEqual WaveActiveAllEqualBool WaveActiveCountBits 90syn keyword shaderslangFunc WaveActiveSum WaveActiveProduct WaveActiveBitAnd WaveActiveBitOr WaveActiveBitXor WaveActiveMin WaveActiveMax 91syn keyword shaderslangFunc WavePrefixCountBits WavePrefixProduct WavePrefixSum 92syn keyword shaderslangFunc QuadReadAcrossX QuadReadAcrossY QuadReadAcrossDiagonal QuadReadLaneAt 93syn keyword shaderslangFunc QuadAny QuadAll 94syn keyword shaderslangFunc WaveMatch WaveMultiPrefixSum WaveMultiPrefixProduct WaveMultiPrefixCountBits WaveMultiPrefixAnd WaveMultiPrefixOr WaveMultiPrefixXor 95syn keyword shaderslangFunc NonUniformResourceIndex 96syn keyword shaderslangFunc DispatchMesh SetMeshOutputCounts 97syn keyword shaderslangFunc dot4add_u8packed dot4add_i8packed dot2add 98 99syn keyword shaderslangFunc RestartStrip 100syn keyword shaderslangFunc CalculateLevelOfDetail CalculateLevelOfDetailUnclamped Gather GetDimensions GetSamplePosition Load Sample SampleBias SampleCmp SampleCmpLevelZero SampleGrad SampleLevel GatherRaw SampleCmpLevel 101syn keyword shaderslangFunc SampleCmpBias SampleCmpGrad 102syn keyword shaderslangFunc WriteSamplerFeedback WriteSamplerFeedbackBias WriteSamplerFeedbackGrad WriteSamplerFeedbackLevel 103syn keyword shaderslangFunc Append Consume DecrementCounter IncrementCounter 104syn keyword shaderslangFunc Load2 Load3 Load4 Store Store2 Store3 Store4 105syn keyword shaderslangFunc GatherRed GatherGreen GatherBlue GatherAlpha GatherCmp GatherCmpRed GatherCmpGreen GatherCmpBlue GatherCmpAlpha 106syn match shaderslangFunc /\.mips\[\d\+\]\[\d\+\] / 107syn match shaderslangFunc /\.sample\[\d\+\]\[\d\+\] / 108 109" Ray intrinsics 110syn keyword shaderslangFunc AcceptHitAndEndSearch CallShader IgnoreHit ReportHit TraceRay 111syn keyword shaderslangFunc DispatchRaysIndex DispatchRaysDimensions 112syn keyword shaderslangFunc WorldRayOrigin WorldRayDirection RayTMin RayTCurrent RayFlags 113syn keyword shaderslangFunc InstanceIndex InstanceID GeometryIndex PrimitiveIndex ObjectRayOrigin ObjectRayDirection ObjectToWorld3x4 ObjectToWorld4x3 WorldToObject3x4 WorldToObject4x3 114syn keyword shaderslangFunc HitKind 115 116" RayQuery intrinsics 117syn keyword shaderslangFunc TraceRayInline Proceed Abort CommittedStatus 118syn keyword shaderslangFunc CandidateType CandidateProceduralPrimitiveNonOpaque CandidateTriangleRayT CandidateInstanceIndex CandidateInstanceID CandidateInstanceContributionToHitGroupIndex CandidateGeometryIndex 119syn keyword shaderslangFunc CandidatePrimitiveIndex CandidateObjectRayOrigin CandidateObjectRayDirection CandidateObjectToWorld3x4 CandidateObjectToWorld4x3 CandidateWorldToObject3x4 CandidateWorldToObject4x3 120syn keyword shaderslangFunc CommitNonOpaqueTriangleHit CommitProceduralPrimitiveHit CommittedStatus CommittedRayT CommittedInstanceIndex CommittedInstanceID CommittedInstanceContributionToHitGroupIndex 121syn keyword shaderslangFunc CommittedGeometryIndex CommittedPrimitiveIndex CommittedObjectRayOrigin CommittedObjectRayDirection CommittedObjectToWorld3x4 CommittedObjectToWorld4x3 CommittedWorldToObject3x4 122syn keyword shaderslangFunc CommittedWorldToObject4x3 CandidateTriangleBarycentrics CandidateTriangleFrontFace CommittedTriangleBarycentrics CommittedTriangleFrontFace 123 124" Pack/unpack math intrinsics 125syn keyword shaderslangFunc unpack_s8s16 unpack_u8u16 unpack_s8s32 unpack_u8u32 126syn keyword shaderslangFunc pack_u8 pack_s8 pack_clamp_u8 pack_clamp_s8 127 128" Work graph object methods 129syn keyword shaderslangFunc Get FinishedCrossGroupSharing Count GetThreadNodeOutputRecords GetGroupNodeOutputRecords IsValid GroupIncrementOutputCount ThreadIncrementOutputCount OutputComplete 130 131" Work graph free intrinsics 132syn keyword shaderslangFunc GetRemainingRecursionLevels Barrier 133 134" Layout Qualifiers 135syn keyword shaderslangLayoutQual const row_major column_major 136syn keyword shaderslangLayoutQual point line triangle lineadj triangleadj 137syn keyword shaderslangLayoutQual InputPatch OutputPatch 138syn match shaderslangLayoutQual /PointStream<\s * \w\+\s * > / 139syn match shaderslangLayoutQual /LineStream<\s * \w\+\s * > / 140syn match shaderslangLayoutQual /TriangleStream<\s * \w\+\s * > / 141 142" User defined Semantics 143syn match shaderslangSemantic /:\s * [ A-Z ] \w * / 144syn match shaderslangSemantic /:\s * packoffset(\s * c\d\+\(\. [ xyzw ] \)\?\s * ) /" packoffset 145syn match shaderslangSemantic /:\s * register(\s * \(r\|x\|v\|t\|s\|cb\|icb\|b\|c\|u\)\d\+\s * ) /" register 146syn match shaderslangSemantic /:\s * read(\s * \(\(anyhit\|closesthit\|miss\|caller\)\s * ,\s * \) * \(anyhit\|closesthit\|miss\|caller\)\?\s * ) /" read 147syn match shaderslangSemantic /:\s * write(\s * \(\(anyhit\|closesthit\|miss\|caller\)\s * ,\s * \) * \(anyhit\|closesthit\|miss\|caller\)\?\s * ) /" write 148 149" System-Value Semantics 150" Vertex Shader 151syn match shaderslangSemantic /SV_ClipDistance\d\+ / 152syn match shaderslangSemantic /SV_CullDistance\d\+ / 153syn keyword shaderslangSemantic SV_Position SV_InstanceID SV_PrimitiveID SV_VertexID 154syn keyword shaderslangSemantic SV_StartVertexLocation SV_StartInstanceLocation 155" Tessellation pipeline 156syn keyword shaderslangSemantic SV_DomainLocation SV_InsideTessFactor SV_OutputControlPointID SV_TessFactor 157" Geometry Shader 158syn keyword shaderslangSemantic SV_GSInstanceID SV_RenderTargetArrayIndex 159" Pixel Shader - MSAA 160syn keyword shaderslangSemantic SV_Coverage SV_Depth SV_IsFrontFace SV_SampleIndex 161syn match shaderslangSemantic /SV_Target [ 0-7 ] / 162syn keyword shaderslangSemantic SV_ShadingRate SV_ViewID 163syn match shaderslangSemantic /SV_Barycentrics [ 0-1 ] / 164" Compute Shader 165syn keyword shaderslangSemantic SV_DispatchThreadID SV_GroupID SV_GroupIndex SV_GroupThreadID 166" Mesh shading pipeline 167syn keyword shaderslangSemantic SV_CullPrimitive 168" Work graph record system values 169syn keyword shaderslangSemantic SV_DispatchGrid 170 171" slang structures 172syn keyword shaderslangStructure cbuffer 173 174" Shader profiles 175" Cg profiles 176syn keyword shaderslangProfile arbfp1 arbvp1 fp20 vp20 fp30 vp30 ps_1_1 ps_1_2 ps_1_3 177" Shader Model 1 178syn keyword shaderslangProfile vs_1_1 179" Shader Model 2 180syn keyword shaderslangProfile ps_2_0 ps_2_x vs_2_0 vs_2_x 181" Shader Model 3 182syn keyword shaderslangProfile ps_3_0 vs_3_0 183" Shader Model 4 184syn keyword shaderslangProfile gs_4_0 ps_4_0 vs_4_0 gs_4_1 ps_4_1 vs_4_1 185" Shader Model 5 186syn keyword shaderslangProfile cs_4_0 cs_4_1 cs_5_0 ds_5_0 gs_5_0 hs_5_0 ps_5_0 vs_5_0 187" Shader Model 6 188syn keyword shaderslangProfile cs_6_0 ds_6_0 gs_6_0 hs_6_0 ps_6_0 vs_6_0 lib_6_0 189 190" Swizzling 191syn match shaderslangSwizzle /\. [ xyzw ] \{1,4\}\> / 192syn match shaderslangSwizzle /\. [ rgba ] \{1,4\}\> / 193syn match shaderslangSwizzle /\.\(_m [ 0-3 ] \{2}\)\{1,4\} / 194syn match shaderslangSwizzle /\.\(_ [ 1-4 ] \{2}\)\{1,4\} / 195 196" Other Statements 197syn keyword shaderslangStatement discard 198 199" Storage class 200syn match shaderslangStorageClass /\<in\(\s+pipeline\)\?\> / 201syn match shaderslangStorageClass /\<out\(\s\+indices\|\s\+vertices\|\s\+primitives\)\?\> / 202syn keyword shaderslangStorageClass inout 203syn keyword shaderslangStorageClass extern nointerpolation precise shared groupshared static uniform volatile 204syn keyword shaderslangStorageClass snorm unorm 205syn keyword shaderslangStorageClass linear centroid nointerpolation noperspective sample 206syn keyword shaderslangStorageClass globallycoherent 207 208" Types 209" Buffer types 210syn keyword shaderslangType ConstantBuffer Buffer ByteAddressBuffer ConsumeStructuredBuffer StructuredBuffer 211syn keyword shaderslangType AppendStructuredBuffer RWBuffer RWByteAddressBuffer RWStructuredBuffer 212syn keyword shaderslangType RasterizerOrderedBuffer RasterizerOrderedByteAddressBuffer RasterizerOrderedStructuredBuffer 213 214" Scalar types 215syn keyword shaderslangType bool int uint dword half float double 216syn keyword shaderslangType min16float min10float min16int min12int min16uint 217syn keyword shaderslangType float16_t float32_t float64_t 218 219" Vector types 220syn match shaderslangType /vector<\s * \w\+,\s * [ 1-4 ] \s * > / 221syn keyword shaderslangType bool1 bool2 bool3 bool4 222syn keyword shaderslangType int1 int2 int3 int4 223syn keyword shaderslangType uint1 uint2 uint3 uint4 224syn keyword shaderslangType dword1 dword2 dword3 dword4 225syn keyword shaderslangType half1 half2 half3 half4 226syn keyword shaderslangType float1 float2 float3 float4 227syn keyword shaderslangType double1 double2 double3 double4 228syn keyword shaderslangType min16float1 min16float2 min16float3 min16float4 229syn keyword shaderslangType min10float1 min10float2 min10float3 min10float4 230syn keyword shaderslangType min16int1 min16int2 min16int3 min16int4 231syn keyword shaderslangType min12int1 min12int2 min12int3 min12int4 232syn keyword shaderslangType min16uint1 min16uint2 min16uint3 min16uint4 233syn keyword shaderslangType float16_t1 float16_t2 float16_t3 float16_t4 234syn keyword shaderslangType float32_t1 float32_t2 float32_t3 float32_t4 235syn keyword shaderslangType float64_t1 float64_t2 float64_t3 float64_t4 236syn keyword shaderslangType int16_t1 int16_t2 int16_t3 int16_t4 237syn keyword shaderslangType int32_t1 int32_t2 int32_t3 int32_t4 238syn keyword shaderslangType int64_t1 int64_t2 int64_t3 int64_t4 239syn keyword shaderslangType uint16_t1 uint16_t2 uint16_t3 uint16_t4 240syn keyword shaderslangType uint32_t1 uint32_t2 uint32_t3 uint32_t4 241syn keyword shaderslangType uint64_t1 uint64_t2 uint64_t3 uint64_t4 242 243" Packed types 244syn keyword shaderslangType uint8_t4_packed int8_t4_packed 245 246" Matrix types 247syn match shaderslangType /matrix<\s * \w\+\s * ,\s * [ 1-4 ] \s * ,\s * [ 1-4 ] \s * > / 248syn keyword shaderslangType bool1x1 bool2x1 bool3x1 bool4x1 bool1x2 bool2x2 bool3x2 bool4x2 bool1x3 bool2x3 bool3x3 bool4x3 bool1x4 bool2x4 bool3x4 bool4x4 249syn keyword shaderslangType int1x1 int2x1 int3x1 int4x1 int1x2 int2x2 int3x2 int4x2 int1x3 int2x3 int3x3 int4x3 int1x4 int2x4 int3x4 int4x4 250syn keyword shaderslangType uint1x1 uint2x1 uint3x1 uint4x1 uint1x2 uint2x2 uint3x2 uint4x2 uint1x3 uint2x3 uint3x3 uint4x3 uint1x4 uint2x4 uint3x4 uint4x4 251syn keyword shaderslangType dword1x1 dword2x1 dword3x1 dword4x1 dword1x2 dword2x2 dword3x2 dword4x2 dword1x3 dword2x3 dword3x3 dword4x3 dword1x4 dword2x4 dword3x4 dword4x4 252syn keyword shaderslangType half1x1 half2x1 half3x1 half4x1 half1x2 half2x2 half3x2 half4x2 half1x3 half2x3 half3x3 half4x3 half1x4 half2x4 half3x4 half4x4 253syn keyword shaderslangType float1x1 float2x1 float3x1 float4x1 float1x2 float2x2 float3x2 float4x2 float1x3 float2x3 float3x3 float4x3 float1x4 float2x4 float3x4 float4x4 254syn keyword shaderslangType double1x1 double2x1 double3x1 double4x1 double1x2 double2x2 double3x2 double4x2 double1x3 double2x3 double3x3 double4x3 double1x4 double2x4 double3x4 double4x4 255syn keyword shaderslangType min16float1x1 min16float2x1 min16float3x1 min16float4x1 min16float1x2 min16float2x2 min16float3x2 min16float4x2 min16float1x3 min16float2x3 min16float3x3 min16float4x3 min16float1x4 min16float2x4 min16float3x4 min16float4x4 256syn keyword shaderslangType min10float1x1 min10float2x1 min10float3x1 min10float4x1 min10float1x2 min10float2x2 min10float3x2 min10float4x2 min10float1x3 min10float2x3 min10float3x3 min10float4x3 min10float1x4 min10float2x4 min10float3x4 min10float4x4 257syn keyword shaderslangType min16int1x1 min16int2x1 min16int3x1 min16int4x1 min16int1x2 min16int2x2 min16int3x2 min16int4x2 min16int1x3 min16int2x3 min16int3x3 min16int4x3 min16int1x4 min16int2x4 min16int3x4 min16int4x4 258syn keyword shaderslangType min12int1x1 min12int2x1 min12int3x1 min12int4x1 min12int1x2 min12int2x2 min12int3x2 min12int4x2 min12int1x3 min12int2x3 min12int3x3 min12int4x3 min12int1x4 min12int2x4 min12int3x4 min12int4x4 259syn keyword shaderslangType min16uint1x1 min16uint2x1 min16uint3x1 min16uint4x1 min16uint1x2 min16uint2x2 min16uint3x2 min16uint4x2 min16uint1x3 min16uint2x3 min16uint3x3 min16uint4x3 min16uint1x4 min16uint2x4 min16uint3x4 min16uint4x4 260syn keyword shaderslangType float16_t1x1 float16_t2x1 float16_t3x1 float16_t4x1 float16_t1x2 float16_t2x2 float16_t3x2 float16_t4x2 float16_t1x3 float16_t2x3 float16_t3x3 float16_t4x3 float16_t1x4 float16_t2x4 float16_t3x4 float16_t4x4 261syn keyword shaderslangType float32_t1x1 float32_t2x1 float32_t3x1 float32_t4x1 float32_t1x2 float32_t2x2 float32_t3x2 float32_t4x2 float32_t1x3 float32_t2x3 float32_t3x3 float32_t4x3 float32_t1x4 float32_t2x4 float32_t3x4 float32_t4x4 262syn keyword shaderslangType float64_t1x1 float64_t2x1 float64_t3x1 float64_t4x1 float64_t1x2 float64_t2x2 float64_t3x2 float64_t4x2 float64_t1x3 float64_t2x3 float64_t3x3 float64_t4x3 float64_t1x4 float64_t2x4 float64_t3x4 float64_t4x4 263syn keyword shaderslangType int16_t1x1 int16_t2x1 int16_t3x1 int16_t4x1 int16_t1x2 int16_t2x2 int16_t3x2 int16_t4x2 int16_t1x3 int16_t2x3 int16_t3x3 int16_t4x3 int16_t1x4 int16_t2x4 int16_t3x4 int16_t4x4 264syn keyword shaderslangType int32_t1x1 int32_t2x1 int32_t3x1 int32_t4x1 int32_t1x2 int32_t2x2 int32_t3x2 int32_t4x2 int32_t1x3 int32_t2x3 int32_t3x3 int32_t4x3 int32_t1x4 int32_t2x4 int32_t3x4 int32_t4x4 265syn keyword shaderslangType int64_t1x1 int64_t2x1 int64_t3x1 int64_t4x1 int64_t1x2 int64_t2x2 int64_t3x2 int64_t4x2 int64_t1x3 int64_t2x3 int64_t3x3 int64_t4x3 int64_t1x4 int64_t2x4 int64_t3x4 int64_t4x4 266syn keyword shaderslangType uint16_t1x1 uint16_t2x1 uint16_t3x1 uint16_t4x1 uint16_t1x2 uint16_t2x2 uint16_t3x2 uint16_t4x2 uint16_t1x3 uint16_t2x3 uint16_t3x3 uint16_t4x3 uint16_t1x4 uint16_t2x4 uint16_t3x4 uint16_t4x4 267syn keyword shaderslangType uint32_t1x1 uint32_t2x1 uint32_t3x1 uint32_t4x1 uint32_t1x2 uint32_t2x2 uint32_t3x2 uint32_t4x2 uint32_t1x3 uint32_t2x3 uint32_t3x3 uint32_t4x3 uint32_t1x4 uint32_t2x4 uint32_t3x4 uint32_t4x4 268syn keyword shaderslangType uint64_t1x1 uint64_t2x1 uint64_t3x1 uint64_t4x1 uint64_t1x2 uint64_t2x2 uint64_t3x2 uint64_t4x2 uint64_t1x3 uint64_t2x3 uint64_t3x3 uint64_t4x3 uint64_t1x4 uint64_t2x4 uint64_t3x4 uint64_t4x4 269 270" Sampler types 271syn keyword shaderslangType SamplerState SamplerComparisonState 272syn keyword shaderslangType sampler sampler1D sampler2D sampler3D samplerCUBE sampler_state 273 274" Texture types 275syn keyword shaderslangType Texture1D Texture1DArray Texture2D Texture2DArray Texture2DMS Texture2DMSArray Texture3D TextureCube TextureCubeArray 276syn keyword shaderslangType RWTexture1D RWTexture2D RWTexture2DArray RWTexture3D RWTextureCubeArray RWTexture2DMS RWTexture2DMSArray 277syn keyword shaderslangType FeedbackTexture2D FeedbackTexture2DArray 278syn keyword shaderslangType RasterizerOrderedTexture1D RasterizerOrderedTexture1DArray RasterizerOrderedTexture2D RasterizerOrderedTexture2DArray RasterizerOrderedTexture3D 279syn keyword shaderslangTypeDeprec texture texture1D texture2D texture3D 280 281" Raytracing types 282syn keyword shaderslangType RaytracingAccelerationStructure RayDesc RayQuery BuiltInTriangleIntersectionAttributes 283 284" Work graph input record objects 285syn keyword shaderslangType DispatchNodeInputRecord RWDispatchNodeInputRecord GroupNodeInputRecords RWGroupNodeInputRecords ThreadNodeInputRecord RWThreadNodeInputRecord EmptyNodeInput 286 287" Work graph output node objects 288syn keyword shaderslangType NodeOutput NodeOutputArray EmptyNodeOutput EmptyNodeOutputArray 289 290" Work graph output record objects 291syn keyword shaderslangType ThreadNodeOutputRecords GroupNodeOutputRecords 292 293" State Groups args 294syn case ignore" This section case insensitive 295 296" Blend state group 297syn keyword shaderslangStateGroupArg AlphaToCoverageEnable BlendEnable SrcBlend DestBlend BlendOp SrcBlendAlpha DestBlendAlpha BlendOpAlpha RenderTargetWriteMask 298syn keyword shaderslangStateGroupVal ZERO ONE SRC_COLOR INV_SRC_COLOR SRC_ALPHA INV_SRC_ALPHA DEST_ALPHA INV_DEST_ALPHA DEST_COLOR INV_DEST_COLOR SRC_ALPHA_SAT BLEND_FACTOR INV_BLEND_FACTOR SRC1_COLOR INV_SRC1_COLOR SRC1_ALPHA INV_SRC1_ALPHA 299syn keyword shaderslangStateGroupVal ADD SUBSTRACT REV_SUBSTRACT MIN MAX 300 301" Rasterizer state group 302syn keyword shaderslangStateGroupArg FillMode CullMode FrontCounterClockwise DepthBias DepthBiasClamp SlopeScaledDepthBias ZClipEnable DepthClipEnable ScissorEnable MultisampleEnable AntialiasedLineEnable 303syn keyword shaderslangStateGroupVal SOLID WIREFRAME 304syn keyword shaderslangStateGroupVal NONE FRONT BACK 305 306" Sampler state group 307syn keyword shaderslangStateGroupArg Filter AddressU AddressV AddressW MipLODBias MaxAnisotropy ComparisonFunc BorderColor MinLOD MaxLOD ComparisonFilter 308syn keyword shaderslangStateGroupVal MIN_MAG_MIP_POINT MIN_MAG_POINT_MIP_LINEAR MIN_POINT_MAG_LINEAR_MIP_POINT MIN_POINT_MAG_MIP_LINEAR MIN_LINEAR_MAG_MIP_POINT MIN_LINEAR_MAG_POINT_MIP_LINEAR MIN_MAG_LINEAR_MIP_POINT MIN_MAG_MIP_LINEAR ANISOTROPIC 309syn keyword shaderslangStateGroupVal COMPARISON_MIN_MAG_MIP_POINT COMPARISON_MIN_MAG_POINT_MIP_LINEAR COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT COMPARISON_MIN_POINT_MAG_MIP_LINEAR COMPARISON_MIN_LINEAR_MAG_MIP_POINT 310syn keyword shaderslangStateGroupVal COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR COMPARISON_MIN_MAG_LINEAR_MIP_POINT COMPARISON_MIN_MAG_MIP_LINEAR COMPARISON_ANISOTROPIC 311syn keyword shaderslangStateGroupVal COMPARISON_NEVER COMPARISON_LESS COMPARISON_EQUAL COMPARISON_LESS_EQUAL COMPARISON_GREATER COMPARISON_NOT_EQUAL COMPARISON_GREATER_EQUAL COMPARISON_ALWAYS 312syn keyword shaderslangStateGroupVal WRAP MIRROR CLAMP BORDER MIRROR_ONCE 313syn keyword shaderslangStateGroupVal SAMPLER_FEEDBACK_MIN_MIP SAMPLER_FEEDBACK_MIP_REGION_USED 314 315" Ray flags 316syn keyword shaderslangStateGroupVal RAY_FLAG_NONE RAY_FLAG_FORCE_OPAQUE RAY_FLAG_FORCE_NON_OPAQUE RAY_FLAG_ACCEPT_FIRST_HIT_AND_END_SEARCH RAY_FLAG_SKIP_CLOSEST_HIT_SHADER 317syn keyword shaderslangStateGroupVal RAY_FLAG_CULL_BACK_FACING_TRIANGLES RAY_FLAG_CULL_FRONT_FACING_TRIANGLES RAY_FLAG_CULL_OPAQUE RAY_FLAG_CULL_NON_OPAQUE 318syn keyword shaderslangStateGroupVal RAY_FLAG_SKIP_TRIANGLES RAY_FLAG_SKIP_PROCEDURAL_PRIMITIVES 319 320" HitKind enum 321syn keyword shaderslangStateGroupVal HIT_KIND_TRIANGLE_FRONT_FACE HIT_KIND_TRIANGLE_BACK_FACE 322 323" RayQuery enums 324syn keyword shaderslangStateGroupVal COMMITTED_NOTHING COMMITTED_TRIANGLE_HIT COMMITTED_PROCEDURAL_PRIMITIVE_HIT 325syn keyword shaderslangStateGroupVal CANDIDATE_NON_OPAQUE_TRIANGLE CANDIDATE_PROCEDURAL_PRIMITIVE 326 327" Heap objects 328syn keyword shaderslangStateGroupVal ResourceDescriptorHeap SamplerDescriptorHeap 329 330" Work graph constants 331syn keyword shaderslangStateGroupVal UAV_MEMORY GROUP_SHARED_MEMORY NODE_INPUT_MEMORY NODE_OUTPUT_MEMORY ALL_MEMORY GROUP_SYNC GROUP_SCOPE DEVICE_SCOPE 332 333syn case match " Case sensitive from now on 334 335" Effect files declarations and functions 336" Effect groups, techniques passes 337syn keyword shaderslangEffectGroup fxgroup technique11 pass 338" Effect functions 339syn keyword shaderslangEffectFunc SetBlendState SetDepthStencilState SetRasterizerState SetVertexShader SetHullShader SetDomainShader SetGeometryShader SetPixelShader SetComputeShader CompileShader ConstructGSWithSO SetRenderTargets 340 341" Default highlighting 342hi def link shaderslangProfile shaderslangStatement 343hi def link shaderslangStateGroupArg shaderslangStatement 344hi def link shaderslangStateGroupVal Number 345hi def link shaderslangStatement Statement 346hi def link shaderslangType Type 347hi def link shaderslangTypeDeprec WarningMsg 348hi def link shaderslangStorageClass StorageClass 349hi def link shaderslangSemantic PreProc 350hi def link shaderslangFunc shaderslangStatement 351hi def link shaderslangLayoutQual shaderslangFunc 352hi def link shaderslangAnnotation PreProc 353hi def link shaderslangStructure Structure 354hi def link shaderslangSwizzle SpecialChar 355hi def link shaderslangAttribute Statement 356 357hi def link shaderslangEffectGroup Type 358hi def link shaderslangEffectFunc Statement 359 360let b: current_syntax = "shaderslang"