gen_intrin_main.txt 74 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996
  1. // Copyright (C) Microsoft Corporation. All rights reserved.
  2. // This file is distributed under the University of Illinois Open Source License. See LICENSE.TXT for details.
  3. //
  4. // See hctdb.py for the implementation of intrinsic file processing.
  5. //
  6. // Intrinsic declarations are grouped into namespaces that
  7. // turn into qualifiers for the generated names. This lets
  8. // intrinsics be grouped into sets such as base function-style
  9. // intrinsics, Texture1D intrinsics, etc.
  10. //
  11. // Intrinsic declarations are a line of the form:
  12. //
  13. // <type> \[\[[attr]\]\] <name>([<qual> <type> <name> [, ... ]]) [ : <op>]
  14. //
  15. // <name> is a C++ identifier for the intrinsic or argument name.
  16. //
  17. // <op> is the D3DIOP_* (or D3DMOP_* if the namespace has "Method"
  18. // in the name) enumerant. By default it's the same as the intrinsic
  19. // name, but <op> can be given to set it arbitrarily.
  20. //
  21. // <qual> is one of "in", "out" or "inout" plus optional qualifiers
  22. // "col_major", "row_major".
  23. // variadic functions assume <qual> of "in" for any arguments that are not
  24. // explicitly specified.
  25. //
  26. // <type> is where most of the work goes. <type> lets you
  27. // specify particular types and layouts for arguments and
  28. // also lets you indicate which types must share characteristics
  29. // with other types. <type> can be a simple scalar like "bool"
  30. // or it can require an N-vector with "bool<N>" or an N-by-M
  31. // matrix with "bool<N, M>". You can refer to input columns
  32. // and rows with r, c, r2 and c2, so "float<r, r>" means a
  33. // float matrix with the same number of rows and columns and
  34. // the size comes from the parse input. "<>" means any kind
  35. // of layout is acceptable.
  36. //
  37. // Basic types are bool, int, uint, u64, float, sampler1d, sampler2d,
  38. // sampler3d, sampler_cube, sampler_cmp, sampler, wave and void.
  39. // There are meta-types too: any_int, uint_only, numeric and any.
  40. //
  41. // Along with a type and layout you can also give relations
  42. // between types in an intrinsic. The types of an intrinsic
  43. // are indexed start with 0 at the return type and increasing
  44. // left to right (first argument is 1, second is 2, etc.).
  45. // $match<X, Y> says that the template type (layout) of
  46. // a particular type must match the template type of the X'th
  47. // type and that the component type (base type) of a particular
  48. // type must match the component type of the Y'th type.
  49. // For example, in "float<> acos(in $match<0, 0> float<> x)" the
  50. // $match<0, 0> means that both the template and component type
  51. // of the argument must match that of the return type (index 0).
  52. // The float<> means that any layout (scalar/vector/matrix) of
  53. // floats is acceptable, and then the parameter and return
  54. // type must match.
  55. //
  56. // A value of -1 for X in $match is a special marker for
  57. // object method intrinsics meaning that the type is taken
  58. // from the object's template type.
  59. //
  60. // A value of -1 for Y in $match is a special marker for
  61. // object method intrinsics meaning that the component type
  62. // of the type is taken from the first subelement of the
  63. // object's template type.
  64. //
  65. // Certain $match situations are aliased for readability
  66. // and conciseness.
  67. //
  68. // $classT - This equates to $match<-1, 0> void and is
  69. // used for method return types that are set from
  70. // the object template type.
  71. //
  72. // $funcT - This equates to $match<-3, 0> void and is
  73. // used for method return types that are set from
  74. // the function template type.
  75. //
  76. // $typeN - This equates to $match<N, N> <argtypeN> and is
  77. // shorthand for a direct match of another type.
  78. // For example, in "$type1 abs(in numeric<> x)" the
  79. // $type means that the return type is a direct match
  80. // of the argument type ($type cannot be used on the
  81. // first argument since there's nothing to match at
  82. // that point and can't refer to the return type as
  83. // it is matched after the inputs).
  84. //
  85. namespace Intrinsics {
  86. int<4> [[rn]] D3DCOLORtoUBYTE4(in $match<0, 1> float<4> x) : d3dcolortoubyte4;
  87. uint [[rn]] GetRenderTargetSampleCount() : rtsampleinfo;
  88. float<2> [[rn]] GetRenderTargetSamplePosition(in int s) : rtsamplepos;
  89. void [[]] abort();
  90. $type1 [[rn,unsigned_op=uabs]] abs(in numeric<> x);
  91. $type1 [[rn]] acos(in float_like<> x);
  92. bool [[rn]] all(in any<> x);
  93. void [[]] AllMemoryBarrier() : syncallmemory_ug;
  94. void [[]] AllMemoryBarrierWithGroupSync() : syncgroupandallmemory_ug;
  95. bool [[rn]] any(in any<> x);
  96. double<> [[rn]] asdouble(in $match<0, 1> uint_only<> x, in $match<0, 2> uint_only<> y) : reinterpret_fuse_double;
  97. float<> [[rn]] asfloat(in $match<0, 1> numeric32_only<> x) : reinterpret_float;
  98. float16_t<> [[rn]] asfloat16(in $match<0,1> numeric16_only<> x) : reinterpret_float16;
  99. int16_t<> [[rn]] asint16(in $match<0,1> numeric16_only<> x) : reinterpret_int16;
  100. $type1 [[rn]] asin(in float_like<> x);
  101. int<> [[rn]] asint(in $match<0, 1> numeric32_only<> x) : reinterpret_int;
  102. void [[]] asuint(in double<> d, out $match<1, 2> uint<> x, out $match<1, 3> uint<> y) : reinterpret_split_double_uint;
  103. uint<> [[rn]] asuint(in $match<0, 1> numeric32_only<> x) : reinterpret_uint;
  104. uint16_t<> [[rn]] asuint16(in $match<0,1> numeric16_only<> x) : reinterpret_uint16;
  105. $type1 [[rn]] atan(in float_like<> x);
  106. $type1 [[rn]] atan2(in float_like<> x, in $type1 y);
  107. $type1 [[rn]] ceil(in float_like<> x);
  108. $type1 [[rn,unsigned_op=uclamp]] clamp(in numeric<> x, in $type1 min, in $type1 max);
  109. void [[]] clip(in float<> x);
  110. $type1 [[rn]] cos(in float_like<> x);
  111. $type1 [[rn]] cosh(in float_like<> x);
  112. $match<1, 0> uint<> [[rn]] countbits(in any_int<> x);
  113. $type1 [[rn]] cross(in float_like<3> a, in $type1 b);
  114. $type1 [[rn]] ddx(in float_like<> x);
  115. $type1 [[rn]] ddx_coarse(in float_like<> x);
  116. $type1 [[rn]] ddx_fine(in float_like<> x);
  117. $type1 [[rn]] ddy(in float_like<> x);
  118. $type1 [[rn]] ddy_coarse(in float_like<> x);
  119. $type1 [[rn]] ddy_fine(in float_like<> x);
  120. $type1 [[rn]] degrees(in float_like<> x);
  121. $match<0, 1> float_like [[rn]] determinant(in float_like<r, r> x);
  122. void [[]] DeviceMemoryBarrier() : syncdevicememory_ug;
  123. void [[]] DeviceMemoryBarrierWithGroupSync() : syncgroupanddevicememory_ug;
  124. $match<0, 1> float_like [[rn]] distance(in float_like<c> a, in $type1 b);
  125. $match<0, 1> numeric [[rn]] dot(in numeric<c> a, in $type1 b);
  126. $type1 [[rn]] dst(in numeric<4> a, in $type1 b);
  127. // void errorf(in string Format, ...);
  128. $type1 [[rn]] EvaluateAttributeAtSample(in numeric<> value, in uint index);
  129. $type1 [[rn]] EvaluateAttributeCentroid(in numeric<> value);
  130. $type1 [[rn]] EvaluateAttributeSnapped(in numeric<> value, in int<2> offset);
  131. $type1 [[rn]] GetAttributeAtVertex(in numeric<> value, in uint VertexID);
  132. $type1 [[rn]] exp(in float_like<> x);
  133. $type1 [[rn]] exp2(in float_like<> x);
  134. float<> [[rn]] f16tof32(in uint<> x);
  135. // Use float for DXIL don't support f16 on f32tof16.
  136. uint<> [[rn]] f32tof16(in float<> x);
  137. $type1 [[rn]] faceforward(in float_like<c> N, in $type1 I, in $type1 Ng);
  138. $match<1, 0> uint<> [[rn,unsigned_op=ufirstbithigh,overload=0]] firstbithigh(in any_int<> x);
  139. $match<1, 0> uint<> [[rn]] firstbitlow(in any_int<> x);
  140. $type1 [[rn]] floor(in float_like<> x);
  141. $type1 [[rn]] fma(in double_only<> a, in $type1 b, in $type1 c);
  142. $type1 [[rn]] fmod(in float_like<> a, in $type1 b);
  143. $type1 [[rn]] frac(in float_like<> x);
  144. $type1 [[]] frexp(in float<> x, out $type1 exp);
  145. $type1 [[rn]] fwidth(in float_like<> x);
  146. void [[]] GroupMemoryBarrier() : syncsharedmemory;
  147. void [[]] GroupMemoryBarrierWithGroupSync() : syncgroupandsharedmemory;
  148. // 64-bit integers interlocks
  149. void [[]] InterlockedAdd(in int64_only result, in u64 value);
  150. void [[]] InterlockedAdd(in int64_only result, in u64 value, out any_int64 original) : interlockedadd_immediate;
  151. void [[unsigned_op=InterlockedUMin,overload=0]] InterlockedMin(in int64_only result, in any_int64 value) : interlockedmin;
  152. void [[unsigned_op=InterlockedUMin,overload=0]] InterlockedMin(in int64_only result, in any_int64 value, out any_int64 original) : interlockedmin_immediate;
  153. void [[unsigned_op=InterlockedUMax,overload=0]] InterlockedMax(in int64_only result, in any_int64 value) : interlockedmax;
  154. void [[unsigned_op=InterlockedUMax,overload=0]] InterlockedMax(in int64_only result, in any_int64 value, out any_int64 original) : interlockedmax_immediate;
  155. void [[]] InterlockedAnd(in int64_only result, in u64 value);
  156. void [[]] InterlockedAnd(in int64_only result, in u64 value, out any_int64 original) : interlockedand_immediate;
  157. void [[]] InterlockedOr(in int64_only result, in u64 value);
  158. void [[]] InterlockedOr(in int64_only result, in u64 value, out any_int64 original) : interlockedor_immediate;
  159. void [[]] InterlockedXor(in int64_only result, in u64 value);
  160. void [[]] InterlockedXor(in int64_only result, in u64 value, out any_int64 original) : interlockedxor_immediate;
  161. void [[]] InterlockedCompareStore(in int64_only result, in u64 compare, in u64 value);
  162. void [[]] InterlockedExchange(in int64_only result, in any_int64 value, out any_int64 original);
  163. void [[]] InterlockedCompareExchange(in int64_only result, in u64 compare, in u64 value, out any_int64 original);
  164. // floating point interlocks
  165. void [[]] InterlockedExchange(in float32_only result, in float value, out float original);
  166. void [[]] InterlockedCompareStoreFloatBitwise(in float32_only result, in float compare, in float value);
  167. void [[]] InterlockedCompareExchangeFloatBitwise(in float32_only result, in float compare, in float value, out float original);
  168. // 32-bit integer interlocks
  169. void [[]] InterlockedAdd(in int32_only result, in uint value);
  170. void [[]] InterlockedAdd(in int32_only result, in uint value, out any_int32 original) : interlockedadd_immediate;
  171. void [[unsigned_op=InterlockedUMin,overload=0]] InterlockedMin(in int32_only result, in any_int32 value) : interlockedmin;
  172. void [[unsigned_op=InterlockedUMin,overload=0]] InterlockedMin(in int32_only result, in any_int32 value, out any_int32 original) : interlockedmin_immediate;
  173. void [[unsigned_op=InterlockedUMax,overload=0]] InterlockedMax(in int32_only result, in any_int32 value) : interlockedmax;
  174. void [[unsigned_op=InterlockedUMax,overload=0]] InterlockedMax(in int32_only result, in any_int32 value, out any_int32 original) : interlockedmax_immediate;
  175. void [[]] InterlockedAnd(in int32_only result, in uint value);
  176. void [[]] InterlockedAnd(in int32_only result, in uint value, out any_int32 original) : interlockedand_immediate;
  177. void [[]] InterlockedOr(in int32_only result, in uint value);
  178. void [[]] InterlockedOr(in int32_only result, in uint value, out any_int32 original) : interlockedor_immediate;
  179. void [[]] InterlockedXor(in int32_only result, in uint value);
  180. void [[]] InterlockedXor(in int32_only result, in uint value, out any_int32 original) : interlockedxor_immediate;
  181. void [[]] InterlockedCompareStore(in int32_only result, in uint compare, in uint value);
  182. void [[]] InterlockedExchange(in int32_only result, in uint value, out any_int32 original);
  183. void [[]] InterlockedCompareExchange(in int32_only result, in uint compare, in uint value, out any_int32 original);
  184. $match<1, 0> bool<> [[rn]] isfinite(in float<> x);
  185. $match<1, 0> bool<> [[rn]] isinf(in float<> x);
  186. $match<1, 0> bool<> [[rn]] isnan(in float<> x);
  187. $type1 [[rn]] ldexp(in float_like<> x, in $type1 exp);
  188. $match<0, 1> float_like [[rn]] length(in float_like<c> x);
  189. $type1 [[rn]] lerp(in float_like<> a, in $type1 b, in $type1 s);
  190. $match<0, 1> float_like<4> [[rn]] lit(in float_like l, in $match<2, 1> float_like h, in $match<3, 1> float_like m);
  191. $type1 [[rn]] log(in float_like<> x);
  192. $type1 [[rn]] log10(in float_like<> x);
  193. $type1 [[rn]] log2(in float_like<> x);
  194. $type1 [[rn,unsigned_op=umad]] mad(in numeric<> a, in $type1 b, in $type1 c);
  195. $type1 [[rn,unsigned_op=umax]] max(in numeric<> a, in $type1 b);
  196. $type1 [[rn,unsigned_op=umin]] min(in numeric<> a, in $type1 b);
  197. $type1 [[]] modf(in float_like<> x, out $type1 ip);
  198. uint<4> [[rn]] msad4(in uint reference, in uint<2> source, in uint<4> accum);
  199. numeric [[rn]] mul(in $match<1, 0> numeric a, in $match<2, 0> numeric b) : mul_ss;
  200. numeric<c2> [[rn]] mul(in $match<1, 0> numeric a, in $match<2, 0> numeric<c2> b) : mul_sv;
  201. numeric<r2, c2> [[rn]] mul(in $match<1, 0> numeric a, in $match<2, 0> numeric<r2, c2> b) : mul_sm;
  202. numeric<c> [[rn]] mul(in $match<1, 0> numeric<c> a, in $match<2, 0> numeric b) : mul_vs;
  203. numeric [[rn]] mul(in $match<1, 0> numeric<c> a, in $match<2, 0> numeric<c> b) : mul_vv;
  204. numeric<c2> [[rn,unsigned_op=umul]] mul(in $match<1, 0> numeric<c> a, in col_major $match<2, 0> numeric<c, c2> b) : mul_vm;
  205. numeric<r, c> [[rn]] mul(in $match<1, 0> numeric<r, c> a, in $match<2, 0> numeric b) : mul_ms;
  206. numeric<r> [[rn,unsigned_op=umul]] mul(in row_major $match<1, 0> numeric<r, c> a, in $match<2, 0> numeric<c> b) : mul_mv;
  207. numeric<r, c2> [[rn,unsigned_op=umul]] mul(in row_major $match<1, 0> numeric<r, c> a, in col_major $match<2, 0> numeric<c, c2> b) : mul_mm;
  208. $type1 [[rn]] normalize(in float_like<c> x);
  209. $type1 [[rn]] pow(in float_like<> x, in $type1 y);
  210. void [[]] printf(in string Format, ...);
  211. void [[]] Process2DQuadTessFactorsAvg(in float<4> RawEdgeFactors, in float<2> InsideScale, out float<4> RoundedEdgeFactors, out float<2> RoundedInsideFactors, out float<2> UnroundedInsideFactors) : ptf_2dqavg;
  212. void [[]] Process2DQuadTessFactorsMax(in float<4> RawEdgeFactors, in float<2> InsideScale, out float<4> RoundedEdgeFactors, out float<2> RoundedInsideFactors, out float<2> UnroundedInsideFactors) : ptf_2dqmax;
  213. void [[]] Process2DQuadTessFactorsMin(in float<4> RawEdgeFactors, in float<2> InsideScale, out float<4> RoundedEdgeFactors, out float<2> RoundedInsideFactors, out float<2> UnroundedInsideFactors) : ptf_2dqmin;
  214. void [[]] ProcessIsolineTessFactors(in float<1> RawDetailFactor, in float<1> RawDensityFactor, out float<1> RoundedDetailFactorr, out float<1> RoundedDensityFactor) : ptf_i;
  215. void [[]] ProcessQuadTessFactorsAvg(in float<4> RawEdgeFactors, in float<1> InsideScale, out float<4> RoundedEdgeFactors, out float<2> RoundedInsideFactors, out float<2> UnroundedInsideFactors) : ptf_qavg;
  216. void [[]] ProcessQuadTessFactorsMax(in float<4> RawEdgeFactors, in float<1> InsideScale, out float<4> RoundedEdgeFactors, out float<2> RoundedInsideFactors, out float<2> UnroundedInsideFactors) : ptf_qmax;
  217. void [[]] ProcessQuadTessFactorsMin(in float<4> RawEdgeFactors, in float<1> InsideScale, out float<4> RoundedEdgeFactors, out float<2> RoundedInsideFactors, out float<2> UnroundedInsideFactors) : ptf_qmin;
  218. void [[]] ProcessTriTessFactorsAvg(in float<3> RawEdgeFactors, in float<1> InsideScale, out float<3> RoundedEdgeFactors, out float<1> RoundedInsideFactor, out float<1> UnroundedInsideFactor) : ptf_tmin;
  219. void [[]] ProcessTriTessFactorsMax(in float<3> RawEdgeFactors, in float<1> InsideScale, out float<3> RoundedEdgeFactors, out float<1> RoundedInsideFactor, out float<1> UnroundedInsideFactor) : ptf_tmax;
  220. void [[]] ProcessTriTessFactorsMin(in float<3> RawEdgeFactors, in float<1> InsideScale, out float<3> RoundedEdgeFactors, out float<1> RoundedInsideFactor, out float<1> UnroundedInsideFactor) : ptf_tavg;
  221. $type1 [[rn]] radians(in float_like<> x);
  222. $type1 [[rn]] rcp(in any_float<> x) : rcp_approx;
  223. $type1 [[rn]] reflect(in float_like<c> i, in $type1 n);
  224. $type1 [[rn]] refract(in float_like<c> i, in $type1 n, in float_like ri);
  225. $type1 [[rn]] reversebits(in any_int<> x);
  226. $type1 [[rn]] round(in float_like<> x);
  227. $type1 [[rn]] rsqrt(in float_like<> x);
  228. $type1 [[rn]] saturate(in any_float<> x);
  229. $match<1, 0> int<> [[rn,unsigned_op=usign,overload=0]] sign(in numeric<> x);
  230. $type1 [[rn]] sin(in float_like<> x);
  231. void [[]] sincos(in float_like<> x, out $type1 s, out $type1 c);
  232. $type1 [[rn]] sinh(in float_like<> x);
  233. $type1 [[rn]] smoothstep(in float_like<> a, in $type1 b, in $type1 x);
  234. void [[]] source_mark();
  235. $type1 [[rn]] sqrt(in float_like<> x);
  236. $type1 [[rn]] step(in float_like<> a, in $type1 x);
  237. $type1 [[rn]] tan(in float_like<> x);
  238. $type1 [[rn]] tanh(in float_like<> x);
  239. float_like<4> [[ro]] tex1D(in sampler1d s, in float_like x) : tex1d;
  240. float_like<4> [[ro]] tex1D(in sampler1d s, in float_like<1> x, in $type2 ddx, in $type2 ddy) : tex1d_dd;
  241. float_like<4> [[ro]] tex1Dbias(in sampler1d s, in float_like<4> x) : tex1d_bias;
  242. float_like<4> [[ro]] tex1Dgrad(in sampler1d s, in float_like<1> x, in $type2 ddx, in $type2 ddy) : tex1d_dd;
  243. float_like<4> [[ro]] tex1Dlod(in sampler1d s, in float_like<4> x) : tex1d_lod;
  244. float_like<4> [[ro]] tex1Dproj(in sampler1d s, in float_like<4> x) : tex1d_proj;
  245. float_like<4> [[ro]] tex2D(in sampler2d s, in float_like<2> x) : tex2d;
  246. float_like<4> [[ro]] tex2D(in sampler2d s, in float_like<2> x, in $type2 ddx, in $type2 ddy) : tex2d_dd;
  247. float_like<4> [[ro]] tex2Dbias(in sampler2d s, in float_like<4> x) : tex2d_bias;
  248. float_like<4> [[ro]] tex2Dgrad(in sampler2d s, in float_like<2> x, in $type2 ddx, in $type2 ddy) : tex2d_dd;
  249. float_like<4> [[ro]] tex2Dlod(in sampler2d s, in float_like<4> x) : tex2d_lod;
  250. float_like<4> [[ro]] tex2Dproj(in sampler2d s, in float_like<4> x) : tex2d_proj;
  251. float_like<4> [[ro]] tex3D(in sampler3d s, in float_like<3> x) : tex3d;
  252. float_like<4> [[ro]] tex3D(in sampler3d s, in float_like<3> x, in $type2 ddx, in $type2 ddy) : tex3d_dd;
  253. float_like<4> [[ro]] tex3Dbias(in sampler3d s, in float_like<4> x) : tex3d_bias;
  254. float_like<4> [[ro]] tex3Dgrad(in sampler3d s, in float_like<3> x, in $type2 ddx, in $type2 ddy) : tex3d_dd;
  255. float_like<4> [[ro]] tex3Dlod(in sampler3d s, in float_like<4> x) : tex3d_lod;
  256. float_like<4> [[ro]] tex3Dproj(in sampler3d s, in float_like<4> x) : tex3d_proj;
  257. float_like<4> [[ro]] texCUBE(in sampler_cube s, in float_like<3> x) : texcube;
  258. float_like<4> [[ro]] texCUBE(in sampler_cube s, in float_like<3> x, in $type2 ddx, in $type2 ddy) : texcube_dd;
  259. float_like<4> [[ro]] texCUBEbias(in sampler_cube s, in float_like<4> x) : texcube_bias;
  260. float_like<4> [[ro]] texCUBEgrad(in sampler_cube s, in float_like<3> x, in $type2 ddx, in $type2 ddy) : texcube_dd;
  261. float_like<4> [[ro]] texCUBElod(in sampler_cube s, in float_like<4> x) : texcube_lod;
  262. float_like<4> [[ro]] texCUBEproj(in sampler_cube s, in float_like<4> x) : texcube_proj;
  263. $match<1, 1> any<c, r> [[rn]] transpose(in any<r, c> x);
  264. $type1 [[rn]] trunc(in float_like<> x);
  265. bool [[rn]] CheckAccessFullyMapped(in uint_only status) : check_access_fully_mapped;
  266. uint<c> [[rn]] AddUint64(in $match<1, 0> uint<c> a, in $match<2, 0> uint<c> b) : adduint64;
  267. $type1 [[rn]] NonUniformResourceIndex(in any<> index) : nonuniform_resource_index;
  268. // Wave intrinsics. Only those that depend on the exec mask are marked as wave-sensitive
  269. bool [[wv]] WaveIsFirstLane();
  270. uint [[rn]] WaveGetLaneIndex();
  271. uint [[rn]] WaveGetLaneCount();
  272. bool [[wv]] WaveActiveAnyTrue(in bool cond);
  273. bool [[wv]] WaveActiveAllTrue(in bool cond);
  274. $match<1, 0> bool<> [[wv]] WaveActiveAllEqual(in any<> value);
  275. uint<4> [[wv]] WaveActiveBallot(in bool cond);
  276. $type1 [[]] WaveReadLaneAt(in any<> value, in uint lane);
  277. $type1 [[wv]] WaveReadLaneFirst(in any<> value);
  278. uint [[wv]] WaveActiveCountBits(in bool value);
  279. $type1 [[unsigned_op=WaveActiveUSum,wv]] WaveActiveSum(in numeric<> value);
  280. $type1 [[unsigned_op=WaveActiveUProduct,wv]] WaveActiveProduct(in numeric<> value);
  281. $type1 [[wv]] WaveActiveBitAnd(in uint_only<> value);
  282. $type1 [[wv]] WaveActiveBitOr(in uint_only<> value);
  283. $type1 [[wv]] WaveActiveBitXor(in uint_only<> value);
  284. $type1 [[unsigned_op=WaveActiveUMin,wv]] WaveActiveMin(in numeric<> value);
  285. $type1 [[unsigned_op=WaveActiveUMax,wv]] WaveActiveMax(in numeric<> value);
  286. uint [[wv]] WavePrefixCountBits(in bool value);
  287. $type1 [[unsigned_op=WavePrefixUSum,wv]] WavePrefixSum(in numeric<> value);
  288. $type1 [[unsigned_op=WavePrefixUProduct,wv]] WavePrefixProduct(in numeric<> value);
  289. uint<4> [[wv]] WaveMatch(in numeric<> value);
  290. $type1 [[wv]] WaveMultiPrefixBitAnd(in any_int<> value, in uint<4> mask);
  291. $type1 [[wv]] WaveMultiPrefixBitOr(in any_int<> value, in uint<4> mask);
  292. $type1 [[wv]] WaveMultiPrefixBitXor(in any_int<> value, in uint<4> mask);
  293. uint [[wv]] WaveMultiPrefixCountBits(in bool value, in uint<4> mask);
  294. $type1 [[unsigned_op=WaveMultiPrefixUProduct,wv]] WaveMultiPrefixProduct(in numeric<> value, in uint<4> mask);
  295. $type1 [[unsigned_op=WaveMultiPrefixUSum,wv]] WaveMultiPrefixSum(in numeric<> value, in uint<4> mask);
  296. $type1 [[]] QuadReadLaneAt(in numeric<> value, in uint quadLane);
  297. $type1 [[]] QuadReadAcrossX(in numeric<> value);
  298. $type1 [[]] QuadReadAcrossY(in numeric<> value);
  299. $type1 [[]] QuadReadAcrossDiagonal(in numeric<> value);
  300. // Raytracing
  301. void [[]] TraceRay(in acceleration_struct AccelerationStructure, in uint RayFlags, in uint InstanceInclusionMask, in uint RayContributionToHitGroupIndex, in uint MultiplierForGeometryContributionToHitGroupIndex, in uint MissShaderIndex, in ray_desc Ray, inout udt Payload);
  302. bool [[]] ReportHit(in float THit, in uint HitKind, in udt Attributes);
  303. void [[]] CallShader(in uint ShaderIndex, inout udt Parameter);
  304. void [[]] IgnoreHit();
  305. void [[]] AcceptHitAndEndSearch();
  306. uint<3> [[rn]] DispatchRaysIndex();
  307. uint<3> [[rn]] DispatchRaysDimensions();
  308. // group: Ray Vectors
  309. float<3> [[rn]] WorldRayOrigin();
  310. float<3> [[rn]] WorldRayDirection();
  311. float<3> [[rn]] ObjectRayOrigin();
  312. float<3> [[rn]] ObjectRayDirection();
  313. // group: RayT
  314. float [[rn]] RayTMin();
  315. float [[rn]] RayTCurrent();
  316. // group: Raytracing uint System Values
  317. uint [[rn]] PrimitiveIndex();
  318. uint [[rn]] InstanceID();
  319. uint [[rn]] InstanceIndex();
  320. uint [[rn]] GeometryIndex();
  321. uint [[rn]] HitKind();
  322. uint [[rn]] RayFlags();
  323. // group: Ray Transforms
  324. float<3,4> [[rn]] ObjectToWorld();
  325. float<3,4> [[rn]] WorldToObject();
  326. float<3,4> [[rn]] ObjectToWorld3x4();
  327. float<3,4> [[rn]] WorldToObject3x4();
  328. float<4,3> [[rn]] ObjectToWorld4x3();
  329. float<4,3> [[rn]] WorldToObject4x3();
  330. // Packed dot products with accumulate:
  331. $type3 [[rn]] dot4add_u8packed(in uint a, in $type1 b, in uint b);
  332. $type3 [[rn]] dot4add_i8packed(in uint a, in $type1 b, in int b);
  333. $type3 [[rn]] dot2add(in float16_t<2> a, in $type1 b, in float b);
  334. // Unpacking intrinsics
  335. int16_t<4> [[rn]] unpack_s8s16(in p32i8 pk);
  336. uint16_t<4> [[rn]] unpack_u8u16(in p32u8 pk);
  337. int<4> [[rn]] unpack_s8s32(in p32i8 pk);
  338. uint<4> [[rn]] unpack_u8u32(in p32u8 pk);
  339. // Packing intrinsics
  340. p32i8 [[rn]] pack_s8(in any_int16or32<4> v);
  341. p32u8 [[rn]] pack_u8(in any_int16or32<4> v);
  342. p32i8 [[rn]] pack_clamp_s8(in sint16or32_only<4> v);
  343. p32u8 [[rn]] pack_clamp_u8(in sint16or32_only<4> v);
  344. // Mesh shader intrinsics:
  345. void [[]] SetMeshOutputCounts(in uint numVertices, in uint numPrimitives);
  346. // Amplification shader intrinsics:
  347. void [[]] DispatchMesh(in uint threadGroupCountX, in uint threadGroupCountY, in uint threadGroupCountZ, in udt meshPayload);
  348. // Return true if the current lane is a helper lane
  349. bool [[ro]] IsHelperLane();
  350. // HL Op for allocating ray query object that default constructor uses
  351. uint [[hidden]] AllocateRayQuery(in uint flags);
  352. resource [[hidden]] CreateResourceFromHeap(in uint index);
  353. } namespace
  354. // SPIRV Change Starts
  355. namespace VkIntrinsics {
  356. u64 [[]] ReadClock(in uint scope);
  357. } namespace
  358. // SPIRV Change Ends
  359. namespace StreamMethods {
  360. void [[]] Append(in $match<-1, 1> void x) : stream_append;
  361. void [[]] RestartStrip() : stream_restart;
  362. } namespace
  363. namespace Texture1DMethods {
  364. // Use float for DXIL don't support f16 on CalcLOD.
  365. float [[ro]] CalculateLevelOfDetail(in sampler1d s, in float<1> x) : tex1d_t_calc_lod;
  366. float [[ro]] CalculateLevelOfDetailUnclamped(in sampler s, in float<1> x) : tex1d_t_calc_lod_unclamped;
  367. void [[]] GetDimensions(in uint x, out uint_only width, out $type2 levels) : resinfo_uint;
  368. void [[]] GetDimensions(in uint x, out float_like width, out $type2 levels) : resinfo;
  369. void [[]] GetDimensions(out uint_only width) : resinfo_o;
  370. void [[]] GetDimensions(out float_like width) : resinfo_o;
  371. $classT [[ro]] Load(in int<2> x) : tex1d_t_load;
  372. $classT [[ro]] Load(in int<2> x, in int<1> o) : tex1d_t_load_o;
  373. $classT [[]] Load(in int<2> x, in int<1> o, out uint_only status) : tex1d_t_load_o_s;
  374. $classT [[ro]] Sample(in sampler s, in float<1> x) : tex1d_t;
  375. $classT [[ro]] Sample(in sampler s, in float<1> x, in int<1> o) : tex1d_t_o;
  376. $classT [[ro]] SampleBias(in sampler s, in float<1> x, in float bias) : tex1d_t_bias;
  377. $classT [[ro]] SampleBias(in sampler s, in float<1> x, in float bias, in int<1> o) : tex1d_t_bias_o;
  378. float_like [[ro]] SampleCmp(in sampler_cmp s, in float<1> x, in float compareValue) : tex1d_t_comp;
  379. float_like [[ro]] SampleCmp(in sampler_cmp s, in float<1> x, in float compareValue, in int<1> o) : tex1d_t_comp_o;
  380. float_like [[ro]] SampleCmpLevelZero(in sampler_cmp s, in float<1> x, in float compareValue) : tex1d_t_comp_lz;
  381. float_like [[ro]] SampleCmpLevelZero(in sampler_cmp s, in float<1> x, in float compareValue, in int<1> o) : tex1d_t_comp_lz_o;
  382. $classT [[ro]] SampleGrad(in sampler s, in float<1> x, in $type2 ddx, in $type2 ddy) : tex1d_t_dd;
  383. $classT [[ro]] SampleGrad(in sampler s, in float<1> x, in $type2 ddx, in $type2 ddy, in int<1> o) : tex1d_t_dd_o;
  384. $classT [[ro]] SampleLevel(in sampler s, in float<1> x, in float lod) : tex1d_t_lod;
  385. $classT [[ro]] SampleLevel(in sampler s, in float<1> x, in float lod, in int<1> o) : tex1d_t_lod_o;
  386. $classT [[ro]] Sample(in sampler s, in float<1> x, in int<1> o, in float clamp) : tex1d_t_o_cl;
  387. $classT [[]] Sample(in sampler s, in float<1> x, in int<1> o, in float clamp, out uint_only status) : tex1d_t_o_cl_s;
  388. float_like [[ro]] SampleCmp(in sampler_cmp s, in float<1> x, in float compareValue, in int<1> o, in float clamp) : tex1d_t_comp_o_cl;
  389. float_like [[]] SampleCmp(in sampler_cmp s, in float<1> x, in float compareValue, in int<1> o, in float clamp, out uint_only status) : tex1d_t_comp_o_cl_s;
  390. float_like [[]] SampleCmpLevelZero(in sampler_cmp s, in float<1> x, in float compareValue, in int<1> o, out uint_only status) : tex1d_t_comp_o_s;
  391. $classT [[]] SampleLevel(in sampler s, in float<1> x, in float lod, in int<1> o, out uint_only status) : tex1d_t_lod_o_s;
  392. $classT [[ro]] SampleBias(in sampler s, in float<1> x, in float bias, in int<1> o, in float clamp) : tex1d_t_bias_o_cl;
  393. $classT [[]] SampleBias(in sampler s, in float<1> x, in float bias, in int<1> o, in float clamp, out uint_only status) : tex1d_t_bias_o_cl_s;
  394. $classT [[]] SampleGrad(in sampler s, in float<1> x, in $type2 ddx, in $type2 ddy, in int<1> o, in float clamp) : tex1d_t_dd_o_cl;
  395. $classT [[]] SampleGrad(in sampler s, in float<1> x, in $type2 ddx, in $type2 ddy, in int<1> o, in float clamp, out uint_only status) : tex1d_t_dd_o_cl_s;
  396. } namespace
  397. namespace Texture1DArrayMethods {
  398. float [[ro]] CalculateLevelOfDetail(in sampler s, in float<1> x) : tex1d_t_calc_lod_array;
  399. float [[ro]] CalculateLevelOfDetailUnclamped(in sampler s, in float<1> x) : tex1d_t_calc_lod_unclamped_array;
  400. void [[]] GetDimensions(in uint x, out uint_only width, out $type2 elements, out $type2 levels) : resinfo_uint;
  401. void [[]] GetDimensions(in uint x, out float_like width, out $type2 elements, out $type2 levels) : resinfo;
  402. void [[]] GetDimensions(out uint_only width, out $type1 elements) : resinfo_uint_o;
  403. void [[]] GetDimensions(out float_like width, out $type1 elements) : resinfo_o;
  404. $classT [[ro]] Load(in int<3> x) : tex1d_t_load_array;
  405. $classT [[ro]] Load(in int<3> x, in int<1> o) : tex1d_t_load_array_o;
  406. $classT [[]] Load(in int<3> x, in int<1> o, out uint_only status) : tex1d_t_load_array_o_s;
  407. $classT [[ro]] Sample(in sampler s, in float<2> x) : tex1d_t_array;
  408. $classT [[ro]] Sample(in sampler s, in float<2> x, in int<1> o) : tex1d_t_array_o;
  409. $classT [[ro]] SampleBias(in sampler s, in float<2> x, in float bias) : tex1d_t_bias_array;
  410. $classT [[ro]] SampleBias(in sampler s, in float<2> x, in float bias, in int<1> o) : tex1d_t_bias_array_o;
  411. float_like [[ro]] SampleCmp(in sampler_cmp s, in float<2> x, in float compareValue) : tex1d_t_comp_array;
  412. float_like [[ro]] SampleCmp(in sampler_cmp s, in float<2> x, in float compareValue, in int<1> o) : tex1d_t_comp_array_o;
  413. float_like [[ro]] SampleCmpLevelZero(in sampler_cmp s, in float<2> x, in float compareValue) : tex1d_t_comp_lz_array;
  414. float_like [[ro]] SampleCmpLevelZero(in sampler_cmp s, in float<2> x, in float compareValue, in int<1> o) : tex1d_t_comp_lz_array_o;
  415. $classT [[ro]] SampleGrad(in sampler s, in float<2> x, in $match<2, 2> float<1> ddx, in $match<2, 2> float<1> ddy) : tex1d_t_dd_array;
  416. $classT [[ro]] SampleGrad(in sampler s, in float<2> x, in $match<2, 2> float<1> ddx, in $match<2, 2> float<1> ddy, in int<1> o) : tex1d_t_dd_array_o;
  417. $classT [[ro]] SampleLevel(in sampler s, in float<2> x, in float lod) : tex1d_t_lod_array;
  418. $classT [[ro]] SampleLevel(in sampler s, in float<2> x, in float lod, in int<1> o) : tex1d_t_lod_array_o;
  419. $classT [[ro]] Sample(in sampler s, in float<2> x, in int<1> o, in float clamp) : tex1d_t_array_o_cl;
  420. $classT [[]] Sample(in sampler s, in float<2> x, in int<1> o, in float clamp, out uint_only status) : tex1d_t_array_o_cl_s;
  421. float_like [[ro]] SampleCmp(in sampler_cmp s, in float<2> x, in float compareValue, in int<1> o, in float clamp) : tex1d_t_comp_array_o_cl;
  422. float_like [[]] SampleCmp(in sampler_cmp s, in float<2> x, in float compareValue, in int<1> o, in float clamp, out uint_only status) : tex1d_t_comp_array_o_cl_s;
  423. float_like [[]] SampleCmpLevelZero(in sampler_cmp s, in float<2> x, in float compareValue, in int<1> o, out uint_only status) : tex1d_t_comp_array_o_s;
  424. $classT [[]] SampleLevel(in sampler s, in float<2> x, in float lod, in int<1> o, out uint_only status) : tex1d_t_lod_array_o_s;
  425. $classT [[ro]] SampleBias(in sampler s, in float<2> x, in float bias, in int<1> o, in float clamp) : tex1d_t_bias_array_o_cl;
  426. $classT [[]] SampleBias(in sampler s, in float<2> x, in float bias, in int<1> o, in float clamp, out uint_only status) : tex1d_t_bias_array_o_cl_s;
  427. $classT [[ro]] SampleGrad(in sampler s, in float<2> x, in $match<2, 2> float<1> ddx, in $match<2, 2> float<1> ddy, in int<1> o, in float clamp) : tex1d_t_dd_array_o_cl;
  428. $classT [[]] SampleGrad(in sampler s, in float<2> x, in $match<2, 2> float<1> ddx, in $match<2, 2> float<1> ddy, in int<1> o, in float clamp, out uint_only status) : tex1d_t_dd_array_o_cl_s;
  429. } namespace
  430. namespace Texture2DMethods {
  431. float [[ro]] CalculateLevelOfDetail(in sampler s, in float<2> x) : tex2d_t_calc_lod;
  432. float [[ro]] CalculateLevelOfDetailUnclamped(in sampler s, in float<2> x) : tex2d_t_calc_lod_unclamped;
  433. $match<0, -1> void<4> [[ro]] Gather(in sampler s, in float<2> x) : tex2d_t_gather;
  434. $match<0, -1> void<4> [[ro]] Gather(in sampler s, in float<2> x, in int<2> o) : tex2d_t_gather_o;
  435. $match<0, -1> void<4> [[ro]] GatherAlpha(in sampler s, in float<2> x) : tex2d_t_gather_alpha;
  436. $match<0, -1> void<4> [[ro]] GatherAlpha(in sampler s, in float<2> x, in int<2> o) : tex2d_t_gather_alpha_o;
  437. $match<0, -1> void<4> [[ro]] GatherAlpha(in sampler s, in float<2> x, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4) : tex2d_t_gather_alpha_o4;
  438. $match<0, -1> void<4> [[ro]] GatherBlue(in sampler s, in float<2> x) : tex2d_t_gather_blue;
  439. $match<0, -1> void<4> [[ro]] GatherBlue(in sampler s, in float<2> x, in int<2> o) : tex2d_t_gather_blue_o;
  440. $match<0, -1> void<4> [[ro]] GatherBlue(in sampler s, in float<2> x, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4) : tex2d_t_gather_blue_o4;
  441. $match<0, -1> void<4> [[ro]] GatherCmp(in sampler_cmp s, in float<2> x, in float compareValue) : tex2d_t_gather_comp;
  442. $match<0, -1> void<4> [[ro]] GatherCmp(in sampler_cmp s, in float<2> x, in float compareValue, in int<2> o) : tex2d_t_gather_comp_o;
  443. $match<0, -1> void<4> [[ro]] GatherCmpAlpha(in sampler_cmp s, in float<2> x, in float compareValue) : tex2d_t_gather_comp_alpha;
  444. $match<0, -1> void<4> [[ro]] GatherCmpAlpha(in sampler_cmp s, in float<2> x, in float compareValue, in int<2> o) : tex2d_t_gather_comp_alpha_o;
  445. $match<0, -1> void<4> [[ro]] GatherCmpAlpha(in sampler_cmp s, in float<2> x, in float compareValue, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4) : tex2d_t_gather_comp_alpha_o4;
  446. $match<0, -1> void<4> [[ro]] GatherCmpBlue(in sampler_cmp s, in float<2> x, in float compareValue) : tex2d_t_gather_comp_blue;
  447. $match<0, -1> void<4> [[ro]] GatherCmpBlue(in sampler_cmp s, in float<2> x, in float compareValue, in int<2> o) : tex2d_t_gather_comp_blue_o;
  448. $match<0, -1> void<4> [[ro]] GatherCmpBlue(in sampler_cmp s, in float<2> x, in float compareValue, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4) : tex2d_t_gather_comp_blue_o4;
  449. $match<0, -1> void<4> [[ro]] GatherCmpGreen(in sampler_cmp s, in float<2> x, in float compareValue) : tex2d_t_gather_comp_green;
  450. $match<0, -1> void<4> [[ro]] GatherCmpGreen(in sampler_cmp s, in float<2> x, in float compareValue, in int<2> o) : tex2d_t_gather_comp_green_o;
  451. $match<0, -1> void<4> [[ro]] GatherCmpGreen(in sampler_cmp s, in float<2> x, in float compareValue, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4) : tex2d_t_gather_comp_green_o4;
  452. $match<0, -1> void<4> [[ro]] GatherCmpRed(in sampler_cmp s, in float<2> x, in float compareValue) : tex2d_t_gather_comp_red;
  453. $match<0, -1> void<4> [[ro]] GatherCmpRed(in sampler_cmp s, in float<2> x, in float compareValue, in int<2> o) : tex2d_t_gather_comp_red_o;
  454. $match<0, -1> void<4> [[ro]] GatherCmpRed(in sampler_cmp s, in float<2> x, in float compareValue, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4) : tex2d_t_gather_comp_red_o4;
  455. $match<0, -1> void<4> [[ro]] GatherGreen(in sampler s, in float<2> x) : tex2d_t_gather_green;
  456. $match<0, -1> void<4> [[ro]] GatherGreen(in sampler s, in float<2> x, in int<2> o) : tex2d_t_gather_green_o;
  457. $match<0, -1> void<4> [[ro]] GatherGreen(in sampler s, in float<2> x, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4) : tex2d_t_gather_green_o4;
  458. $match<0, -1> void<4> [[ro]] GatherRed(in sampler s, in float<2> x) : tex2d_t_gather_red;
  459. $match<0, -1> void<4> [[ro]] GatherRed(in sampler s, in float<2> x, in int<2> o) : tex2d_t_gather_red_o;
  460. $match<0, -1> void<4> [[ro]] GatherRed(in sampler s, in float<2> x, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4) : tex2d_t_gather_red_o4;
  461. void [[]] GetDimensions(in uint x, out uint_only width, out $type2 height, out $type2 levels) : resinfo_uint;
  462. void [[]] GetDimensions(in uint x, out float_like width, out $type2 height, out $type2 levels) : resinfo;
  463. void [[]] GetDimensions(out uint_only width, out $type1 height) : resinfo_uint_o;
  464. void [[]] GetDimensions(out float_like width, out $type1 height) : resinfo_o;
  465. $classT [[ro]] Load(in int<3> x) : tex2d_t_load;
  466. $classT [[ro]] Load(in int<3> x, in int<2> o) : tex2d_t_load_o;
  467. $classT [[]] Load(in int<3> x, in int<2> o, out uint_only status) : tex2d_t_load_o_s;
  468. $classT [[ro]] Sample(in sampler s, in float<2> x) : tex2d_t;
  469. $classT [[ro]] Sample(in sampler s, in float<2> x, in int<2> o) : tex2d_t_o;
  470. $classT [[ro]] SampleBias(in sampler s, in float<2> x, in float bias) : tex2d_t_bias;
  471. $classT [[ro]] SampleBias(in sampler s, in float<2> x, in float bias, in int<2> o) : tex2d_t_bias_o;
  472. float_like [[ro]] SampleCmp(in sampler_cmp s, in float<2> x, in float compareValue) : tex2d_t_comp;
  473. float_like [[ro]] SampleCmp(in sampler_cmp s, in float<2> x, in float compareValue, in int<2> o) : tex2d_t_comp_o;
  474. float_like [[ro]] SampleCmpLevelZero(in sampler_cmp s, in float<2> x, in float compareValue) : tex2d_t_comp_lz;
  475. float_like [[ro]] SampleCmpLevelZero(in sampler_cmp s, in float<2> x, in float compareValue, in int<2> o) : tex2d_t_comp_lz_o;
  476. $classT [[ro]] SampleGrad(in sampler s, in float<2> x, in $type2 ddx, in $type2 ddy) : tex2d_t_dd;
  477. $classT [[ro]] SampleGrad(in sampler s, in float<2> x, in $type2 ddx, in $type2 ddy, in int<2> o) : tex2d_t_dd_o;
  478. $classT [[ro]] SampleLevel(in sampler s, in float<2> x, in float lod) : tex2d_t_lod;
  479. $classT [[ro]] SampleLevel(in sampler s, in float<2> x, in float lod, in int<2> o) : tex2d_t_lod_o;
  480. $classT [[ro]] Sample(in sampler s, in float<2> x, in int<2> o, in float clamp) : tex2d_t_o_cl;
  481. $classT [[]] Sample(in sampler s, in float<2> x, in int<2> o, in float clamp, out uint_only status) : tex2d_t_o_cl_s;
  482. float_like [[ro]] SampleCmp(in sampler_cmp s, in float<2> x, in float compareValue, in int<2> o, in float clamp) : tex2d_t_comp_o_cl;
  483. float_like [[]] SampleCmp(in sampler_cmp s, in float<2> x, in float compareValue, in int<2> o, in float clamp, out uint_only status) : tex2d_t_comp_o_cl_s;
  484. float_like [[]] SampleCmpLevelZero(in sampler_cmp s, in float<2> x, in float compareValue, in int<2> o, out uint_only status) : tex2d_t_comp_o_s;
  485. $classT [[]] SampleLevel(in sampler s, in float<2> x, in float lod, in int<2> o, out uint_only status) : tex2d_t_lod_o_s;
  486. $classT [[ro]] SampleBias(in sampler s, in float<2> x, in float bias, in int<2> o, in float clamp) : tex2d_t_bias_o_cl;
  487. $classT [[]] SampleBias(in sampler s, in float<2> x, in float bias, in int<2> o, in float clamp, out uint_only status) : tex2d_t_bias_o_cl_s;
  488. $classT [[ro]] SampleGrad(in sampler s, in float<2> x, in $type2 ddx, in $type2 ddy, in int<2> o, in float clamp) : tex2d_t_dd_o_cl;
  489. $classT [[]] SampleGrad(in sampler s, in float<2> x, in $type2 ddx, in $type2 ddy, in int<2> o, in float clamp, out uint_only status) : tex2d_t_dd_o_cl_s;
  490. $match<0, -1> void<4> [[]] Gather(in sampler s, in float<2> x, in int<2> o, out uint_only status) : tex2d_t_gather_o_s;
  491. $match<0, -1> void<4> [[]] GatherRed(in sampler s, in float<2> x, in int<2> o, out uint_only status) : tex2d_t_gather_red_o_s;
  492. $match<0, -1> void<4> [[]] GatherRed(in sampler s, in float<2> x, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4, out uint_only status) : tex2d_t_gather_red_o4_s;
  493. $match<0, -1> void<4> [[]] GatherGreen(in sampler s, in float<2> x, in int<2> o, out uint_only status) : tex2d_t_gather_green_o_s;
  494. $match<0, -1> void<4> [[]] GatherGreen(in sampler s, in float<2> x, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4, out uint_only status) : tex2d_t_gather_green_o4_s;
  495. $match<0, -1> void<4> [[]] GatherBlue(in sampler s, in float<2> x, in int<2> o, out uint_only status) : tex2d_t_gather_blue_o_s;
  496. $match<0, -1> void<4> [[]] GatherBlue(in sampler s, in float<2> x, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4, out uint_only status) : tex2d_t_gather_blue_o4_s;
  497. $match<0, -1> void<4> [[]] GatherAlpha(in sampler s, in float<2> x, in int<2> o, out uint_only status) : tex2d_t_gather_alpha_o_s;
  498. $match<0, -1> void<4> [[]] GatherAlpha(in sampler s, in float<2> x, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4, out uint_only status) : tex2d_t_gather_alpha_o4_s;
  499. $match<0, -1> void<4> [[]] GatherCmp(in sampler_cmp s, in float<2> x, in float compareValue, in int<2> o, out uint_only status) : tex2d_t_gather_comp_o_s;
  500. $match<0, -1> void<4> [[]] GatherCmpRed(in sampler_cmp s, in float<2> x, in float compareValue, in int<2> o, out uint_only status) : tex2d_t_gather_comp_red_o_s;
  501. $match<0, -1> void<4> [[]] GatherCmpGreen(in sampler_cmp s, in float<2> x, in float compareValue, in int<2> o, out uint_only status) : tex2d_t_gather_comp_green_o_s;
  502. $match<0, -1> void<4> [[]] GatherCmpBlue(in sampler_cmp s, in float<2> x, in float compareValue, in int<2> o, out uint_only status) : tex2d_t_gather_comp_blue_o_s;
  503. $match<0, -1> void<4> [[]] GatherCmpAlpha(in sampler_cmp s, in float<2> x, in float compareValue, in int<2> o, out uint_only status) : tex2d_t_gather_comp_alpha_o_s;
  504. $match<0, -1> void<4> [[]] GatherCmpRed(in sampler_cmp s, in float<2> x, in float compareValue, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4, out uint_only status) : tex2d_t_gather_comp_red_o4_s;
  505. $match<0, -1> void<4> [[]] GatherCmpGreen(in sampler_cmp s, in float<2> x, in float compareValue, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4, out uint_only status) : tex2d_t_gather_comp_green_o4_s;
  506. $match<0, -1> void<4> [[]] GatherCmpBlue(in sampler_cmp s, in float<2> x, in float compareValue, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4, out uint_only status) : tex2d_t_gather_comp_blue_o4_s;
  507. $match<0, -1> void<4> [[]] GatherCmpAlpha(in sampler_cmp s, in float<2> x, in float compareValue, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4, out uint_only status) : tex2d_t_gather_comp_alpha_o4_s;
  508. } namespace
  509. namespace Texture2DMSMethods {
  510. void [[]] GetDimensions(out uint_only width, out $type1 height, out $type2 samples) : resinfo_uint_o;
  511. void [[]] GetDimensions(out float_like width, out $type1 height, out $type2 samples) : resinfo_o;
  512. float_like<2> [[ro]] GetSamplePosition(in int s) : samplepos;
  513. $classT [[]] Load(in int<2> x, in int s) : texture2d_ms;
  514. $classT [[]] Load(in int<2> x, in int s, in int<2> o) : texture2d_ms_o;
  515. $classT [[]] Load(in int<2> x, in int s, in int<2> o, out uint_only status) : texture2d_ms_o_s;
  516. } namespace
  517. namespace Texture2DArrayMethods {
  518. float [[ro]] CalculateLevelOfDetail(in sampler s, in float<2> x) : tex2d_t_calc_lod_array;
  519. float [[ro]] CalculateLevelOfDetailUnclamped(in sampler s, in float<2> x) : tex2d_t_calc_lod_unclamped_array;
  520. $match<0, -1> void<4> [[ro]] Gather(in sampler s, in float<3> x) : tex2d_t_gather_array;
  521. $match<0, -1> void<4> [[ro]] Gather(in sampler s, in float<3> x, in int<2> o) : tex2d_t_gather_array_o;
  522. $match<0, -1> void<4> [[ro]] GatherAlpha(in sampler s, in float<3> x) : tex2d_t_gather_alpha_array;
  523. $match<0, -1> void<4> [[ro]] GatherAlpha(in sampler s, in float<3> x, in int<2> o) : tex2d_t_gather_alpha_array_o;
  524. $match<0, -1> void<4> [[ro]] GatherAlpha(in sampler s, in float<3> x, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4) : tex2d_t_gather_alpha_array_o4;
  525. $match<0, -1> void<4> [[ro]] GatherBlue(in sampler s, in float<3> x) : tex2d_t_gather_blue_array;
  526. $match<0, -1> void<4> [[ro]] GatherBlue(in sampler s, in float<3> x, in int<2> o) : tex2d_t_gather_blue_array_o;
  527. $match<0, -1> void<4> [[ro]] GatherBlue(in sampler s, in float<3> x, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4) : tex2d_t_gather_blue_array_o4;
  528. $match<0, -1> void<4> [[ro]] GatherCmp(in sampler_cmp s, in float<3> x, in float compareValue) : tex2d_t_gather_comp_array;
  529. $match<0, -1> void<4> [[ro]] GatherCmp(in sampler_cmp s, in float<3> x, in float compareValue, in int<2> o) : tex2d_t_gather_comp_array_o;
  530. $match<0, -1> void<4> [[ro]] GatherCmpAlpha(in sampler_cmp s, in float<3> x, in float compareValue) : tex2d_t_gather_comp_alpha_array;
  531. $match<0, -1> void<4> [[ro]] GatherCmpAlpha(in sampler_cmp s, in float<3> x, in float compareValue, in int<2> o) : tex2d_t_gather_comp_alpha_array_o;
  532. $match<0, -1> void<4> [[ro]] GatherCmpAlpha(in sampler_cmp s, in float<3> x, in float compareValue, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4) : tex2d_t_gather_comp_alpha_array_o4;
  533. $match<0, -1> void<4> [[ro]] GatherCmpBlue(in sampler_cmp s, in float<3> x, in float compareValue) : tex2d_t_gather_comp_blue_array;
  534. $match<0, -1> void<4> [[ro]] GatherCmpBlue(in sampler_cmp s, in float<3> x, in float compareValue, in int<2> o) : tex2d_t_gather_comp_blue_array_o;
  535. $match<0, -1> void<4> [[ro]] GatherCmpBlue(in sampler_cmp s, in float<3> x, in float compareValue, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4) : tex2d_t_gather_comp_blue_array_o4;
  536. $match<0, -1> void<4> [[ro]] GatherCmpGreen(in sampler_cmp s, in float<3> x, in float compareValue) : tex2d_t_gather_comp_green_array;
  537. $match<0, -1> void<4> [[ro]] GatherCmpGreen(in sampler_cmp s, in float<3> x, in float compareValue, in int<2> o) : tex2d_t_gather_comp_green_array_o;
  538. $match<0, -1> void<4> [[ro]] GatherCmpGreen(in sampler_cmp s, in float<3> x, in float compareValue, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4) : tex2d_t_gather_comp_green_array_o4;
  539. $match<0, -1> void<4> [[ro]] GatherCmpRed(in sampler_cmp s, in float<3> x, in float compareValue) : tex2d_t_gather_comp_red_array;
  540. $match<0, -1> void<4> [[ro]] GatherCmpRed(in sampler_cmp s, in float<3> x, in float compareValue, in int<2> o) : tex2d_t_gather_comp_red_array_o;
  541. $match<0, -1> void<4> [[ro]] GatherCmpRed(in sampler_cmp s, in float<3> x, in float compareValue, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4) : tex2d_t_gather_comp_red_array_o4;
  542. $match<0, -1> void<4> [[ro]] GatherGreen(in sampler s, in float<3> x) : tex2d_t_gather_green_array;
  543. $match<0, -1> void<4> [[ro]] GatherGreen(in sampler s, in float<3> x, in int<2> o) : tex2d_t_gather_green_array_o;
  544. $match<0, -1> void<4> [[ro]] GatherGreen(in sampler s, in float<3> x, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4) : tex2d_t_gather_green_array_o4;
  545. $match<0, -1> void<4> [[ro]] GatherRed(in sampler s, in float<3> x) : tex2d_t_gather_red_array;
  546. $match<0, -1> void<4> [[ro]] GatherRed(in sampler s, in float<3> x, in int<2> o) : tex2d_t_gather_red_array_o;
  547. $match<0, -1> void<4> [[ro]] GatherRed(in sampler s, in float<3> x, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4) : tex2d_t_gather_red_array_o4;
  548. void [[]] GetDimensions(in uint x, out uint_only width, out $type2 height, out $type2 elements, out $type2 levels) : resinfo_uint;
  549. void [[]] GetDimensions(in uint x, out float_like width, out $type2 height, out $type2 elements, out $type2 levels) : resinfo;
  550. void [[]] GetDimensions(out uint_only width, out $type1 height, out $type1 elements) : resinfo_uint_o;
  551. void [[]] GetDimensions(out float_like width, out $type1 height, out $type1 elements) : resinfo_o;
  552. $classT [[ro]] Load(in int<4> x) : tex2d_t_load_array;
  553. $classT [[ro]] Load(in int<4> x, in int<2> o) : tex2d_t_load_array_o;
  554. $classT [[]] Load(in int<4> x, in int<2> o, out uint_only status) : tex2d_t_load_array_o_s;
  555. $classT [[ro]] Sample(in sampler s, in float<3> x) : tex2d_t_array;
  556. $classT [[ro]] Sample(in sampler s, in float<3> x, in int<2> o) : tex2d_t_array_o;
  557. $classT [[ro]] SampleBias(in sampler s, in float<3> x, in float bias) : tex2d_t_bias_array;
  558. $classT [[ro]] SampleBias(in sampler s, in float<3> x, in float bias, in int<2> o) : tex2d_t_bias_array_o;
  559. float_like [[ro]] SampleCmp(in sampler_cmp s, in float<3> x, in float compareValue) : tex2d_t_comp_array;
  560. float_like [[ro]] SampleCmp(in sampler_cmp s, in float<3> x, in float compareValue, in int<2> o) : tex2d_t_comp_array_o;
  561. float_like [[ro]] SampleCmpLevelZero(in sampler_cmp s, in float<3> x, in float compareValue) : tex2d_t_comp_lz_array;
  562. float_like [[ro]] SampleCmpLevelZero(in sampler_cmp s, in float<3> x, in float compareValue, in int<2> o) : tex2d_t_comp_lz_array_o;
  563. $classT [[ro]] SampleGrad(in sampler s, in float<3> x, in $match<2, 2> float<2> ddx, in $match<2, 2> float<2> ddy) : tex2d_t_dd_array;
  564. $classT [[ro]] SampleGrad(in sampler s, in float<3> x, in $match<2, 2> float<2> ddx, in $match<2, 2> float<2> ddy, in int<2> o) : tex2d_t_dd_array_o;
  565. $classT [[ro]] SampleLevel(in sampler s, in float<3> x, in float lod) : tex2d_t_lod_array;
  566. $classT [[ro]] SampleLevel(in sampler s, in float<3> x, in float lod, in int<2> o) : tex2d_t_lod_array_o;
  567. $classT [[ro]] Sample(in sampler s, in float<3> x, in int<2> o, in float clamp) : tex2d_t_array_o_cl;
  568. $classT [[]] Sample(in sampler s, in float<3> x, in int<2> o, in float clamp, out uint_only status) : tex2d_t_array_o_cl_s;
  569. float_like [[ro]] SampleCmp(in sampler_cmp s, in float<3> x, in float compareValue, in int<2> o, in float clamp) : tex2d_t_comp_array_o_cl;
  570. float_like [[]] SampleCmp(in sampler_cmp s, in float<3> x, in float compareValue, in int<2> o, in float clamp, out uint_only status) : tex2d_t_comp_array_o_cl_s;
  571. float_like [[]] SampleCmpLevelZero(in sampler_cmp s, in float<3> x, in float compareValue, in int<2> o, out uint_only status) : tex2d_t_comp_array_o_s;
  572. $classT [[]] SampleLevel(in sampler s, in float<3> x, in float lod, in int<2> o, out uint_only status) : tex2d_t_lod_array_o_s;
  573. $classT [[ro]] SampleBias(in sampler s, in float<3> x, in float bias, in int<2> o, in float clamp) : tex2d_t_bias_array_o_cl;
  574. $classT [[]] SampleBias(in sampler s, in float<3> x, in float bias, in int<2> o, in float clamp, out uint_only status) : tex2d_t_bias_array_o_cl_s;
  575. $classT [[ro]] SampleGrad(in sampler s, in float<3> x, in $match<2, 2> float<2> ddx, in $match<2, 2> float<2> ddy, in int<2> o, in float clamp) : tex2d_t_dd_array_o_cl;
  576. $classT [[]] SampleGrad(in sampler s, in float<3> x, in $match<2, 2> float<2> ddx, in $match<2, 2> float<2> ddy, in int<2> o, in float clamp, out uint_only status) : tex2d_t_dd_array_o_cl_s;
  577. $match<0, -1> void<4> [[]] Gather(in sampler s, in float<3> x, in int<2> o, out uint_only status) : tex2d_t_gather_array_o_s;
  578. $match<0, -1> void<4> [[]] GatherRed(in sampler s, in float<3> x, in int<2> o, out uint_only status) : tex2d_t_gather_red_array_o_s;
  579. $match<0, -1> void<4> [[]] GatherRed(in sampler s, in float<3> x, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4, out uint_only status) : tex2d_t_gather_red_array_o4_s;
  580. $match<0, -1> void<4> [[]] GatherGreen(in sampler s, in float<3> x, in int<2> o, out uint_only status) : tex2d_t_gather_green_array_o_s;
  581. $match<0, -1> void<4> [[]] GatherGreen(in sampler s, in float<3> x, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4, out uint_only status) : tex2d_t_gather_green_array_o4_s;
  582. $match<0, -1> void<4> [[]] GatherBlue(in sampler s, in float<3> x, in int<2> o, out uint_only status) : tex2d_t_gather_blue_array_o_s;
  583. $match<0, -1> void<4> [[]] GatherBlue(in sampler s, in float<3> x, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4, out uint_only status) : tex2d_t_gather_blue_array_o4_s;
  584. $match<0, -1> void<4> [[]] GatherAlpha(in sampler s, in float<3> x, in int<2> o, out uint_only status) : tex2d_t_gather_alpha_array_o_s;
  585. $match<0, -1> void<4> [[]] GatherAlpha(in sampler s, in float<3> x, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4, out uint_only status) : tex2d_t_gather_alpha_array_o4_s;
  586. $match<0, -1> void<4> [[]] GatherCmp(in sampler_cmp s, in float<3> x, in float compareValue, in int<2> o, out uint_only status) : tex2d_t_gather_comp_array_o_s;
  587. $match<0, -1> void<4> [[]] GatherCmpRed(in sampler_cmp s, in float<3> x, in float compareValue, in int<2> o, out uint_only status) : tex2d_t_gather_comp_red_array_o_s;
  588. $match<0, -1> void<4> [[]] GatherCmpGreen(in sampler_cmp s, in float<3> x, in float compareValue, in int<2> o, out uint_only status) : tex2d_t_gather_comp_green_array_o_s;
  589. $match<0, -1> void<4> [[]] GatherCmpBlue(in sampler_cmp s, in float<3> x, in float compareValue, in int<2> o, out uint_only status) : tex2d_t_gather_comp_blue_array_o_s;
  590. $match<0, -1> void<4> [[]] GatherCmpAlpha(in sampler_cmp s, in float<3> x, in float compareValue, in int<2> o, out uint_only status) : tex2d_t_gather_comp_alpha_array_o_s;
  591. $match<0, -1> void<4> [[]] GatherCmpRed(in sampler_cmp s, in float<3> x, in float compareValue, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4, out uint_only status) : tex2d_t_gather_comp_red_array_o4_s;
  592. $match<0, -1> void<4> [[]] GatherCmpGreen(in sampler_cmp s, in float<3> x, in float compareValue, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4, out uint_only status) : tex2d_t_gather_comp_green_array_o4_s;
  593. $match<0, -1> void<4> [[]] GatherCmpBlue(in sampler_cmp s, in float<3> x, in float compareValue, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4, out uint_only status) : tex2d_t_gather_comp_blue_array_o4_s;
  594. $match<0, -1> void<4> [[]] GatherCmpAlpha(in sampler_cmp s, in float<3> x, in float compareValue, in int<2> o1, in int<2> o2, in int<2> o3, in int<2> o4, out uint_only status) : tex2d_t_gather_comp_alpha_array_o4_s;
  595. } namespace
  596. namespace Texture2DArrayMSMethods {
  597. void [[]] GetDimensions(out uint_only width, out $type1 height, out $type1 elements, out $type1 samples) : resinfo_uint_o;
  598. void [[]] GetDimensions(out float_like width, out $type1 height, out $type1 elements, out $type1 samples) : resinfo_o;
  599. float_like<2> [[ro]] GetSamplePosition(in int s) : samplepos;
  600. $classT [[ro]] Load(in int<3> x, in int s) : texture2darray_ms;
  601. $classT [[ro]] Load(in int<3> x, in int s, in int<2> o) : texture2darray_ms_o;
  602. $classT [[]] Load(in int<3> x, in int s, in int<2> o, out uint_only status) : texture2darray_ms_o_s;
  603. } namespace
  604. namespace Texture3DMethods {
  605. float [[ro]] CalculateLevelOfDetail(in sampler s, in float<3> x) : tex3d_t_calc_lod;
  606. float [[ro]] CalculateLevelOfDetailUnclamped(in sampler s, in float<3> x) : tex3d_t_calc_lod_unclamped;
  607. void [[]] GetDimensions(in uint x, out uint_only width, out $type2 height, out $type2 depth, out $type2 levels) : resinfo_uint;
  608. void [[]] GetDimensions(in uint x, out float_like width, out $type2 height, out $type2 depth, out $type2 levels) : resinfo;
  609. void [[]] GetDimensions(out uint_only width, out $type1 height, out $type1 depth) : resinfo_uint_o;
  610. void [[]] GetDimensions(out float_like width, out $type1 height, out $type1 depth) : resinfo_o;
  611. $classT [[ro]] Load(in int<4> x) : tex3d_t_load;
  612. $classT [[ro]] Load(in int<4> x, in int<3> o) : tex3d_t_load_o;
  613. $classT [[]] Load(in int<4> x, in int<3> o, out uint_only status) : tex3d_t_load_o_s;
  614. $classT [[ro]] Sample(in sampler s, in float<3> x) : tex3d_t;
  615. $classT [[ro]] Sample(in sampler s, in float<3> x, in int<3> o) : tex3d_t_o;
  616. $classT [[ro]] SampleBias(in sampler s, in float<3> x, in float bias) : tex3d_t_bias;
  617. $classT [[ro]] SampleBias(in sampler s, in float<3> x, in float bias, in int<3> o) : tex3d_t_bias_o;
  618. $classT [[ro]] SampleGrad(in sampler s, in float<3> x, in $type2 ddx, in $type2 ddy) : tex3d_t_dd;
  619. $classT [[ro]] SampleGrad(in sampler s, in float<3> x, in $type2 ddx, in $type2 ddy, in int<3> o) : tex3d_t_dd_o;
  620. $classT [[ro]] SampleLevel(in sampler s, in float<3> x, in float lod) : tex3d_t_lod;
  621. $classT [[ro]] SampleLevel(in sampler s, in float<3> x, in float lod, in int<3> o) : tex3d_t_lod_o;
  622. $classT [[ro]] Sample(in sampler s, in float<3> x, in int<3> o, in float clamp) : tex3d_t_o_cl;
  623. $classT [[]] Sample(in sampler s, in float<3> x, in int<3> o, in float clamp, out uint_only status) : tex3d_t_o_cl_s;
  624. $classT [[]] SampleLevel(in sampler s, in float<3> x, in float lod, in int<3> o, out uint_only status) : tex3d_t_lod_o_s;
  625. $classT [[ro]] SampleBias(in sampler s, in float<3> x, in float bias, in int<3> o, in float clamp) : tex3d_t_bias_o_cl;
  626. $classT [[]] SampleBias(in sampler s, in float<3> x, in float bias, in int<3> o, in float clamp, out uint_only status) : tex3d_t_bias_o_cl_s;
  627. $classT [[ro]] SampleGrad(in sampler s, in float<3> x, in $type2 ddx, in $type2 ddy, in int<3> o, in float clamp) : tex3d_t_dd_o_cl;
  628. $classT [[]] SampleGrad(in sampler s, in float<3> x, in $type2 ddx, in $type2 ddy, in int<3> o, in float clamp, out uint_only status) : tex3d_t_dd_o_cl_s;
  629. } namespace
  630. namespace TextureCUBEMethods {
  631. float [[ro]] CalculateLevelOfDetail(in sampler s, in float<3> x) : texcube_t_calc_lod;
  632. float [[ro]] CalculateLevelOfDetailUnclamped(in sampler s, in float<3> x) : texcube_t_calc_lod_unclamped;
  633. $match<0, -1> void<4> [[ro]] Gather(in sampler s, in float<3> x) : texcube_t_gather;
  634. $match<0, -1> void<4> [[ro]] GatherAlpha(in sampler s, in float<3> x) : texcube_t_gather_alpha;
  635. $match<0, -1> void<4> [[ro]] GatherBlue(in sampler s, in float<3> x) : texcube_t_gather_blue;
  636. $match<0, -1> void<4> [[ro]] GatherCmp(in sampler_cmp s, in float<3> x, in float compareValue) : texcube_t_gather_comp;
  637. $match<0, -1> void<4> [[ro]] GatherCmpAlpha(in sampler_cmp s, in float<3> x, in float compareValue) : texcube_t_gather_comp_alpha;
  638. $match<0, -1> void<4> [[ro]] GatherCmpBlue(in sampler_cmp s, in float<3> x, in float compareValue) : texcube_t_gather_comp_blue;
  639. $match<0, -1> void<4> [[ro]] GatherCmpGreen(in sampler_cmp s, in float<3> x, in float compareValue) : texcube_t_gather_comp_green;
  640. $match<0, -1> void<4> [[ro]] GatherCmpRed(in sampler_cmp s, in float<3> x, in float compareValue) : texcube_t_gather_comp_red;
  641. $match<0, -1> void<4> [[ro]] GatherGreen(in sampler s, in float<3> x) : texcube_t_gather_green;
  642. $match<0, -1> void<4> [[ro]] GatherRed(in sampler s, in float<3> x) : texcube_t_gather_red;
  643. void [[]] GetDimensions(in uint x, out uint_only width, out $type2 height, out $type2 levels) : resinfo_uint;
  644. void [[]] GetDimensions(in uint x, out float_like width, out $type2 height, out $type2 levels) : resinfo;
  645. void [[]] GetDimensions(out uint_only width, out $type1 height) : resinfo_uint_o;
  646. void [[]] GetDimensions(out float_like width, out $type1 height) : resinfo_o;
  647. $classT [[ro]] Sample(in sampler s, in float<3> x) : texcube_t;
  648. $classT [[ro]] SampleBias(in sampler s, in float<3> x, in float bias) : texcube_t_bias;
  649. float_like [[ro]] SampleCmp(in sampler_cmp s, in float<3> x, in float c) : texcube_t_comp;
  650. float_like [[ro]] SampleCmpLevelZero(in sampler_cmp s, in float<3> x, in float c) : texcube_t_comp_lz;
  651. $classT [[ro]] SampleGrad(in sampler s, in float<3> x, in $type2 ddx, in $type2 ddy) : texcube_t_dd;
  652. $classT [[ro]] SampleLevel(in sampler s, in float<3> x, in float lod) : texcube_t_lod;
  653. $classT [[ro]] Sample(in sampler s, in float<3> x, in float clamp) : texcube_t_cl;
  654. $classT [[]] Sample(in sampler s, in float<3> x, in float clamp, out uint_only status) : texcube_t_cl_s;
  655. float_like [[ro]] SampleCmp(in sampler_cmp s, in float<3> x, in float compareValue, in float clamp) : texcube_t_comp_cl;
  656. float_like [[]] SampleCmp(in sampler_cmp s, in float<3> x, in float compareValue, in float clamp, out uint_only status) : texcube_t_comp_cl_s;
  657. float_like [[]] SampleCmpLevelZero(in sampler_cmp s, in float<3> x, in float compareValue, out uint_only status) : texcube_t_comp_s;
  658. $classT [[]] SampleLevel(in sampler s, in float<3> x, in float lod, out uint_only status) : texcube_t_lod_s;
  659. $classT [[ro]] SampleBias(in sampler s, in float<3> x, in float bias, in float clamp) : texcube_t_bias_cl;
  660. $classT [[]] SampleBias(in sampler s, in float<3> x, in float bias, in float clamp, out uint_only status) : texcube_t_bias_cl_s;
  661. $classT [[ro]] SampleGrad(in sampler s, in float<3> x, in $type2 ddx, in $type2 ddy, in float clamp) : texcube_t_dd_cl;
  662. $classT [[]] SampleGrad(in sampler s, in float<3> x, in $type2 ddx, in $type2 ddy, in float clamp, out uint_only status) : texcube_t_dd_cl_s;
  663. $match<0, -1> void<4> [[]] Gather(in sampler s, in float<3> x, out uint_only status) : texcube_t_gather_s;
  664. $match<0, -1> void<4> [[]] GatherRed(in sampler s, in float<3> x, out uint_only status) : texcube_t_gather_red_s;
  665. $match<0, -1> void<4> [[]] GatherGreen(in sampler s, in float<3> x, out uint_only status) : texcube_t_gather_green_s;
  666. $match<0, -1> void<4> [[]] GatherBlue(in sampler s, in float<3> x, out uint_only status) : texcube_t_gather_blue_s;
  667. $match<0, -1> void<4> [[]] GatherAlpha(in sampler s, in float<3> x, out uint_only status) : texcube_t_gather_alpha_s;
  668. $match<0, -1> void<4> [[]] GatherCmp(in sampler_cmp s, in float<3> x, in float compareValue, out uint_only status) : texcube_t_gather_comp_s;
  669. $match<0, -1> void<4> [[]] GatherCmpRed(in sampler_cmp s, in float<3> x, in float compareValue, out uint_only status) : texcube_t_gather_comp_red_s;
  670. $match<0, -1> void<4> [[]] GatherCmpGreen(in sampler_cmp s, in float<3> x, in float compareValue, out uint_only status) : texcube_t_gather_comp_green_s;
  671. $match<0, -1> void<4> [[]] GatherCmpBlue(in sampler_cmp s, in float<3> x, in float compareValue, out uint_only status) : texcube_t_gather_comp_blue_s;
  672. $match<0, -1> void<4> [[]] GatherCmpAlpha(in sampler_cmp s, in float<3> x, in float compareValue, out uint_only status) : texcube_t_gather_comp_alpha_s;
  673. } namespace
  674. namespace TextureCUBEArrayMethods {
  675. float [[ro]] CalculateLevelOfDetail(in sampler s, in float<3> x) : texcube_t_calc_lod_array;
  676. float [[ro]] CalculateLevelOfDetailUnclamped(in sampler s, in float<3> x) : texcube_t_calc_lod_unclamped_array;
  677. $match<0, -1> void<4> [[ro]] Gather(in sampler s, in float<4> x) : texcube_t_gather_array;
  678. $match<0, -1> void<4> [[ro]] GatherAlpha(in sampler s, in float<4> x) : texcube_t_gather_alpha_array;
  679. $match<0, -1> void<4> [[ro]] GatherBlue(in sampler s, in float<4> x) : texcube_t_gather_blue_array;
  680. $match<0, -1> void<4> [[ro]] GatherCmp(in sampler_cmp s, in float<4> x, in float compareValue) : texcube_t_gather_comp_array;
  681. $match<0, -1> void<4> [[ro]] GatherCmpAlpha(in sampler_cmp s, in float<4> x, in float compareValue) : texcube_t_gather_comp_alpha_array;
  682. $match<0, -1> void<4> [[ro]] GatherCmpBlue(in sampler_cmp s, in float<4> x, in float compareValue) : texcube_t_gather_comp_blue_array;
  683. $match<0, -1> void<4> [[ro]] GatherCmpGreen(in sampler_cmp s, in float<4> x, in float compareValue) : texcube_t_gather_comp_green_array;
  684. $match<0, -1> void<4> [[ro]] GatherCmpRed(in sampler_cmp s, in float<4> x, in float compareValue) : texcube_t_gather_comp_red_array;
  685. $match<0, -1> void<4> [[ro]] GatherGreen(in sampler s, in float<4> x) : texcube_t_gather_green_array;
  686. $match<0, -1> void<4> [[ro]] GatherRed(in sampler s, in float<4> x) : texcube_t_gather_red_array;
  687. void [[]] GetDimensions(in uint x, out uint_only width, out $type2 height, out $type2 elements, out $type2 levels) : resinfo_uint;
  688. void [[]] GetDimensions(in uint x, out float_like width, out $type2 height, out $type2 elements, out $type2 levels) : resinfo;
  689. void [[]] GetDimensions(out uint_only width, out $type1 height, out $type1 elements) : resinfo_uint_o;
  690. void [[]] GetDimensions(out float_like width, out $type1 height, out $type1 elements) : resinfo_o;
  691. $classT [[ro]] Sample(in sampler s, in float<4> x) : texcube_t_array;
  692. $classT [[ro]] SampleBias(in sampler s, in float<4> x, in float bias) : texcube_t_bias_array;
  693. float_like [[ro]] SampleCmp(in sampler_cmp s, in float<4> x, in float c) : texcube_t_comp_array;
  694. float_like [[ro]] SampleCmpLevelZero(in sampler_cmp s, in float<4> x, in float c) : texcube_t_comp_lz_array;
  695. $classT [[ro]] SampleGrad(in sampler s, in float<4> x, in $match<2, 2> float<3> ddx, in $match<2, 2> float<3> ddy) : texcube_t_dd_array;
  696. $classT [[ro]] SampleLevel(in sampler s, in float<4> x, in float lod) : texcube_t_lod_array;
  697. $classT [[ro]] Sample(in sampler s, in float<4> x, in float clamp) : texcube_t_array_cl;
  698. $classT [[]] Sample(in sampler s, in float<4> x, in float clamp, out uint_only status) : texcube_t_array_cl_s;
  699. float_like [[ro]] SampleCmp(in sampler_cmp s, in float<4> x, in float compareValue, in float clamp) : texcube_t_comp_array_cl;
  700. float_like [[]] SampleCmp(in sampler_cmp s, in float<4> x, in float compareValue, in float clamp, out uint_only status) : texcube_t_comp_array_cl_s;
  701. float_like [[]] SampleCmpLevelZero(in sampler_cmp s, in float<4> x, in float compareValue, out uint_only status) : texcube_t_comp_array_s;
  702. $classT [[]] SampleLevel(in sampler s, in float<4> x, in float lod, out uint_only status) : texcube_t_lod_array_s;
  703. $classT [[ro]] SampleBias(in sampler s, in float<4> x, in float bias, in float clamp) : texcube_t_bias_array_cl;
  704. $classT [[]] SampleBias(in sampler s, in float<4> x, in float bias, in float clamp, out uint_only status) : texcube_t_bias_array_cl_s;
  705. $classT [[ro]] SampleGrad(in sampler s, in float<4> x, in $match<2, 2> float<3> ddx, in $match<2, 2> float<3> ddy, in float clamp) : texcube_t_dd_array_cl;
  706. $classT [[]] SampleGrad(in sampler s, in float<4> x, in $match<2, 2> float<3> ddx, in $match<2, 2> float<3> ddy, in float clamp, out uint_only status) : texcube_t_dd_array_cl_s;
  707. $match<0, -1> void<4> [[]] Gather(in sampler s, in float<4> x, out uint_only status) : texcube_t_gather_array_s;
  708. $match<0, -1> void<4> [[]] GatherRed(in sampler s, in float<4> x, out uint_only status) : texcube_t_gather_red_array_s;
  709. $match<0, -1> void<4> [[]] GatherGreen(in sampler s, in float<4> x, out uint_only status) : texcube_t_gather_green_array_s;
  710. $match<0, -1> void<4> [[]] GatherBlue(in sampler s, in float<4> x, out uint_only status) : texcube_t_gather_blue_array_s;
  711. $match<0, -1> void<4> [[]] GatherAlpha(in sampler s, in float<4> x, out uint_only status) : texcube_t_gather_alpha_array_s;
  712. $match<0, -1> void<4> [[]] GatherCmp(in sampler_cmp s, in float<4> x, in float compareValue, out uint_only status) : texcube_t_gather_comp_array_s;
  713. $match<0, -1> void<4> [[]] GatherCmpRed(in sampler_cmp s, in float<4> x, in float compareValue, out uint_only status) : texcube_t_gather_comp_red_array_s;
  714. $match<0, -1> void<4> [[]] GatherCmpGreen(in sampler_cmp s, in float<4> x, in float compareValue, out uint_only status) : texcube_t_gather_comp_green_array_s;
  715. $match<0, -1> void<4> [[]] GatherCmpBlue(in sampler_cmp s, in float<4> x, in float compareValue, out uint_only status) : texcube_t_gather_comp_blue_array_s;
  716. $match<0, -1> void<4> [[]] GatherCmpAlpha(in sampler_cmp s, in float<4> x, in float compareValue, out uint_only status) : texcube_t_gather_comp_alpha_array_s;
  717. } namespace
  718. namespace BufferMethods {
  719. void [[]] GetDimensions(out uint_only width) : bufinfo;
  720. $classT [[ro]] Load(in int<1> x) : buffer_load;
  721. $classT [[]] Load(in int<1> x, out uint_only status) : buffer_load_s;
  722. } namespace
  723. namespace RWTexture1DMethods {
  724. void [[]] GetDimensions(out uint_only width) : resinfo_o;
  725. void [[]] GetDimensions(out float_like width) : resinfo_o;
  726. $classT [[ro]] Load(in int<1> x) : rwtex1d_load;
  727. $classT [[]] Load(in int<1> x, out uint_only status) : rwtex1d_load_s;
  728. } namespace
  729. namespace RWTexture1DArrayMethods {
  730. void [[]] GetDimensions(out uint_only width, out $type1 elements) : resinfo_uint_o;
  731. void [[]] GetDimensions(out float_like width, out $type1 elements) : resinfo_o;
  732. $classT [[ro]] Load(in int<2> x) : rwtex1d_load_array;
  733. $classT [[]] Load(in int<2> x, out uint_only status) : rwtex1d_load_array_s;
  734. } namespace
  735. namespace RWTexture2DMethods {
  736. void [[]] GetDimensions(out uint_only width, out $type1 height) : resinfo_uint_o;
  737. void [[]] GetDimensions(out float_like width, out $type1 height) : resinfo_o;
  738. $classT [[ro]] Load(in int<2> x) : rwtex2d_load;
  739. $classT [[]] Load(in int<2> x, out uint_only status) : rwtex2d_load_s;
  740. } namespace
  741. namespace RWTexture2DArrayMethods {
  742. void [[]] GetDimensions(out uint_only width, out $type1 height, out $type1 elements) : resinfo_uint_o;
  743. void [[]] GetDimensions(out float_like width, out $type1 height, out $type1 elements) : resinfo_o;
  744. $classT [[ro]] Load(in int<3> x) : rwtex2d_load_array;
  745. $classT [[]] Load(in int<3> x, out uint_only status) : rwtex2d_load_array_s;
  746. } namespace
  747. namespace RWTexture3DMethods {
  748. void [[]] GetDimensions(out uint_only width, out $type1 height, out $type1 depth) : resinfo_uint_o;
  749. void [[]] GetDimensions(out float_like width, out $type1 height, out $type1 depth) : resinfo_o;
  750. $classT [[ro]] Load(in int<3> x) : rwtex3d_load;
  751. $classT [[]] Load(in int<3> x, out uint_only status) : rwtex3d_load_s;
  752. } namespace
  753. namespace RWBufferMethods {
  754. void [[]] GetDimensions(out uint_only width) : bufinfo;
  755. $classT [[ro]] Load(in int x) : rwbuffer_load;
  756. $classT [[]] Load(in int x, out uint_only status) : rwbuffer_load_s;
  757. } namespace
  758. namespace ByteAddressBufferMethods {
  759. void [[]] GetDimensions(out uint_only width) : bufinfo;
  760. $funcT [[ro]] Load(in uint byteOffset) : byteaddress_load;
  761. uint<2> [[ro]] Load2(in uint byteOffset) : byteaddress_load;
  762. uint<3> [[ro]] Load3(in uint byteOffset) : byteaddress_load;
  763. uint<4> [[ro]] Load4(in uint byteOffset) : byteaddress_load;
  764. $funcT [[]] Load(in uint byteOffset, out uint_only status) : byteaddress_load_s;
  765. uint<2> [[]] Load2(in uint byteOffset, out uint_only status) : byteaddress_load_s;
  766. uint<3> [[]] Load3(in uint byteOffset, out uint_only status) : byteaddress_load_s;
  767. uint<4> [[]] Load4(in uint byteOffset, out uint_only status) : byteaddress_load_s;
  768. } namespace
  769. namespace RWByteAddressBufferMethods {
  770. void [[]] GetDimensions(out uint_only width) : bufinfo;
  771. $funcT [[ro]] Load(in uint byteOffset) : byteaddress_load;
  772. uint<2> [[ro]] Load2(in uint byteOffset) : byteaddress_load;
  773. uint<3> [[ro]] Load3(in uint byteOffset) : byteaddress_load;
  774. uint<4> [[ro]] Load4(in uint byteOffset) : byteaddress_load;
  775. $funcT [[]] Load(in uint byteOffset, out uint_only status) : byteaddress_load_s;
  776. uint<2> [[]] Load2(in uint byteOffset, out uint_only status) : byteaddress_load_s;
  777. uint<3> [[]] Load3(in uint byteOffset, out uint_only status) : byteaddress_load_s;
  778. uint<4> [[]] Load4(in uint byteOffset, out uint_only status) : byteaddress_load_s;
  779. void [[]] Store(in uint byteOffset, in $funcT value) : byteaddress_store;
  780. void [[]] Store2(in uint byteOffset, in uint<2> value) : byteaddress_store;
  781. void [[]] Store3(in uint byteOffset, in uint<3> value) : byteaddress_store;
  782. void [[]] Store4(in uint byteOffset, in uint<4> value) : byteaddress_store;
  783. // 64-bit integer interlocks
  784. void [[]] InterlockedAdd64(in uint byteOffset, in u64 value);
  785. void [[]] InterlockedAdd64(in uint byteOffset, in u64 value, out any_int64 original) : interlockedadd_immediate;
  786. void [[unsigned_op=InterlockedUMin,overload=1]] InterlockedMin64(in uint byteOffset, in any_int64 value) : interlockedmin;
  787. void [[unsigned_op=InterlockedUMin,overload=1]] InterlockedMin64(in uint byteOffset, in any_int64 value, out any_int64 original) : interlockedmin_immediate;
  788. void [[unsigned_op=InterlockedUMax,overload=1]] InterlockedMax64(in uint byteOffset, in any_int64 value) : interlockedmax;
  789. void [[unsigned_op=InterlockedUMax,overload=1]] InterlockedMax64(in uint byteOffset, in any_int64 value, out any_int64 original) : interlockedmax_immediate;
  790. void [[]] InterlockedAnd64(in uint byteOffset, in u64 value);
  791. void [[]] InterlockedAnd64(in uint byteOffset, in u64 value, out any_int64 original) : interlockedand_immediate;
  792. void [[]] InterlockedOr64(in uint byteOffset, in u64 value);
  793. void [[]] InterlockedOr64(in uint byteOffset, in u64 value, out any_int64 original) : interlockedor_immediate;
  794. void [[]] InterlockedXor64(in uint byteOffset, in u64 value);
  795. void [[]] InterlockedXor64(in uint byteOffset, in u64 value, out any_int64 original) : interlockedxor_immediate;
  796. void [[]] InterlockedCompareStore64(in uint byteOffset, in u64 compare, in u64 value);
  797. void [[]] InterlockedExchange64(in uint byteOffset, in any_int64 value, out any_int64 original);
  798. void [[]] InterlockedCompareExchange64(in uint byteOffset, in u64 compare, in u64 value, out any_int64 original);
  799. // floating point interlocks
  800. void [[]] InterlockedExchangeFloat(in uint byteOffest, in float value, out float original);
  801. void [[]] InterlockedCompareStoreFloatBitwise(in uint byteOffest, in float compare, in float value);
  802. void [[]] InterlockedCompareExchangeFloatBitwise(in uint byteOffest, in float compare, in float value, out float original);
  803. // 32-bit integer interlocks
  804. void [[]] InterlockedAdd(in uint byteOffset, in uint value);
  805. void [[]] InterlockedAdd(in uint byteOffset, in uint value, out uint original) : interlockedadd_immediate;
  806. void [[unsigned_op=InterlockedUMin,overload=1]] InterlockedMin(in uint byteOffset, in any_int32 value) : interlockedmin;
  807. void [[unsigned_op=InterlockedUMin,overload=1]] InterlockedMin(in uint byteOffset, in any_int32 value, out uint original) : interlockedmin_immediate;
  808. void [[unsigned_op=InterlockedUMax,overload=1]] InterlockedMax(in uint byteOffset, in any_int32 value) : interlockedmax;
  809. void [[unsigned_op=InterlockedUMax,overload=1]] InterlockedMax(in uint byteOffset, in any_int32 value, out uint original) : interlockedmax_immediate;
  810. void [[]] InterlockedAnd(in uint byteOffset, in uint value);
  811. void [[]] InterlockedAnd(in uint byteOffset, in uint value, out uint original) : interlockedand_immediate;
  812. void [[]] InterlockedOr(in uint byteOffset, in uint value);
  813. void [[]] InterlockedOr(in uint byteOffset, in uint value, out uint original) : interlockedor_immediate;
  814. void [[]] InterlockedXor(in uint byteOffset, in uint value);
  815. void [[]] InterlockedXor(in uint byteOffset, in uint value, out uint original) : interlockedxor_immediate;
  816. void [[]] InterlockedCompareStore(in uint byteOffset, in uint compare, in uint value);
  817. void [[]] InterlockedExchange(in uint byteOffset, in uint value, out uint original);
  818. void [[]] InterlockedCompareExchange(in uint byteOffset, in uint compare, in uint value, out uint original);
  819. } namespace
  820. namespace StructuredBufferMethods {
  821. void [[]] GetDimensions(out uint_only count, out uint_only stride) : bufinfo;
  822. $classT [[ro]] Load(in int x) : structured_buffer_load;
  823. $classT [[]] Load(in int x, out uint_only status) : structured_buffer_load_s;
  824. } namespace
  825. namespace RWStructuredBufferMethods {
  826. void [[]] GetDimensions(out uint_only count, out uint_only stride) : bufinfo;
  827. uint [[]] IncrementCounter() : structuredbuffer_inc;
  828. uint [[]] DecrementCounter() : structuredbuffer_dec;
  829. $classT [[ro]] Load(in int x) : rwstructured_buffer_load;
  830. $classT [[]] Load(in int x, out uint_only status) : rwstructured_buffer_load_s;
  831. } namespace
  832. namespace AppendStructuredBufferMethods {
  833. void [[]] GetDimensions(out uint_only count, out uint_only stride) : bufinfo;
  834. void [[]] Append(in $match<-1,0> void value ) : structuredbuffer_append;
  835. } namespace
  836. namespace ConsumeStructuredBufferMethods {
  837. void [[]] GetDimensions(out uint_only count, out uint_only stride) : bufinfo;
  838. $classT [[]] Consume() : structuredbuffer_consume;
  839. } namespace
  840. namespace FeedbackTexture2DMethods {
  841. void [[]] WriteSamplerFeedback(in Texture2D t, in sampler s, in float<2> x);
  842. void [[]] WriteSamplerFeedback(in Texture2D t, in sampler s, in float<2> x, in float clamp);
  843. void [[]] WriteSamplerFeedbackBias(in Texture2D t, in sampler s, in float<2> x, in float bias);
  844. void [[]] WriteSamplerFeedbackBias(in Texture2D t, in sampler s, in float<2> x, in float bias, in float clamp);
  845. void [[]] WriteSamplerFeedbackGrad(in Texture2D t, in sampler s, in float<2> x, in float<2> ddx, in float<2> ddy);
  846. void [[]] WriteSamplerFeedbackGrad(in Texture2D t, in sampler s, in float<2> x, in float<2> ddx, in float<2> ddy, in float clamp);
  847. void [[]] WriteSamplerFeedbackLevel(in Texture2D t, in sampler s, in float<2> x, in float lod);
  848. } namespace
  849. namespace FeedbackTexture2DArrayMethods {
  850. void [[]] WriteSamplerFeedback(in Texture2DArray t, in sampler s, in float<3> x);
  851. void [[]] WriteSamplerFeedback(in Texture2DArray t, in sampler s, in float<3> x, in float clamp);
  852. void [[]] WriteSamplerFeedbackBias(in Texture2DArray t, in sampler s, in float<3> x, in float bias);
  853. void [[]] WriteSamplerFeedbackBias(in Texture2DArray t, in sampler s, in float<3> x, in float bias, in float clamp);
  854. void [[]] WriteSamplerFeedbackGrad(in Texture2DArray t, in sampler s, in float<3> x, in float<2> ddx, in float<2> ddy);
  855. void [[]] WriteSamplerFeedbackGrad(in Texture2DArray t, in sampler s, in float<3> x, in float<2> ddx, in float<2> ddy, in float clamp);
  856. void [[]] WriteSamplerFeedbackLevel(in Texture2DArray t, in sampler s, in float<3> x, in float lod);
  857. } namespace
  858. namespace RayQueryMethods {
  859. void [[]] TraceRayInline(in acceleration_struct AccelerationStructure, in uint RayFlags, in uint InstanceInclusionMask, in ray_desc Ray);
  860. bool [[]] Proceed();
  861. void [[]] Abort();
  862. void [[]] CommitNonOpaqueTriangleHit();
  863. void [[]] CommitProceduralPrimitiveHit(in float t);
  864. uint [[ro]] CommittedStatus();
  865. uint [[ro]] CandidateType();
  866. float<3,4> [[ro]] CandidateObjectToWorld3x4();
  867. float<4,3> [[ro]] CandidateObjectToWorld4x3();
  868. float<3,4> [[ro]] CandidateWorldToObject3x4();
  869. float<4,3> [[ro]] CandidateWorldToObject4x3();
  870. float<3,4> [[ro]] CommittedObjectToWorld3x4();
  871. float<4,3> [[ro]] CommittedObjectToWorld4x3();
  872. float<3,4> [[ro]] CommittedWorldToObject3x4();
  873. float<4,3> [[ro]] CommittedWorldToObject4x3();
  874. bool [[ro]] CandidateProceduralPrimitiveNonOpaque();
  875. bool [[ro]] CandidateTriangleFrontFace();
  876. bool [[ro]] CommittedTriangleFrontFace();
  877. float<2> [[ro]] CandidateTriangleBarycentrics();
  878. float<2> [[ro]] CommittedTriangleBarycentrics();
  879. uint [[ro]] RayFlags();
  880. float<3> [[ro]] WorldRayOrigin();
  881. float<3> [[ro]] WorldRayDirection();
  882. float [[ro]] RayTMin();
  883. float [[ro]] CandidateTriangleRayT();
  884. float [[ro]] CommittedRayT();
  885. uint [[ro]] CandidateInstanceIndex();
  886. uint [[ro]] CandidateInstanceID();
  887. uint [[ro]] CandidateGeometryIndex();
  888. uint [[ro]] CandidatePrimitiveIndex();
  889. float<3> [[ro]] CandidateObjectRayOrigin();
  890. float<3> [[ro]] CandidateObjectRayDirection();
  891. uint [[ro]] CommittedInstanceIndex();
  892. uint [[ro]] CommittedInstanceID();
  893. uint [[ro]] CommittedGeometryIndex();
  894. uint [[ro]] CommittedPrimitiveIndex();
  895. float<3> [[ro]] CommittedObjectRayOrigin();
  896. float<3> [[ro]] CommittedObjectRayDirection();
  897. uint [[ro]] CandidateInstanceContributionToHitGroupIndex();
  898. uint [[ro]] CommittedInstanceContributionToHitGroupIndex();
  899. } namespace
  900. // SPIRV Change Starts
  901. namespace VkSubpassInputMethods {
  902. $classT [[]] SubpassLoad() : subpassinput_load;
  903. } namespace
  904. namespace VkSubpassInputMSMethods {
  905. $classT [[]] SubpassLoad(in int sample) : subpassinputms_load;
  906. } namespace
  907. // SPIRV Change Ends