Преглед на файлове

Merge pull request #5814 from laytan/wgpu-27.0.2.0

vendor/wgpu: update to 27.0.2.0
gingerBill преди 4 дни
родител
ревизия
c332266e46

+ 1 - 2
src/llvm_backend_proc.cpp

@@ -240,8 +240,6 @@ gb_internal lbProcedure *lb_create_procedure(lbModule *m, Entity *entity, bool i
 			}
 		}
 	}
-	lb_set_linkage_from_entity_flags(p->module, p->value, entity->flags);
-
 
 	if (p->is_foreign) {
 		lb_set_wasm_procedure_import_attributes(p->value, entity, p->name);
@@ -284,6 +282,7 @@ gb_internal lbProcedure *lb_create_procedure(lbModule *m, Entity *entity, bool i
 		LLVMSetLinkage(p->value, LLVMExternalLinkage);
 	}
 
+	lb_set_linkage_from_entity_flags(p->module, p->value, entity->flags);
 
 	if (m->debug_builder) { // Debug Information
 		Type *bt = base_type(p->type);

+ 2 - 2
vendor/wgpu/doc.odin

@@ -12,8 +12,8 @@ You can find a number of examples on [[Odin's official examples repository; http
 **Getting the wgpu-native libraries**
 
 For native support (not the browser), some libraries are required. Fortunately this is
-extremely easy, just download them from the [[releases on GitHub; https://github.com/gfx-rs/wgpu-native/releases/tag/v25.0.2.1]].
-the bindings are for v25.0.2.1 at the moment.
+extremely easy, just download them from the [[releases on GitHub; https://github.com/gfx-rs/wgpu-native/releases/tag/v27.0.2.0]].
+the bindings are for v27.0.2.0 at the moment.
 
 These are expected in the `lib` folder under the same name as they are released (just unzipped).
 By default it will look for a static release version (`wgpu-OS-ARCH-release.a|lib`),

BIN
vendor/wgpu/lib/wgpu-windows-x86_64-msvc-release/lib/wgpu_native.dll


BIN
vendor/wgpu/lib/wgpu-windows-x86_64-msvc-release/lib/wgpu_native.dll.lib


BIN
vendor/wgpu/lib/wgpu-windows-x86_64-msvc-release/lib/wgpu_native.lib


+ 12 - 10
vendor/wgpu/wgpu.odin

@@ -13,7 +13,7 @@ when ODIN_OS == .Windows {
 	@(private) LIB  :: "lib/wgpu-windows-" + ARCH + "-msvc-" + TYPE + "/lib/wgpu_native" + EXT
 
 	when !#exists(LIB) {
-		#panic("Could not find the compiled WGPU Native library at '" + #directory + LIB + "', these can be downloaded from https://github.com/gfx-rs/wgpu-native/releases/tag/v25.0.2.1, make sure to read the README at '" + #directory + "README.md'")
+		#panic("Could not find the compiled WGPU Native library at '" + #directory + LIB + "', these can be downloaded from https://github.com/gfx-rs/wgpu-native/releases/tag/v27.0.2.0, make sure to read the README at '" + #directory + "README.md'")
 	}
 
 	@(export)
@@ -39,7 +39,7 @@ when ODIN_OS == .Windows {
 	@(private) LIB  :: "lib/wgpu-macos-" + ARCH + "-" + TYPE + "/lib/libwgpu_native" + EXT
 
 	when !#exists(LIB) {
-		#panic("Could not find the compiled WGPU Native library at '" + #directory + LIB + "', these can be downloaded from https://github.com/gfx-rs/wgpu-native/releases/tag/v25.0.2.1, make sure to read the README at '" + #directory + "README.md'")
+		#panic("Could not find the compiled WGPU Native library at '" + #directory + LIB + "', these can be downloaded from https://github.com/gfx-rs/wgpu-native/releases/tag/v27.0.2.0, make sure to read the README at '" + #directory + "README.md'")
 	}
 
 	@(export)
@@ -56,7 +56,7 @@ when ODIN_OS == .Windows {
 	@(private) LIB  :: "lib/wgpu-linux-" + ARCH + "-" + TYPE + "/lib/libwgpu_native" + EXT
 
 	when !#exists(LIB) {
-		#panic("Could not find the compiled WGPU Native library at '" + #directory + LIB + "', these can be downloaded from https://github.com/gfx-rs/wgpu-native/releases/tag/v25.0.2.1, make sure to read the README at '" + #directory + "README.md'")
+		#panic("Could not find the compiled WGPU Native library at '" + #directory + LIB + "', these can be downloaded from https://github.com/gfx-rs/wgpu-native/releases/tag/v27.0.2.0, make sure to read the README at '" + #directory + "README.md'")
 	}
 
 	@(export)
@@ -282,8 +282,7 @@ FeatureName :: enum i32 {
 	// Native.
 	PushConstants = 0x00030001,
 	TextureAdapterSpecificFormatFeatures,
-	MultiDrawIndirect,
-	MultiDrawIndirectCount,
+	MultiDrawIndirectCount = 0x00030004,
 	VertexWritableStorage,
 	TextureBindingArray,
 	SampledTextureAndStorageBufferArrayNonUniformIndexing,
@@ -298,16 +297,15 @@ FeatureName :: enum i32 {
 	// TODO: requires wgpu.h api change
 	// AddressModeClampToZero,
 	// AddressModeClampToBorder,
-	// PolygonModeLine,
-	// PolygonModePoint,
-	// ConservativeRasterization,
+	PolygonModeLine = 0x00030013,
+	PolygonModePoint,
+	ConservativeRasterization,
 	// ClearTexture,
 	SpirvShaderPassthrough = 0x00030017,
 	// MultiView,
 	VertexAttribute64bit = 0x00030019,
 	TextureFormatNv12,
-	RayTracingAccelarationStructure,
-	RayQuery,
+	RayQuery = 0x0003001C,
 	ShaderF64,
 	ShaderI16,
 	ShaderPrimitiveIndex,
@@ -317,6 +315,7 @@ FeatureName :: enum i32 {
 	SubgroupBarrier,
 	TimestampQueryInsideEncoders,
 	TimestampQueryInsidePasses,
+	ShaderInt64,
 }
 
 FilterMode :: enum i32 {
@@ -446,6 +445,8 @@ SType :: enum i32 {
 	BindGroupLayoutEntryExtras,
 	QuerySetDescriptorExtras,
 	SurfaceConfigurationExtras,
+	SurfaceSourceSwapChainPanel,
+	PrimitiveStateExtras,
 
 	// Odin.
 	SurfaceSourceCanvasHTMLSelector = 0x00040001,
@@ -624,6 +625,7 @@ TextureFormat :: enum i32 {
 	Rgba16Snorm,
 	// From FeatureName.TextureFormatNv12
 	NV12,
+	P010,
 }
 
 TextureSampleType :: enum i32 {

+ 28 - 3
vendor/wgpu/wgpu_native_types.odin

@@ -2,8 +2,8 @@ package wgpu
 
 import "base:runtime"
 
-BINDINGS_VERSION        :: [4]u8{25, 0, 2, 1}
-BINDINGS_VERSION_STRING :: "25.0.2.1"
+BINDINGS_VERSION        :: [4]u8{27, 0, 2, 0}
+BINDINGS_VERSION_STRING :: "27.0.2.0"
 
 LogLevel :: enum i32 {
 	Off,
@@ -79,9 +79,10 @@ InstanceExtras :: struct {
 	dx12ShaderCompiler: Dx12Compiler,
 	gles3MinorVersion: Gles3MinorVersion,
 	glFenceBehaviour: GLFenceBehaviour,
-	dxilPath: StringView,
 	dxcPath: StringView,
 	dcxMaxShaderModel: DxcMaxShaderModel,
+	budgetForDeviceCreation: ^u8,
+	budgetForDeviceLoss: ^u8,
 }
 
 DeviceExtras :: struct {
@@ -191,6 +192,30 @@ SurfaceConfigurationExtras :: struct {
 	desiredMaximumFrameLatency: u32,
 }
 
+/**
+* Chained in `SurfaceDescriptor` to make a `Surface` wrapping a WinUI [[ SwapChainPanel ; https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.swapchainpanel ]].
+*/
+SurfaceSourceSwapChainPanel :: struct {
+	using chain: ChainedStruct,
+    /**
+     * A pointer to the [[ ISwapChainPanelNative ; https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/win32/microsoft.ui.xaml.media.dxinterop/nn-microsoft-ui-xaml-media-dxinterop-iswapchainpanelnative ]]
+     * interface of the `SwapChainPanel` that will be wrapped by the `Surface`.
+     */
+	panelNative: rawptr,
+}
+
+PolygonMode :: enum i32 {
+	Fill,
+	Line,
+	Point,
+}
+
+PrimitiveStateExtras :: struct {
+	using chain: ChainedStruct,
+	polygonMode: PolygonMode,
+	conservative: b32,
+}
+
 LogCallback :: #type proc "c" (level: LogLevel, message: StringView, userdata: rawptr)
 
 // Wrappers