cube_gather.hlsl 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  1. // RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
  2. SamplerState samp : register(s0);
  3. SamplerComparisonState sampcmp : register(s1);
  4. TextureCube<float4> cube : register(t0);
  5. TextureCubeArray<float4> cubeArray : register(t1);
  6. #define LOD 11
  7. #define CMP 0.5
  8. float4 main(float4 a : A) : SV_Target
  9. {
  10. uint status;
  11. float4 r = 0;
  12. ///////////////////////////////////////////////
  13. // Gather
  14. ///////////////////////////////////////////////
  15. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGather.f32(i32 73,
  16. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float undef
  17. // CHECK-SAME: , i32 undef, i32 undef
  18. // CHECK-SAME: , i32 0)
  19. r += cube.Gather(samp, a.xyz);
  20. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGather.f32(i32 73,
  21. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float undef
  22. // CHECK-SAME: , i32 undef, i32 undef
  23. // CHECK-SAME: , i32 0)
  24. // CHECK: extractvalue %dx.types.ResRet.f32 %{{[^,]+}}, 4
  25. // CHECK: call i1 @dx.op.checkAccessFullyMapped.i32(i32 71,
  26. r += cube.Gather(samp, a.xyz+0.05, status); r += CheckAccessFullyMapped(status);
  27. // TextureCubeArray
  28. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGather.f32(i32 73,
  29. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}
  30. // CHECK-SAME: , i32 undef, i32 undef
  31. // CHECK-SAME: , i32 0)
  32. r += cubeArray.Gather(samp, a.xyzw);
  33. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGather.f32(i32 73,
  34. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}
  35. // CHECK-SAME: , i32 undef, i32 undef
  36. // CHECK-SAME: , i32 0)
  37. // CHECK: extractvalue %dx.types.ResRet.f32 %{{[^,]+}}, 4
  38. // CHECK: call i1 @dx.op.checkAccessFullyMapped.i32(i32 71,
  39. r += cubeArray.Gather(samp, a.xyzw+0.05, status); r += CheckAccessFullyMapped(status);
  40. a *= 1.125; // Prevent GatherRed from being optimized to equivalent Gather above
  41. ///////////////////////////////////////////////
  42. // GatherRed
  43. ///////////////////////////////////////////////
  44. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGather.f32(i32 73,
  45. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float undef
  46. // CHECK-SAME: , i32 undef, i32 undef
  47. // CHECK-SAME: , i32 0)
  48. r += cube.GatherRed(samp, a.xyz);
  49. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGather.f32(i32 73,
  50. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float undef
  51. // CHECK-SAME: , i32 undef, i32 undef
  52. // CHECK-SAME: , i32 0)
  53. // CHECK: extractvalue %dx.types.ResRet.f32 %{{[^,]+}}, 4
  54. // CHECK: call i1 @dx.op.checkAccessFullyMapped.i32(i32 71,
  55. r += cube.GatherRed(samp, a.xyz+0.05, status); r += CheckAccessFullyMapped(status);
  56. // TextureCubeArray
  57. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGather.f32(i32 73,
  58. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}
  59. // CHECK-SAME: , i32 undef, i32 undef
  60. // CHECK-SAME: , i32 0)
  61. r += cubeArray.GatherRed(samp, a.xyzw);
  62. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGather.f32(i32 73,
  63. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}
  64. // CHECK-SAME: , i32 undef, i32 undef
  65. // CHECK-SAME: , i32 0)
  66. // CHECK: extractvalue %dx.types.ResRet.f32 %{{[^,]+}}, 4
  67. // CHECK: call i1 @dx.op.checkAccessFullyMapped.i32(i32 71,
  68. r += cubeArray.GatherRed(samp, a.xyzw+0.05, status); r += CheckAccessFullyMapped(status);
  69. ///////////////////////////////////////////////
  70. // GatherGreen
  71. ///////////////////////////////////////////////
  72. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGather.f32(i32 73,
  73. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float undef
  74. // CHECK-SAME: , i32 undef, i32 undef
  75. // CHECK-SAME: , i32 1)
  76. r += cube.GatherGreen(samp, a.xyz);
  77. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGather.f32(i32 73,
  78. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float undef
  79. // CHECK-SAME: , i32 undef, i32 undef
  80. // CHECK-SAME: , i32 1)
  81. // CHECK: extractvalue %dx.types.ResRet.f32 %{{[^,]+}}, 4
  82. // CHECK: call i1 @dx.op.checkAccessFullyMapped.i32(i32 71,
  83. r += cube.GatherGreen(samp, a.xyz+0.05, status); r += CheckAccessFullyMapped(status);
  84. // TextureCubeArray
  85. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGather.f32(i32 73,
  86. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}
  87. // CHECK-SAME: , i32 undef, i32 undef
  88. // CHECK-SAME: , i32 1)
  89. r += cubeArray.GatherGreen(samp, a.xyzw);
  90. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGather.f32(i32 73,
  91. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}
  92. // CHECK-SAME: , i32 undef, i32 undef
  93. // CHECK-SAME: , i32 1)
  94. // CHECK: extractvalue %dx.types.ResRet.f32 %{{[^,]+}}, 4
  95. // CHECK: call i1 @dx.op.checkAccessFullyMapped.i32(i32 71,
  96. r += cubeArray.GatherGreen(samp, a.xyzw+0.05, status); r += CheckAccessFullyMapped(status);
  97. ///////////////////////////////////////////////
  98. // GatherBlue
  99. ///////////////////////////////////////////////
  100. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGather.f32(i32 73,
  101. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float undef
  102. // CHECK-SAME: , i32 undef, i32 undef
  103. // CHECK-SAME: , i32 2)
  104. r += cube.GatherBlue(samp, a.xyz);
  105. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGather.f32(i32 73,
  106. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float undef
  107. // CHECK-SAME: , i32 undef, i32 undef
  108. // CHECK-SAME: , i32 2)
  109. // CHECK: extractvalue %dx.types.ResRet.f32 %{{[^,]+}}, 4
  110. // CHECK: call i1 @dx.op.checkAccessFullyMapped.i32(i32 71,
  111. r += cube.GatherBlue(samp, a.xyz+0.05, status); r += CheckAccessFullyMapped(status);
  112. // TextureCubeArray
  113. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGather.f32(i32 73,
  114. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}
  115. // CHECK-SAME: , i32 undef, i32 undef
  116. // CHECK-SAME: , i32 2)
  117. r += cubeArray.GatherBlue(samp, a.xyzw);
  118. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGather.f32(i32 73,
  119. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}
  120. // CHECK-SAME: , i32 undef, i32 undef
  121. // CHECK-SAME: , i32 2)
  122. // CHECK: extractvalue %dx.types.ResRet.f32 %{{[^,]+}}, 4
  123. // CHECK: call i1 @dx.op.checkAccessFullyMapped.i32(i32 71,
  124. r += cubeArray.GatherBlue(samp, a.xyzw+0.05, status); r += CheckAccessFullyMapped(status);
  125. ///////////////////////////////////////////////
  126. // GatherAlpha
  127. ///////////////////////////////////////////////
  128. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGather.f32(i32 73,
  129. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float undef
  130. // CHECK-SAME: , i32 undef, i32 undef
  131. // CHECK-SAME: , i32 3)
  132. r += cube.GatherAlpha(samp, a.xyz);
  133. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGather.f32(i32 73,
  134. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float undef
  135. // CHECK-SAME: , i32 undef, i32 undef
  136. // CHECK-SAME: , i32 3)
  137. // CHECK: extractvalue %dx.types.ResRet.f32 %{{[^,]+}}, 4
  138. // CHECK: call i1 @dx.op.checkAccessFullyMapped.i32(i32 71,
  139. r += cube.GatherAlpha(samp, a.xyz+0.05, status); r += CheckAccessFullyMapped(status);
  140. // TextureCubeArray
  141. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGather.f32(i32 73,
  142. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}
  143. // CHECK-SAME: , i32 undef, i32 undef
  144. // CHECK-SAME: , i32 3)
  145. r += cubeArray.GatherAlpha(samp, a.xyzw);
  146. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGather.f32(i32 73,
  147. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}
  148. // CHECK-SAME: , i32 undef, i32 undef
  149. // CHECK-SAME: , i32 3)
  150. // CHECK: extractvalue %dx.types.ResRet.f32 %{{[^,]+}}, 4
  151. // CHECK: call i1 @dx.op.checkAccessFullyMapped.i32(i32 71,
  152. r += cubeArray.GatherAlpha(samp, a.xyzw+0.05, status); r += CheckAccessFullyMapped(status);
  153. ///////////////////////////////////////////////
  154. // GatherCmp
  155. ///////////////////////////////////////////////
  156. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGatherCmp.f32(i32 74,
  157. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float undef
  158. // CHECK-SAME: , i32 undef, i32 undef
  159. // CHECK-SAME: , i32 0
  160. // CHECK-SAME: , float 5.000000e-01)
  161. r += cube.GatherCmp(sampcmp, a.xyz, CMP);
  162. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGatherCmp.f32(i32 74,
  163. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float undef
  164. // CHECK-SAME: , i32 undef, i32 undef
  165. // CHECK-SAME: , i32 0
  166. // CHECK-SAME: , float 5.000000e-01)
  167. // CHECK: extractvalue %dx.types.ResRet.f32 %{{[^,]+}}, 4
  168. // CHECK: call i1 @dx.op.checkAccessFullyMapped.i32(i32 71,
  169. r += cube.GatherCmp(sampcmp, a.xyz+0.05, CMP, status); r += CheckAccessFullyMapped(status);
  170. // TextureCubeArray
  171. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGatherCmp.f32(i32 74,
  172. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}
  173. // CHECK-SAME: , i32 undef, i32 undef
  174. // CHECK-SAME: , i32 0
  175. // CHECK-SAME: , float 5.000000e-01)
  176. r += cubeArray.GatherCmp(sampcmp, a.xyzw, CMP);
  177. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGatherCmp.f32(i32 74,
  178. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}
  179. // CHECK-SAME: , i32 undef, i32 undef
  180. // CHECK-SAME: , i32 0
  181. // CHECK-SAME: , float 5.000000e-01)
  182. // CHECK: extractvalue %dx.types.ResRet.f32 %{{[^,]+}}, 4
  183. // CHECK: call i1 @dx.op.checkAccessFullyMapped.i32(i32 71,
  184. r += cubeArray.GatherCmp(sampcmp, a.xyzw+0.05, CMP, status); r += CheckAccessFullyMapped(status);
  185. a *= 1.125; // Prevent GatherCmpRed from being optimized to equivalent GatherCmp above
  186. ///////////////////////////////////////////////
  187. // GatherCmpRed
  188. ///////////////////////////////////////////////
  189. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGatherCmp.f32(i32 74,
  190. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float undef
  191. // CHECK-SAME: , i32 undef, i32 undef
  192. // CHECK-SAME: , i32 0
  193. // CHECK-SAME: , float 5.000000e-01)
  194. r += cube.GatherCmpRed(sampcmp, a.xyz, CMP);
  195. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGatherCmp.f32(i32 74,
  196. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float undef
  197. // CHECK-SAME: , i32 undef, i32 undef
  198. // CHECK-SAME: , i32 0
  199. // CHECK-SAME: , float 5.000000e-01)
  200. // CHECK: extractvalue %dx.types.ResRet.f32 %{{[^,]+}}, 4
  201. // CHECK: call i1 @dx.op.checkAccessFullyMapped.i32(i32 71,
  202. r += cube.GatherCmpRed(sampcmp, a.xyz+0.05, CMP, status); r += CheckAccessFullyMapped(status);
  203. // TextureCubeArray
  204. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGatherCmp.f32(i32 74,
  205. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}
  206. // CHECK-SAME: , i32 undef, i32 undef
  207. // CHECK-SAME: , i32 0
  208. // CHECK-SAME: , float 5.000000e-01)
  209. r += cubeArray.GatherCmpRed(sampcmp, a.xyzw, CMP);
  210. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGatherCmp.f32(i32 74,
  211. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}
  212. // CHECK-SAME: , i32 undef, i32 undef
  213. // CHECK-SAME: , i32 0
  214. // CHECK-SAME: , float 5.000000e-01)
  215. // CHECK: extractvalue %dx.types.ResRet.f32 %{{[^,]+}}, 4
  216. // CHECK: call i1 @dx.op.checkAccessFullyMapped.i32(i32 71,
  217. r += cubeArray.GatherCmpRed(sampcmp, a.xyzw+0.05, CMP, status); r += CheckAccessFullyMapped(status);
  218. ///////////////////////////////////////////////
  219. // GatherCmpGreen
  220. ///////////////////////////////////////////////
  221. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGatherCmp.f32(i32 74,
  222. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float undef
  223. // CHECK-SAME: , i32 undef, i32 undef
  224. // CHECK-SAME: , i32 1
  225. // CHECK-SAME: , float 5.000000e-01)
  226. r += cube.GatherCmpGreen(sampcmp, a.xyz, CMP);
  227. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGatherCmp.f32(i32 74,
  228. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float undef
  229. // CHECK-SAME: , i32 undef, i32 undef
  230. // CHECK-SAME: , i32 1
  231. // CHECK-SAME: , float 5.000000e-01)
  232. // CHECK: extractvalue %dx.types.ResRet.f32 %{{[^,]+}}, 4
  233. // CHECK: call i1 @dx.op.checkAccessFullyMapped.i32(i32 71,
  234. r += cube.GatherCmpGreen(sampcmp, a.xyz+0.05, CMP, status); r += CheckAccessFullyMapped(status);
  235. // TextureCubeArray
  236. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGatherCmp.f32(i32 74,
  237. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}
  238. // CHECK-SAME: , i32 undef, i32 undef
  239. // CHECK-SAME: , i32 1
  240. // CHECK-SAME: , float 5.000000e-01)
  241. r += cubeArray.GatherCmpGreen(sampcmp, a.xyzw, CMP);
  242. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGatherCmp.f32(i32 74,
  243. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}
  244. // CHECK-SAME: , i32 undef, i32 undef
  245. // CHECK-SAME: , i32 1
  246. // CHECK-SAME: , float 5.000000e-01)
  247. // CHECK: extractvalue %dx.types.ResRet.f32 %{{[^,]+}}, 4
  248. // CHECK: call i1 @dx.op.checkAccessFullyMapped.i32(i32 71,
  249. r += cubeArray.GatherCmpGreen(sampcmp, a.xyzw+0.05, CMP, status); r += CheckAccessFullyMapped(status);
  250. ///////////////////////////////////////////////
  251. // GatherCmpBlue
  252. ///////////////////////////////////////////////
  253. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGatherCmp.f32(i32 74,
  254. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float undef
  255. // CHECK-SAME: , i32 undef, i32 undef
  256. // CHECK-SAME: , i32 2
  257. // CHECK-SAME: , float 5.000000e-01)
  258. r += cube.GatherCmpBlue(sampcmp, a.xyz, CMP);
  259. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGatherCmp.f32(i32 74,
  260. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float undef
  261. // CHECK-SAME: , i32 undef, i32 undef
  262. // CHECK-SAME: , i32 2
  263. // CHECK-SAME: , float 5.000000e-01)
  264. // CHECK: extractvalue %dx.types.ResRet.f32 %{{[^,]+}}, 4
  265. // CHECK: call i1 @dx.op.checkAccessFullyMapped.i32(i32 71,
  266. r += cube.GatherCmpBlue(sampcmp, a.xyz+0.05, CMP, status); r += CheckAccessFullyMapped(status);
  267. // TextureCubeArray
  268. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGatherCmp.f32(i32 74,
  269. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}
  270. // CHECK-SAME: , i32 undef, i32 undef
  271. // CHECK-SAME: , i32 2
  272. // CHECK-SAME: , float 5.000000e-01)
  273. r += cubeArray.GatherCmpBlue(sampcmp, a.xyzw, CMP);
  274. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGatherCmp.f32(i32 74,
  275. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}
  276. // CHECK-SAME: , i32 undef, i32 undef
  277. // CHECK-SAME: , i32 2
  278. // CHECK-SAME: , float 5.000000e-01)
  279. // CHECK: extractvalue %dx.types.ResRet.f32 %{{[^,]+}}, 4
  280. // CHECK: call i1 @dx.op.checkAccessFullyMapped.i32(i32 71,
  281. r += cubeArray.GatherCmpBlue(sampcmp, a.xyzw+0.05, CMP, status); r += CheckAccessFullyMapped(status);
  282. ///////////////////////////////////////////////
  283. // GatherCmpAlpha
  284. ///////////////////////////////////////////////
  285. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGatherCmp.f32(i32 74,
  286. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float undef
  287. // CHECK-SAME: , i32 undef, i32 undef
  288. // CHECK-SAME: , i32 3
  289. // CHECK-SAME: , float 5.000000e-01)
  290. r += cube.GatherCmpAlpha(sampcmp, a.xyz, CMP);
  291. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGatherCmp.f32(i32 74,
  292. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float undef
  293. // CHECK-SAME: , i32 undef, i32 undef
  294. // CHECK-SAME: , i32 3
  295. // CHECK-SAME: , float 5.000000e-01)
  296. // CHECK: extractvalue %dx.types.ResRet.f32 %{{[^,]+}}, 4
  297. // CHECK: call i1 @dx.op.checkAccessFullyMapped.i32(i32 71,
  298. r += cube.GatherCmpAlpha(sampcmp, a.xyz+0.05, CMP, status); r += CheckAccessFullyMapped(status);
  299. // TextureCubeArray
  300. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGatherCmp.f32(i32 74,
  301. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}
  302. // CHECK-SAME: , i32 undef, i32 undef
  303. // CHECK-SAME: , i32 3
  304. // CHECK-SAME: , float 5.000000e-01)
  305. r += cubeArray.GatherCmpAlpha(sampcmp, a.xyzw, CMP);
  306. // CHECK: call %dx.types.ResRet.f32 @dx.op.textureGatherCmp.f32(i32 74,
  307. // CHECK-SAME: , float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}, float %{{[^,]+}}
  308. // CHECK-SAME: , i32 undef, i32 undef
  309. // CHECK-SAME: , i32 3
  310. // CHECK-SAME: , float 5.000000e-01)
  311. // CHECK: extractvalue %dx.types.ResRet.f32 %{{[^,]+}}, 4
  312. // CHECK: call i1 @dx.op.checkAccessFullyMapped.i32(i32 71,
  313. r += cubeArray.GatherCmpAlpha(sampcmp, a.xyzw+0.05, CMP, status); r += CheckAccessFullyMapped(status);
  314. return r;
  315. }