/sources/shaders/Stride.Core.Shaders/Analysis/Hlsl/HlslDeclarations.h

https://github.com/xenko3d/xenko · C Header · 670 lines · 501 code · 94 blank · 75 comment · 0 complexity · 24bf40fd23f4bafa6515db4580c56f83 MD5 · raw file

  1. // ---------------------------------------------------------------------------------------
  2. // Shader Model 4.0 / 4.1
  3. // ---------------------------------------------------------------------------------------
  4. // CalculateLevelOfDetail (DirectX HLSL Texture Object)
  5. // http://msdn.microsoft.com/en-us/library/windows/desktop/bb944001%28v=vs.85%29.aspx
  6. // Gather (DirectX HLSL Texture Object)
  7. // http://msdn.microsoft.com/en-us/library/windows/desktop/bb944003%28v=VS.85%29.aspx
  8. // GetDimensions (DirectX HLSL Texture Object)
  9. // http://msdn.microsoft.com/en-us/library/bb509693%28v=VS.85%29.aspx
  10. // GetSamplePosition (DirectX HLSL Texture Object)
  11. // http://msdn.microsoft.com/en-us/library/bb944004%28v=VS.85%29.aspx
  12. // Load (DirectX HLSL Texture Object)
  13. // http://msdn.microsoft.com/en-us/library/bb509694%28v=VS.85%29.aspx
  14. // Sample (DirectX HLSL Texture Object)
  15. // http://msdn.microsoft.com/en-us/library/bb509695%28v=VS.85%29.aspx
  16. // SampleBias (DirectX HLSL Texture Object)
  17. // http://msdn.microsoft.com/en-us/library/bb944005%28v=VS.85%29.aspx
  18. // SampleCmp (DirectX HLSL Texture Object)
  19. // http://msdn.microsoft.com/en-us/library/bb509696%28v=VS.85%29.aspx
  20. // SampleGrad (DirectX HLSL Texture Object)
  21. // http://msdn.microsoft.com/en-us/library/bb509698%28v=VS.85%29.aspx
  22. // SampleLevel (DirectX HLSL Texture Object)
  23. // http://msdn.microsoft.com/en-us/library/bb509699%28v=VS.85%29.aspx
  24. void GroupMemoryBarrierWithGroupSync();
  25. class __Texture1D<T> {
  26. // SM 4.0
  27. float CalculateLevelOfDetail( sampler_state s, float1 x);
  28. void GetDimensions( uint MipLevel, out uint Width, out uint NumberOfLevels);
  29. void GetDimensions( out uint Width);
  30. void GetDimensions( uint MipLevel, out float Width, out float NumberOfLevels);
  31. void GetDimensions( out float Width);
  32. T Load(int2 Location);
  33. T Load(int2 Location, int Offset);
  34. float4 Sample(sampler_state S, float Location);
  35. float4 Sample(sampler_state S, float Location, int Offset);
  36. float4 SampleBias(sampler_state S, float Location, float Bias);
  37. float4 SampleBias(sampler_state S, float Location, float Bias, int Offset);
  38. float SampleCmp(sampler_state S, float Location, float CompareValue);
  39. float SampleCmp(sampler_state S, float Location, float CompareValue, int Offset);
  40. float SampleCmpLevelZero(sampler_state S, float Location, float CompareValue);
  41. float SampleCmpLevelZero(sampler_state S, float Location, float CompareValue, int Offset);
  42. float4 SampleGrad(sampler_state S, float Location, float DDX, float DDY);
  43. float4 SampleGrad(sampler_state S, float Location, float DDX, float DDY, int Offset);
  44. float4 SampleLevel( sampler_state S, float Location, float LOD);
  45. float4 SampleLevel( sampler_state S, float Location, float LOD, int Offset);
  46. // SM 5.0
  47. T mips.operator[][](in uint mipSlice,in uint pos);
  48. T operator[](in uint pos);
  49. };
  50. class __Texture1DArray<T> {
  51. // SM 4.0
  52. float CalculateLevelOfDetail( sampler_state s, float1 x);
  53. void GetDimensions( uint MipLevel, out uint Width, out uint Elements, out uint NumberOfLevels);
  54. void GetDimensions( out uint Width, out uint Elements);
  55. void GetDimensions( uint MipLevel, out float Width, out float Elements, out float NumberOfLevels);
  56. void GetDimensions( out float Width, out float Elements);
  57. T Load(int3 Location);
  58. T Load(int3 Location, int Offset);
  59. float4 Sample(sampler_state S, float2 Location);
  60. float4 Sample(sampler_state S, float2 Location, int Offset);
  61. float4 SampleBias(sampler_state S, float2 Location, float Bias);
  62. float4 SampleBias(sampler_state S, float2 Location, float Bias, int Offset);
  63. float SampleCmp(sampler_state S, float2 Location, float CompareValue);
  64. float SampleCmp(sampler_state S, float2 Location, float CompareValue, int Offset);
  65. float SampleCmpLevelZero(sampler_state S, float2 Location, float CompareValue);
  66. float SampleCmpLevelZero(sampler_state S, float2 Location, float CompareValue, int Offset);
  67. float4 SampleGrad(sampler_state S, float2 Location, float DDX, float DDY);
  68. float4 SampleGrad(sampler_state S, float2 Location, float DDX, float DDY, int Offset);
  69. float4 SampleLevel( sampler_state S, float2 Location, float LOD);
  70. float4 SampleLevel( sampler_state S, float2 Location, float LOD, int Offset);
  71. // SM 5.0
  72. T mips.operator[][](in uint mipSlice,in uint2 pos);
  73. T operator[](in uint2 pos);
  74. };
  75. class __Texture2D<T> {
  76. // SM 4.0
  77. float CalculateLevelOfDetail( sampler_state s, float2 x);
  78. vector<__T_base,4> Gather( sampler_state S, float2 Location);
  79. vector<__T_base,4> Gather( sampler_state S, float2 Location, int2 Offset );
  80. void GetDimensions( uint MipLevel, out uint Width, out uint Height, out uint NumberOfLevels);
  81. void GetDimensions( out uint Width, out uint Height);
  82. void GetDimensions( uint MipLevel, out float Width, out float Height, out float NumberOfLevels);
  83. void GetDimensions( out float Width, out float Height);
  84. T Load(int3 Location);
  85. T Load(int3 Location, int2 Offset);
  86. float4 Sample(sampler_state S, float2 Location);
  87. float4 Sample(sampler_state S, float2 Location, int2 Offset);
  88. float4 SampleBias(sampler_state S, float2 Location, float Bias);
  89. float4 SampleBias(sampler_state S, float2 Location, float Bias, int2 Offset);
  90. float SampleCmp(sampler_state S, float2 Location, float CompareValue);
  91. float SampleCmp(sampler_state S, float2 Location, float CompareValue, int2 Offset);
  92. float SampleCmpLevelZero(sampler_state S, float2 Location, float CompareValue);
  93. float SampleCmpLevelZero(sampler_state S, float2 Location, float CompareValue, int2 Offset);
  94. float4 SampleGrad(sampler_state S, float2 Location, float2 DDX, float2 DDY);
  95. float4 SampleGrad(sampler_state S, float2 Location, float2 DDX, float2 DDY, int2 Offset);
  96. float4 SampleLevel( sampler_state S, float2 Location, float LOD);
  97. float4 SampleLevel( sampler_state S, float2 Location, float LOD, int2 Offset);
  98. // SM 5.0
  99. T Gather(
  100. in sampler s,
  101. in float2 location,
  102. in int2 offset
  103. );
  104. T GatherRed(
  105. in sampler s,
  106. in float2 location
  107. );
  108. T GatherGreen(
  109. in sampler s,
  110. in float2 location
  111. );
  112. T GatherBlue(
  113. in sampler s,
  114. in float2 location
  115. );
  116. T GatherRed(
  117. in sampler s,
  118. in float2 location,
  119. in int2 offset
  120. );
  121. T GatherGreen(
  122. in sampler s,
  123. in float2 location,
  124. in int2 offset
  125. );
  126. T GatherBlue(
  127. in sampler s,
  128. in float2 location,
  129. in int2 offset
  130. );
  131. T GatherAlpha(
  132. in sampler s,
  133. in float2 location,
  134. in int2 offset
  135. );
  136. T GatherRed(
  137. in sampler s,
  138. in float2 location,
  139. in int2 offset1,
  140. in int2 offset2,
  141. in int2 offset3,
  142. in int2 offset4
  143. );
  144. T GatherGreen(
  145. in sampler s,
  146. in float2 location,
  147. in int2 offset1,
  148. in int2 offset2,
  149. in int2 offset3,
  150. in int2 offset4
  151. );
  152. T GatherBlue(
  153. in sampler s,
  154. in float2 location,
  155. in int2 offset1,
  156. in int2 offset2,
  157. in int2 offset3,
  158. in int2 offset4
  159. );
  160. T GatherAlpha(
  161. in sampler s,
  162. in float2 location,
  163. in int2 offset1,
  164. in int2 offset2,
  165. in int2 offset3,
  166. in int2 offset4
  167. );
  168. float4 GatherCmp(
  169. in SamplerComparisonState s,
  170. in float2 location,
  171. in float compare_value,
  172. in int2 offset
  173. );
  174. float4 GatherCmpRed(
  175. in SamplerComparisonState s,
  176. in float2 location,
  177. in float compare_value,
  178. in int2 offset
  179. );
  180. float4 GatherCmpGreen(
  181. in SamplerComparisonState s,
  182. in float2 location,
  183. in float compare_value,
  184. in int2 offset
  185. );
  186. float4 GatherCmpBlue(
  187. in SamplerComparisonState s,
  188. in float2 location,
  189. in float compare_value,
  190. in int2 offset
  191. );
  192. float4 GatherCmpAlpha(
  193. in SamplerComparisonState s,
  194. in float2 location,
  195. in float compare_value,
  196. in int2 offset
  197. );
  198. T mips.operator[][](in uint mipSlice, in uint2 pos);
  199. T operator[](in uint2 pos);
  200. };
  201. class __Texture2DArray<T> {
  202. // SM 4.0
  203. float CalculateLevelOfDetail( sampler_state s, float2 x);
  204. vector<__T_base,4> Gather( sampler_state S, float3 Location, int2 Offset );
  205. void GetDimensions( uint MipLevel, out uint Width, out uint Height, out uint Elements, out uint NumberOfLevels);
  206. void GetDimensions( out uint Width, out uint Height, out uint Elements);
  207. void GetDimensions( uint MipLevel, out float Width, out float Height, out float Elements, out float NumberOfLevels);
  208. void GetDimensions( out float Width, out float Height, out float Elements);
  209. T Load(int4 Location);
  210. T Load(int4 Location, int2 Offset);
  211. T Load(int4 Location, int3 Offset);
  212. float4 Sample(sampler_state S, float3 Location);
  213. float4 Sample(sampler_state S, float3 Location, int2 Offset);
  214. float4 SampleBias(sampler_state S, float3 Location, float Bias);
  215. float4 SampleBias(sampler_state S, float3 Location, float Bias, int2 Offset);
  216. float SampleCmp(sampler_state S, float3 Location, float CompareValue);
  217. float SampleCmp(sampler_state S, float3 Location, float CompareValue, int2 Offset);
  218. float SampleCmpLevelZero(sampler_state S, float3 Location, float CompareValue);
  219. float SampleCmpLevelZero(sampler_state S, float3 Location, float CompareValue, int2 Offset);
  220. float4 SampleGrad(sampler_state S, float3 Location, float2 DDX, float2 DDY);
  221. float4 SampleGrad(sampler_state S, float3 Location, float2 DDX, float2 DDY, int2 Offset);
  222. float4 SampleLevel( sampler_state S, float3 Location, float LOD);
  223. float4 SampleLevel( sampler_state S, float3 Location, float LOD, int2 Offset);
  224. // SM 5.0
  225. T Gather(
  226. in sampler s,
  227. in float3 location,
  228. in int2 offset
  229. );
  230. T GatherRed(
  231. in sampler s,
  232. in float3 location,
  233. in int2 offset
  234. );
  235. T GatherGreen(
  236. in sampler s,
  237. in float3 location,
  238. in int2 offset
  239. );
  240. T GatherBlue(
  241. in sampler s,
  242. in float3 location,
  243. in int2 offset
  244. );
  245. T GatherAlpha(
  246. in sampler s,
  247. in float3 location,
  248. in int2 offset
  249. );
  250. float4 GatherCmp(
  251. in SamplerComparisonState s,
  252. in float3 location,
  253. in float compare_value,
  254. in int2 offset
  255. );
  256. float4 GatherCmpRed(
  257. in SamplerComparisonState s,
  258. in float3 location,
  259. in float compare_value,
  260. in int2 offset
  261. );
  262. float4 GatherCmpGreen(
  263. in SamplerComparisonState s,
  264. in float3 location,
  265. in float compare_value,
  266. in int2 offset
  267. );
  268. float4 GatherCmpBlue(
  269. in SamplerComparisonState s,
  270. in float3 location,
  271. in float compare_value,
  272. in int2 offset
  273. );
  274. float4 GatherCmpAlpha(
  275. in SamplerComparisonState s,
  276. in float3 location,
  277. in float compare_value,
  278. in int2 offset
  279. );
  280. T mips.operator[][](in uint mipSlice, in uint3 pos);
  281. T operator[](in uint3 pos);
  282. };
  283. class __Texture3D<T> {
  284. // SM 4.0
  285. float CalculateLevelOfDetail( sampler_state s, float3 x);
  286. void GetDimensions( uint MipLevel, out uint Width, out uint Height, out uint Depth, out uint NumberOfLevels);
  287. void GetDimensions( out uint Width, out uint Height, out uint Depth);
  288. void GetDimensions( uint MipLevel, out float Width, out float Height, out float Depth, out float NumberOfLevels);
  289. void GetDimensions( out float Width, out float Height, out float Depth);
  290. T Load(int4 Location);
  291. T Load(int4 Location, int3 Offset);
  292. float4 Sample(sampler_state S, float3 Location);
  293. float4 Sample(sampler_state S, float3 Location, int3 Offset);
  294. float4 SampleBias(sampler_state S, float3 Location, float Bias);
  295. float4 SampleBias(sampler_state S, float3 Location, float Bias, int3 Offset);
  296. float SampleCmp(sampler_state S, float3 Location, float CompareValue);
  297. float SampleCmp(sampler_state S, float3 Location, float CompareValue, int3 Offset);
  298. float4 SampleGrad(sampler_state S, float3 Location, float3 DDX, float3 DDY);
  299. float4 SampleGrad(sampler_state S, float3 Location, float3 DDX, float3 DDY, int3 Offset);
  300. float4 SampleLevel( sampler_state S, float3 Location, float LOD);
  301. float4 SampleLevel( sampler_state S, float3 Location, float LOD, int3 Offset);
  302. // SM 5.0
  303. T mips.operator[][](in uint mipSlice,in uint3 pos);
  304. T operator[](in uint3 pos);
  305. };
  306. class __TextureCube<T> {
  307. // SM 4.0
  308. float CalculateLevelOfDetail( sampler_state s, float3 x);
  309. vector<__T_base,4> Gather( sampler_state S, float3 Location);
  310. void GetDimensions( uint MipLevel, out uint Width, out uint Height, out uint NumberOfLevels);
  311. void GetDimensions( out uint Width, out uint Height);
  312. void GetDimensions( uint MipLevel, out float Width, out float Height, out uint NumberOfLevels);
  313. void GetDimensions( out float Width, out float Height);
  314. float4 Sample(sampler_state S, float3 Location);
  315. float4 SampleBias(sampler_state S, float3 Location, float Bias);
  316. float SampleCmp(sampler_state S, float3 Location, float CompareValue);
  317. float SampleCmpLevelZero(sampler_state S, float3 Location, float CompareValue);
  318. float4 SampleGrad(sampler_state S, float3 Location, float3 DDX, float3 DDY);
  319. float4 SampleLevel( sampler_state S, float3 Location, float LOD);
  320. };
  321. class __TextureCubeArray<T> {
  322. // SM 4.0
  323. float CalculateLevelOfDetail( sampler_state s, float3 x);
  324. vector<__T_base,4> Gather( sampler_state S, float4 Location);
  325. void GetDimensions( uint MipLevel, out uint Width, out uint Height, out uint Elements, out uint NumberOfLevels);
  326. void GetDimensions( out uint Width, out uint Height, out uint Elements);
  327. void GetDimensions( uint MipLevel, out float Width, out float Height, out float Elements, out float NumberOfLevels);
  328. void GetDimensions( out float Width, out float Height, out float Elements);
  329. float4 Sample(sampler_state S, float4 Location);
  330. float4 SampleBias(sampler_state S, float4 Location, float Bias);
  331. float SampleCmp(sampler_state S, float4 Location, float CompareValue);
  332. float SampleCmpLevelZero(sampler_state S, float4 Location, float CompareValue);
  333. float4 SampleGrad(sampler_state S, float4 Location, float3 DDX, float3 DDY);
  334. float4 SampleLevel( sampler_state S, float4 Location, float LOD);
  335. };
  336. class __Texture2DMS<T> {
  337. // SM 4.0
  338. void GetDimensions( out uint Width, out uint Height, out uint Samples);
  339. void GetDimensions( out float Width, out float Height, out float Samples);
  340. float2 GetSamplePosition(int s);
  341. T Load(int2 Location);
  342. T Load(int2 Location, int2 Offset);
  343. T Load(int2 Location, int2 Offset, int SampleIndex);
  344. // SM 5.0
  345. float2 GetSamplePosition(
  346. in int sampleindex
  347. );
  348. T Load(
  349. in int2 coord,
  350. in int sampleindex
  351. );
  352. T sample.operator[][]( in uint sampleSlice, in uint3 pos);
  353. };
  354. class __Texture2DMSArray<T> {
  355. // SM 4.0
  356. void GetDimensions( out uint Width, out uint Height, out uint Elements, out uint Samples);
  357. void GetDimensions( out float Width, out float Height, out float Elements, out float Samples);
  358. float2 GetSamplePosition(int s);
  359. T Load(int3 Location);
  360. T Load(int3 Location, int2 Offset);
  361. T Load(int3 Location, int2 Offset, int SampleIndex);
  362. // SM 5.0
  363. float2 GetSamplePosition(
  364. in int sampleindex
  365. );
  366. T Load(
  367. in int3 coord,
  368. in int sampleindex
  369. );
  370. T sample.operator[][]( in uint sampleSlice, in uint3 pos);
  371. };
  372. class __Buffer<T> {
  373. // SM 4.0
  374. T Load(int Location);
  375. void GetDimensions(out uint dim);
  376. T operator[](in uint pos);
  377. };
  378. // Stream-Output Object (DirectX HLSL)
  379. // http://msdn.microsoft.com/en-us/library/bb509661%28v=VS.85%29.aspx
  380. // StreamOutputObject <T> Name
  381. // StreamOutputObject: PointStream, LineStream, TriangleStream
  382. class __PointStream<T> {
  383. void Append(T StreamDataType);
  384. void RestartStrip();
  385. };
  386. class __LineStream<T> {
  387. void Append(T StreamDataType);
  388. void RestartStrip();
  389. };
  390. class __TriangleStream<T> {
  391. void Append(T StreamDataType);
  392. void RestartStrip();
  393. };
  394. // ---------------------------------------------------------------------------------------
  395. // Shader Model 5.0
  396. // ---------------------------------------------------------------------------------------
  397. // AppendStructuredBuffer<T>
  398. // http://msdn.microsoft.com/en-us/library/ff471448%28v=VS.85%29.aspx
  399. class __AppendStructuredBuffer<T> {
  400. void Append(T value);
  401. void GetDimensions(out uint numStructs, out uint stride);
  402. };
  403. // ByteAddressBuffer
  404. // http://msdn.microsoft.com/en-us/library/ff471453%28v=VS.85%29.aspx
  405. class __ByteAddressBuffer {
  406. void GetDimensions(out uint dim);
  407. uint Load(in uint address);
  408. uint2 Load2(in uint address);
  409. uint3 Load3(in uint address);
  410. uint4 Load4(in uint address);
  411. };
  412. // ConsumeStructuredBuffer<T>
  413. // http://msdn.microsoft.com/en-us/library/ff471459%28v=VS.85%29.aspx
  414. class __ConsumeStructuredBuffer<T> {
  415. T Consume(void);
  416. void GetDimensions(out uint numStructs, out uint stride);
  417. };
  418. // InputPatch<T,N>
  419. // http://msdn.microsoft.com/en-us/library/ff471462%28v=VS.85%29.aspx
  420. class __InputPatch<T,N> {
  421. uint Length;
  422. T operator[](in uint n);
  423. };
  424. // OutputPatch<T,N>
  425. // http://msdn.microsoft.com/en-us/library/ff471464%28v=VS.85%29.aspx
  426. class __OutputPatch<T,N> {
  427. uint Length;
  428. T operator[](in uint n);
  429. };
  430. // RWBuffer<T>
  431. // http://msdn.microsoft.com/en-us/library/ff471472%28v=VS.85%29.aspx
  432. class __RWBuffer<T> {
  433. void GetDimensions(out uint dim);
  434. T operator[](in uint pos);
  435. };
  436. // RWByteAddressBuffer
  437. // http://msdn.microsoft.com/en-us/library/ff471475%28v=VS.85%29.aspx
  438. class __RWByteAddressBuffer {
  439. void GetDimensions(out uint dim);
  440. void InterlockedAdd(in uint dest, in uint value, out uint original_value);
  441. void InterlockedAnd(
  442. in uint dest,
  443. in uint value,
  444. out uint original_value
  445. );
  446. void InterlockedCompareExchange(
  447. in uint dest,
  448. in uint compare_value,
  449. in uint value,
  450. out uint original_value
  451. );
  452. void InterlockedCompareStore(
  453. in uint dest,
  454. in uint compare_value,
  455. in uint value
  456. );
  457. void InterlockedExchange(
  458. in uint dest,
  459. in uint value,
  460. out uint original_value
  461. );
  462. void InterlockedMax(
  463. in uint dest,
  464. in uint value,
  465. out uint original_value
  466. );
  467. void InterlockedMin(
  468. in uint dest,
  469. in uint value,
  470. out uint original_value
  471. );
  472. void InterlockedOr(
  473. in uint dest,
  474. in uint value,
  475. out uint original_value
  476. );
  477. void InterlockedXor(
  478. in uint dest,
  479. in uint value,
  480. out uint original_value
  481. );
  482. uint Load(
  483. in uint address
  484. );
  485. uint2 Load2(
  486. in uint address
  487. );
  488. uint3 Load3(
  489. in uint address
  490. );
  491. uint4 Load4(
  492. in uint address
  493. );
  494. void Store(
  495. in uint address,
  496. in uint value
  497. );
  498. void Store2(
  499. in uint address,
  500. in uint2 values
  501. );
  502. void Store3(
  503. in uint address,
  504. in uint3 values
  505. );
  506. void Store4(
  507. in uint address,
  508. in uint4 values
  509. );
  510. };
  511. // RWStructuredBuffer<T>
  512. // http://msdn.microsoft.com/en-us/library/ff471494%28v=VS.85%29.aspx
  513. class __RWStructuredBuffer<T> {
  514. uint DecrementCounter(void);
  515. void GetDimensions(
  516. out uint numStructs,
  517. out uint stride
  518. );
  519. uint IncrementCounter(void);
  520. T operator[](in uint pos);
  521. };
  522. // RWTexture1D<T>
  523. // http://msdn.microsoft.com/en-us/library/ff471499%28v=VS.85%29.aspx
  524. class __RWTexture1D<T> {
  525. void GetDimensions(
  526. out uint Width
  527. );
  528. T operator[](in uint pos);
  529. };
  530. // RWTexture1DArray<T>
  531. // http://msdn.microsoft.com/en-us/library/ff471500%28v=VS.85%29.aspx
  532. class __RWTexture1DArray<T> {
  533. void GetDimensions(
  534. out uint Width,
  535. out uint Elements
  536. );
  537. T operator[](in uint2 pos);
  538. };
  539. // RWTexture2D<T>
  540. // http://msdn.microsoft.com/en-us/library/ff471505%28v=VS.85%29.aspx
  541. class __RWTexture2D<T> {
  542. void GetDimensions(
  543. out uint Width,
  544. out uint Height
  545. );
  546. T operator[](in uint2 pos);
  547. };
  548. // RWTexture2DArray<T>
  549. // http://msdn.microsoft.com/en-us/library/ff471506%28v=VS.85%29.aspx
  550. class __RWTexture2DArray<T> {
  551. void GetDimensions(
  552. out uint Width,
  553. out uint Height,
  554. out uint Elements
  555. );
  556. T operator[](in uint3 pos);
  557. };
  558. // RWTexture3D<T>
  559. // http://msdn.microsoft.com/en-us/library/ff471511%28v=VS.85%29.aspx
  560. class __RWTexture3D<T> {
  561. void GetDimensions(
  562. out uint Width,
  563. out uint Height,
  564. out uint Depth
  565. );
  566. T operator[](in uint3 pos);
  567. };
  568. // StructuredBuffer<T>
  569. // http://msdn.microsoft.com/en-us/library/ff471514%28v=VS.85%29.aspx
  570. class __StructuredBuffer<T> {
  571. void GetDimensions(
  572. out uint numStructs,
  573. out uint stride
  574. );
  575. T operator[](in uint pos);
  576. };