Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 58 additions & 34 deletions src/libs/dxmt-0.60/Makefile.kmk
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,61 @@ include $(KBUILD_TOOL_PATHS)/VBoxXClangMacho.kmk
VBOX_PATH_DXMT := $(PATH_SUB_CURRENT)

#
# The LLVM static libraries required for DXMT
#
VBOX_LLVM_PATH ?= $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS_TRG)/llvm/v*)))
# LLVM for DXMT. Prefer llvm-config when available so the link line follows
# the configured LLVM package, including shared libLLVM-N installs. Some
# VirtualBox devtools trees do not ship llvm-config, so keep the component
# library list as a fallback below.
#
VBOX_LLVM_PATH ?= $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS_TRG)/llvm/v*)))
VBOX_LLVM_CONFIG ?= $(VBOX_LLVM_PATH)/bin/llvm-config
VBOX_DXMT_LLVM_LIBDIR := $(VBOX_LLVM_PATH)/lib
ifneq ($(wildcard $(VBOX_LLVM_CONFIG)),)
VBOX_DXMT_LLVM_CONFIG_LIBDIR := $(shell $(VBOX_LLVM_CONFIG) --libdir 2>/dev/null)
ifneq ($(VBOX_DXMT_LLVM_CONFIG_LIBDIR),)
VBOX_DXMT_LLVM_LIBDIR := $(VBOX_DXMT_LLVM_CONFIG_LIBDIR)
endif
VBOX_DXMT_LLVM_CONFIG_LIBS := $(shell $(VBOX_LLVM_CONFIG) --libs bitwriter passes 2>/dev/null)
VBOX_DXMT_LLVM_CONFIG_LIB_NAMES := $(patsubst -l%,%,$(filter -l%,$(VBOX_DXMT_LLVM_CONFIG_LIBS)))
VBOX_DXMT_LLVM_LINK_LIB = $(firstword $(wildcard $(VBOX_DXMT_LLVM_LIBDIR)/lib$(1)$(VBOX_SUFF_LIB) $(VBOX_DXMT_LLVM_LIBDIR)/lib$(1)$(VBOX_SUFF_DLL)) -l$(1))
VBOX_DXMT_LLVM_CONFIG_LINK_LIBS := $(foreach lib,$(VBOX_DXMT_LLVM_CONFIG_LIB_NAMES),$(call VBOX_DXMT_LLVM_LINK_LIB,$(lib)))
endif

VBOX_DXMT_LLVM_FALLBACK_LIBS = \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMPasses$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMTarget$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMObjCARCOpts$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMCoroutines$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMipo$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMInstrumentation$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMVectorize$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMLinker$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMIRReader$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMAsmParser$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMFrontendOpenMP$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMScalarOpts$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMInstCombine$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMAggressiveInstCombine$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMTransformUtils$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMBitWriter$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMAnalysis$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMProfileData$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMDebugInfoDWARF$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMObject$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMTextAPI$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMMCParser$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMMC$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMBitReader$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMCore$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMRemarks$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMBitstreamReader$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMBinaryFormat$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMSupport$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBDIR)/libLLVMDemangle$(VBOX_SUFF_LIB)
ifneq ($(VBOX_DXMT_LLVM_CONFIG_LINK_LIBS),)
VBOX_DXMT_LLVM_LIBS := $(VBOX_DXMT_LLVM_CONFIG_LINK_LIBS)
else
VBOX_DXMT_LLVM_LIBS := $(VBOX_DXMT_LLVM_FALLBACK_LIBS)
endif


# The metal shader compiler
Expand Down Expand Up @@ -280,37 +332,10 @@ VBoxDxMt_LIBS = \
$(PATH_STAGE_LIB)/VBox-DxMtNativeUtil$(VBOX_SUFF_LIB) \
$(PATH_STAGE_LIB)/VBox-DxMtNativeDxbcParser$(VBOX_SUFF_LIB) \
$(PATH_STAGE_LIB)/VBox-DxMtNativeMetal$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMPasses$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMTarget$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMObjCARCOpts$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMCoroutines$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMipo$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMInstrumentation$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMVectorize$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMLinker$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMIRReader$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMAsmParser$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMFrontendOpenMP$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMScalarOpts$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMInstCombine$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMAggressiveInstCombine$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMTransformUtils$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMBitWriter$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMAnalysis$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMProfileData$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMDebugInfoDWARF$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMObject$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMTextAPI$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMMCParser$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMMC$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMBitReader$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMCore$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMRemarks$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMBitstreamReader$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMBinaryFormat$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMSupport$(VBOX_SUFF_LIB) \
$(VBOX_LLVM_PATH)/lib/libLLVMDemangle$(VBOX_SUFF_LIB) \
$(VBOX_DXMT_LLVM_LIBS) \
$(LIB_RUNTIME)
VBoxDxMt_LIBPATH += \
$(VBOX_DXMT_LLVM_LIBDIR)
VBoxDxMt_LDFLAGS += \
-weak_framework CoreFoundation \
-weak_framework Metal \
Expand All @@ -321,4 +346,3 @@ VBoxDxMt_LDFLAGS += \
-weak_framework Cocoa

