128 flattened_thread_id_in_group)
151 subgroup_multi_prefix_bit_and)
153 wave_multi_prefix_bit_or,
154 subgroup_multi_prefix_bit_or)
157 subgroup_multi_prefix_bit_xor)
159 wave_multi_prefix_product,
160 subgroup_multi_prefix_product)
163 subgroup_multi_prefix_product)
165 wave_multi_prefix_sum,
166 subgroup_multi_prefix_sum)
169 subgroup_multi_prefix_sum)
184 quad_read_across_diagonal)
193 resource_getbasepointer)
206 resource_samplecmplevelzero)
210 resource_handlefrombinding)
212 resource_handlefromimplicitbinding)
214 resource_handlefromheap)
216 resource_nonuniformindex)
220 all_memory_barrier_with_group_sync)
223 device_memory_barrier_with_group_sync)
226 group_memory_barrier_with_group_sync)
228 assert(getArch() == llvm::Triple::dxil &&
229 "Barrier by memory type is only supported for DXIL");
230 return llvm::Intrinsic::dx_barrier_by_memory_type;
233 assert(getArch() == llvm::Triple::dxil &&
234 "Barrier by memory handle is only supported for DXIL");
235 return llvm::Intrinsic::dx_barrier_by_memory_handle;
240 resource_getdimensions_levels_xy)
245 resource_calculate_lod_unclamped)
263 HLSLAppliedSemanticAttr *Semantic,
265 llvm::Triple::EnvironmentType Stage,
std::optional<
unsigned> Index,
270 HLSLAppliedSemanticAttr *Semantic,
272 llvm::Triple::EnvironmentType Stage,
273 std::optional<
unsigned> Index,
275 llvm::
hlsl::InterpolationMode InterpMode);
285 HLSLAppliedSemanticAttr *Semantic,
287 llvm::
hlsl::InterpolationMode InterpMode);
296 llvm::
hlsl::InterpolationModifier Modifiers);
304 llvm::
hlsl::InterpolationModifier Modifiers);
312 llvm::
hlsl::InterpolationModifier Modifiers =
321 llvm::
hlsl::InterpolationModifier Modifiers =
349 llvm::StructType *LayoutTy);
352 std::optional<LValue>
358 std::optional<LValue>
364 llvm::function_ref<llvm::Value *(
bool Promote)> EmitIdxAfterBase);
378 llvm::GlobalVariable *BufGV,
381 llvm::GlobalVariable *GV);
383 llvm::Value *emitSPIRVUserSemanticLoad(
385 HLSLAppliedSemanticAttr *Semantic, std::optional<unsigned> Index,
386 llvm::hlsl::InterpolationMode InterpMode);
387 llvm::Value *emitDXILUserSemanticLoad(llvm::IRBuilder<> &B, llvm::Type *
Type,
389 HLSLAppliedSemanticAttr *Semantic,
390 std::optional<unsigned> Index,
392 llvm::Value *emitUserSemanticLoad(llvm::IRBuilder<> &B, llvm::Type *
Type,
394 HLSLAppliedSemanticAttr *Semantic,
395 std::optional<unsigned> Index,
397 llvm::hlsl::InterpolationMode InterpMode);
399 void emitSPIRVUserSemanticStore(llvm::IRBuilder<> &B, llvm::Value *Source,
401 HLSLAppliedSemanticAttr *Semantic,
402 std::optional<unsigned> Index,
403 llvm::hlsl::InterpolationMode InterpMode,
404 bool UseLocationFromIndex =
false);
405 void emitDXILUserSemanticStore(llvm::IRBuilder<> &B, llvm::Value *Source,
407 HLSLAppliedSemanticAttr *Semantic,
408 std::optional<unsigned> Index,
410 bool EnforceOneElementPerRow =
false);
411 void emitUserSemanticStore(llvm::IRBuilder<> &B, llvm::Value *Source,
413 HLSLAppliedSemanticAttr *Semantic,
414 std::optional<unsigned> Index,
416 llvm::hlsl::InterpolationMode InterpMode);
422 llvm::Triple::ArchType getArch();
424 llvm::DenseMap<const clang::RecordType *, llvm::StructType *> LayoutTypes;
425 unsigned SPIRVLastAssignedInputSemanticLocation = 0;
426 unsigned SPIRVLastAssignedOutputSemanticLocation = 0;
431 struct SPIRVClipCullLayout {
432 llvm::DenseMap<unsigned, unsigned> Offsets;
434 llvm::GlobalVariable *Variable =
nullptr;
437 SPIRVClipCullLayout SPIRVClipCullLayouts[2][2];
439 SPIRVClipCullLayout &
440 getSPIRVClipCullLayout(llvm::dxbc::PSV::SemanticKind Kind,
bool IsInput);
441 void computeSPIRVClipCullLayouts(
const FunctionDecl *FD);
442 llvm::GlobalVariable *
443 getSPIRVClipCullVariable(llvm::dxbc::PSV::SemanticKind Kind,
bool IsInput);
444 llvm::Value *emitSPIRVClipCullLoad(llvm::IRBuilder<> &B, llvm::Type *
Type,
446 HLSLAppliedSemanticAttr *Semantic);
447 void emitSPIRVClipCullStore(llvm::IRBuilder<> &B, llvm::Value *Source,
449 HLSLAppliedSemanticAttr *Semantic);