include $(FILE_KBUILD_SUB_FOOTER)

3 changes: 2 additions & 1 deletion src/libs/dxmt-0.60/libs/DXBCParser/DXBCUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "winerror.h"
#include <cassert>
#include <cstring>
#include <cstdlib>
#include <climits>
#include <ctype.h>

Expand Down Expand Up @@ -1272,4 +1273,4 @@ void CSignatureParser::ClearAlwaysReadsNeverWritesMask()
}
}

}
}
1 change: 1 addition & 0 deletions src/libs/dxmt-0.60/libs/DXBCParser/ShaderBinary.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "d3d12tokenizedprogramformat.hpp"
#include <cassert>
#include <cstring>
#include <cstdlib>
#include "minwindef.h"

typedef UINT CShaderToken;
Expand Down
58 changes: 35 additions & 23 deletions src/libs/dxmt-0.60/src/airconv/air_operations.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
#include "air_operations.hpp"
#include "llvm/Config/llvm-config.h"
#if LLVM_VERSION_MAJOR >= 16
# include "llvm/Support/ModRef.h"
#endif

namespace dxmt::air {

static llvm::Attribute arg_mem_only_attribute(llvm::LLVMContext &context) {
#if LLVM_VERSION_MAJOR >= 16
return llvm::Attribute::getWithMemoryEffects(context, llvm::MemoryEffects::argMemOnly());
#else
return llvm::Attribute::get(context, llvm::Attribute::AttrKind::ArgMemOnly);
#endif
}

std::string
type_overload_suffix(llvm::Type *type, Sign sign = Sign::inapplicable) {
if (type->isFloatTy()) {
Expand Down Expand Up @@ -501,7 +513,7 @@ AIRBuilderResult call_sample(
{1U, Attribute::get(context, Attribute::AttrKind::ReadOnly)},
{2U, Attribute::get(context, Attribute::AttrKind::NoCapture)},
{2U, Attribute::get(context, Attribute::AttrKind::ReadOnly)},
{~0U, Attribute::get(context, Attribute::AttrKind::ArgMemOnly)},
{~0U, arg_mem_only_attribute(context)},
{~0U, Attribute::get(context, Attribute::AttrKind::Convergent)},
{~0U, Attribute::get(context, Attribute::AttrKind::NoUnwind)},
{~0U, Attribute::get(context, Attribute::AttrKind::WillReturn)},
Expand Down Expand Up @@ -592,7 +604,7 @@ AIRBuilderResult call_sample_grad(
{1U, Attribute::get(context, Attribute::AttrKind::ReadOnly)},
{2U, Attribute::get(context, Attribute::AttrKind::NoCapture)},
{2U, Attribute::get(context, Attribute::AttrKind::ReadOnly)},
{~0U, Attribute::get(context, Attribute::AttrKind::ArgMemOnly)},
{~0U, arg_mem_only_attribute(context)},
{~0U, Attribute::get(context, Attribute::AttrKind::NoUnwind)},
{~0U, Attribute::get(context, Attribute::AttrKind::WillReturn)},
{~0U, Attribute::get(context, Attribute::AttrKind::ReadOnly)},
Expand Down Expand Up @@ -674,7 +686,7 @@ AIRBuilderResult call_sample_compare(
{1U, Attribute::get(context, Attribute::AttrKind::ReadOnly)},
{2U, Attribute::get(context, Attribute::AttrKind::NoCapture)},
{2U, Attribute::get(context, Attribute::AttrKind::ReadOnly)},
{~0U, Attribute::get(context, Attribute::AttrKind::ArgMemOnly)},
{~0U, arg_mem_only_attribute(context)},
{~0U, Attribute::get(context, Attribute::AttrKind::Convergent)},
{~0U, Attribute::get(context, Attribute::AttrKind::NoUnwind)},
{~0U, Attribute::get(context, Attribute::AttrKind::WillReturn)},
Expand Down Expand Up @@ -771,7 +783,7 @@ AIRBuilderResult call_gather(
{1U, Attribute::get(context, Attribute::AttrKind::ReadOnly)},
{2U, Attribute::get(context, Attribute::AttrKind::NoCapture)},
{2U, Attribute::get(context, Attribute::AttrKind::ReadOnly)},
{~0U, Attribute::get(context, Attribute::AttrKind::ArgMemOnly)},
{~0U, arg_mem_only_attribute(context)},
{~0U, Attribute::get(context, Attribute::AttrKind::NoUnwind)},
{~0U, Attribute::get(context, Attribute::AttrKind::WillReturn)},
{~0U, Attribute::get(context, Attribute::AttrKind::ReadOnly)},
Expand Down Expand Up @@ -848,7 +860,7 @@ AIRBuilderResult call_gather_compare(
{1U, Attribute::get(context, Attribute::AttrKind::ReadOnly)},
{2U, Attribute::get(context, Attribute::AttrKind::NoCapture)},
{2U, Attribute::get(context, Attribute::AttrKind::ReadOnly)},
{~0U, Attribute::get(context, Attribute::AttrKind::ArgMemOnly)},
{~0U, arg_mem_only_attribute(context)},
{~0U, Attribute::get(context, Attribute::AttrKind::NoUnwind)},
{~0U, Attribute::get(context, Attribute::AttrKind::WillReturn)},
{~0U, Attribute::get(context, Attribute::AttrKind::ReadOnly)},
Expand Down Expand Up @@ -921,7 +933,7 @@ AIRBuilderResult call_read(
{
{1U, Attribute::get(context, Attribute::AttrKind::NoCapture)},
{1U, Attribute::get(context, Attribute::AttrKind::ReadOnly)},
{~0U, Attribute::get(context, Attribute::AttrKind::ArgMemOnly)},
{~0U, arg_mem_only_attribute(context)},
{~0U, Attribute::get(context, Attribute::AttrKind::NoUnwind)},
{~0U, Attribute::get(context, Attribute::AttrKind::WillReturn)},
{~0U, Attribute::get(context, Attribute::AttrKind::ReadOnly)},
Expand Down Expand Up @@ -1007,7 +1019,7 @@ AIRBuilderResult call_write(
context,
{
{1U, Attribute::get(context, Attribute::AttrKind::NoCapture)},
{~0U, Attribute::get(context, Attribute::AttrKind::ArgMemOnly)},
{~0U, arg_mem_only_attribute(context)},
{~0U, Attribute::get(context, Attribute::AttrKind::NoUnwind)},
{~0U, Attribute::get(context, Attribute::AttrKind::WillReturn)},
}
Expand Down Expand Up @@ -1077,7 +1089,7 @@ AIRBuilderResult call_calc_lod(
{1U, Attribute::get(context, Attribute::AttrKind::ReadOnly)},
{2U, Attribute::get(context, Attribute::AttrKind::NoCapture)},
{2U, Attribute::get(context, Attribute::AttrKind::ReadOnly)},
{~0U, Attribute::get(context, Attribute::AttrKind::ArgMemOnly)},
{~0U, arg_mem_only_attribute(context)},
{~0U, Attribute::get(context, Attribute::AttrKind::Convergent)},
{~0U, Attribute::get(context, Attribute::AttrKind::NoUnwind)},
{~0U, Attribute::get(context, Attribute::AttrKind::WillReturn)},
Expand Down Expand Up @@ -1125,7 +1137,7 @@ AIRBuilderResult call_get_texture_info(
{
{1U, Attribute::get(context, Attribute::AttrKind::NoCapture)},
{1U, Attribute::get(context, Attribute::AttrKind::ReadOnly)},
{~0U, Attribute::get(context, Attribute::AttrKind::ArgMemOnly)},
{~0U, arg_mem_only_attribute(context)},
{~0U, Attribute::get(context, Attribute::AttrKind::NoUnwind)},
{~0U, Attribute::get(context, Attribute::AttrKind::WillReturn)},
{~0U, Attribute::get(context, Attribute::AttrKind::ReadOnly)},
Expand Down Expand Up @@ -2023,7 +2035,7 @@ call_set_mesh_properties(pvalue mesh_grid_props, pvalue grid_size) {
{{1U, Attribute::get(context, Attribute::AttrKind::NoCapture)},
{~0U, Attribute::get(context, Attribute::AttrKind::NoUnwind)},
{~0U, Attribute::get(context, Attribute::AttrKind::WillReturn)},
{~0U, Attribute::get(context, Attribute::AttrKind::ArgMemOnly)},
{~0U, arg_mem_only_attribute(context)},
{~0U, Attribute::get(context, Attribute::AttrKind::MustProgress)}}
);
auto fn = (module.getOrInsertFunction(
Expand All @@ -2049,7 +2061,7 @@ call_interpolate_at_center(pvalue interpolant, bool perspective) {
{1U, Attribute::get(context, Attribute::AttrKind::ReadOnly)},
{~0U, Attribute::get(context, Attribute::AttrKind::NoUnwind)},
{~0U, Attribute::get(context, Attribute::AttrKind::WillReturn)},
{~0U, Attribute::get(context, Attribute::AttrKind::ArgMemOnly)},
{~0U, arg_mem_only_attribute(context)},
{~0U, Attribute::get(context, Attribute::AttrKind::ReadOnly)}}
);
auto fn = (module.getOrInsertFunction(
Expand All @@ -2075,7 +2087,7 @@ call_interpolate_at_centroid(pvalue interpolant, bool perspective) {
{1U, Attribute::get(context, Attribute::AttrKind::ReadOnly)},
{~0U, Attribute::get(context, Attribute::AttrKind::NoUnwind)},
{~0U, Attribute::get(context, Attribute::AttrKind::WillReturn)},
{~0U, Attribute::get(context, Attribute::AttrKind::ArgMemOnly)},
{~0U, arg_mem_only_attribute(context)},
{~0U, Attribute::get(context, Attribute::AttrKind::ReadOnly)}}
);
auto fn = (module.getOrInsertFunction(
Expand All @@ -2102,7 +2114,7 @@ AIRBuilderResult call_interpolate_at_offset(
{1U, Attribute::get(context, Attribute::AttrKind::ReadOnly)},
{~0U, Attribute::get(context, Attribute::AttrKind::NoUnwind)},
{~0U, Attribute::get(context, Attribute::AttrKind::WillReturn)},
{~0U, Attribute::get(context, Attribute::AttrKind::ArgMemOnly)},
{~0U, arg_mem_only_attribute(context)},
{~0U, Attribute::get(context, Attribute::AttrKind::ReadOnly)}}
);
auto fn = (module.getOrInsertFunction(
Expand All @@ -2129,7 +2141,7 @@ call_interpolate_at_sample(pvalue interpolant, bool perspective, pvalue index) {
{1U, Attribute::get(context, Attribute::AttrKind::ReadOnly)},
{~0U, Attribute::get(context, Attribute::AttrKind::NoUnwind)},
{~0U, Attribute::get(context, Attribute::AttrKind::WillReturn)},
{~0U, Attribute::get(context, Attribute::AttrKind::ArgMemOnly)}}
{~0U, arg_mem_only_attribute(context)}}
);
auto fn = (module.getOrInsertFunction(
perspective ? "air.interpolate_sample_perspective.v4f32"
Expand All @@ -2154,7 +2166,7 @@ call_set_mesh_render_target_array_index(pvalue mesh, pvalue vid, pvalue render_t
context, {{1U, Attribute::get(context, Attribute::AttrKind::NoCapture)},
{~0U, Attribute::get(context, Attribute::AttrKind::NoUnwind)},
{~0U, Attribute::get(context, Attribute::AttrKind::WillReturn)},
{~0U, Attribute::get(context, Attribute::AttrKind::ArgMemOnly)}}
{~0U, arg_mem_only_attribute(context)}}
);
auto fn = (module.getOrInsertFunction(
"air.set_render_target_array_index_mesh.i32",
Expand All @@ -2177,7 +2189,7 @@ AIRBuilderResult call_set_mesh_viewport_array_index(pvalue mesh, pvalue vid, pva
context, {{1U, Attribute::get(context, Attribute::AttrKind::NoCapture)},
{~0U, Attribute::get(context, Attribute::AttrKind::NoUnwind)},
{~0U, Attribute::get(context, Attribute::AttrKind::WillReturn)},
{~0U, Attribute::get(context, Attribute::AttrKind::ArgMemOnly)}}
{~0U, arg_mem_only_attribute(context)}}
);
auto fn = (module.getOrInsertFunction(
"air.set_viewport_array_index_mesh.i32",
Expand All @@ -2200,7 +2212,7 @@ AIRBuilderResult call_set_mesh_position(pvalue mesh, pvalue vid, pvalue position
context, {{1U, Attribute::get(context, Attribute::AttrKind::NoCapture)},
{~0U, Attribute::get(context, Attribute::AttrKind::NoUnwind)},
{~0U, Attribute::get(context, Attribute::AttrKind::WillReturn)},
{~0U, Attribute::get(context, Attribute::AttrKind::ArgMemOnly)}}
{~0U, arg_mem_only_attribute(context)}}
);
auto fn = (module.getOrInsertFunction(
"air.set_position_mesh",
Expand All @@ -2223,7 +2235,7 @@ AIRBuilderResult call_set_mesh_clip_distance(pvalue mesh, uint32_t idx, pvalue v
context, {{1U, Attribute::get(context, Attribute::AttrKind::NoCapture)},
{~0U, Attribute::get(context, Attribute::AttrKind::NoUnwind)},
{~0U, Attribute::get(context, Attribute::AttrKind::WillReturn)},
{~0U, Attribute::get(context, Attribute::AttrKind::ArgMemOnly)}}
{~0U, arg_mem_only_attribute(context)}}
);
auto fn = (module.getOrInsertFunction(
"air.set_clip_distance_mesh",
Expand All @@ -2247,7 +2259,7 @@ call_set_mesh_vertex_data(pvalue mesh, uint32_t idx, pvalue vid, pvalue value) {
context, {{1U, Attribute::get(context, Attribute::AttrKind::NoCapture)},
{~0U, Attribute::get(context, Attribute::AttrKind::NoUnwind)},
{~0U, Attribute::get(context, Attribute::AttrKind::WillReturn)},
{~0U, Attribute::get(context, Attribute::AttrKind::ArgMemOnly)}}
{~0U, arg_mem_only_attribute(context)}}
);
auto fn = (module.getOrInsertFunction(
"air.set_vertex_data_mesh" + type_overload_suffix(value->getType()),
Expand All @@ -2271,7 +2283,7 @@ call_set_mesh_primitive_data(pvalue mesh, uint32_t idx, pvalue pid, pvalue value
context, {{1U, Attribute::get(context, Attribute::AttrKind::NoCapture)},
{~0U, Attribute::get(context, Attribute::AttrKind::NoUnwind)},
{~0U, Attribute::get(context, Attribute::AttrKind::WillReturn)},
{~0U, Attribute::get(context, Attribute::AttrKind::ArgMemOnly)}}
{~0U, arg_mem_only_attribute(context)}}
);
auto fn = (module.getOrInsertFunction(
"air.set_primitive_data_mesh" + type_overload_suffix(value->getType()),
Expand All @@ -2294,7 +2306,7 @@ AIRBuilderResult call_set_mesh_index(pvalue mesh, pvalue index, pvalue vertex) {
context, {{1U, Attribute::get(context, Attribute::AttrKind::NoCapture)},
{~0U, Attribute::get(context, Attribute::AttrKind::NoUnwind)},
{~0U, Attribute::get(context, Attribute::AttrKind::WillReturn)},
{~0U, Attribute::get(context, Attribute::AttrKind::ArgMemOnly)}}
{~0U, arg_mem_only_attribute(context)}}
);
auto fn = (module.getOrInsertFunction(
"air.set_index_mesh",
Expand All @@ -2317,7 +2329,7 @@ AIRBuilderResult call_set_mesh_primitive_count(pvalue mesh, pvalue count) {
context, {{1U, Attribute::get(context, Attribute::AttrKind::NoCapture)},
{~0U, Attribute::get(context, Attribute::AttrKind::NoUnwind)},
{~0U, Attribute::get(context, Attribute::AttrKind::WillReturn)},
{~0U, Attribute::get(context, Attribute::AttrKind::ArgMemOnly)}}
{~0U, arg_mem_only_attribute(context)}}
);
auto fn = (module.getOrInsertFunction(
"air.set_primitive_count_mesh",
Expand All @@ -2331,4 +2343,4 @@ AIRBuilderResult call_set_mesh_primitive_count(pvalue mesh, pvalue count) {
});
}

}; // namespace dxmt::air
}; // namespace dxmt::air
Loading