mirror of
https://github.com/odin-lang/Odin.git
synced 2026-07-10 18:09:32 +00:00
vendor/wgpu: update to v29.0.1.1
This commit is contained in:
4
vendor/wgpu/doc.odin
vendored
4
vendor/wgpu/doc.odin
vendored
@@ -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/v29.0.0.0]].
|
||||
the bindings are for v29.0.0.0 at the moment.
|
||||
extremely easy, just download them from the [[releases on GitHub; https://github.com/gfx-rs/wgpu-native/releases/tag/v29.0.1.1]].
|
||||
the bindings are for v29.0.1.1 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`),
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:681c1f28050eebe67e31fc40be1361abfebf4429c181c150f0f4a5044c144fc9
|
||||
size 9099264
|
||||
oid sha256:5e26249c40dcdac43f5adca3195fcf40e4ec6c67472b38510165f411fcc198e7
|
||||
size 9117696
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9f3818cf86365e01b203d7ddf57d134061687ded55ac7d38a117b170f78c1dea
|
||||
size 61760
|
||||
oid sha256:261adb64aef86a3ebaf7f6f370d14bed083f93e25e2eec70a7c54d33954e4572
|
||||
size 62344
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:021c502f17235ceed0d0dde197a9c10548224bd34b27a56a81aa938d8b4102a4
|
||||
size 54820956
|
||||
oid sha256:c47ed51546823c02c6d33e24a58e62e0535442ca1897a17d2305b2e55df35729
|
||||
size 54811560
|
||||
|
||||
32
vendor/wgpu/wgpu.js
vendored
32
vendor/wgpu/wgpu.js
vendored
@@ -26,7 +26,7 @@ const ENUMS = {
|
||||
CompareFunction: [undefined, "never", "less", "equal", "less-equal", "greater", "not-equal", "greater-equal", "always", ],
|
||||
TextureDimension: [undefined, "1d", "2d", "3d", ],
|
||||
ErrorType: [undefined, "no-error", "validation", "out-of-memory", "internal", "unknown", ],
|
||||
WGSLLanguageFeatureName: [undefined, "readonly_and_readwrite_storage_textures", "packed_4x8_integer_dot_product", "unrestricted_pointer_parameters", "pointer_composite_access", "uniform_buffer_standard_layout", "subgroup_id", "texture_and_sampler_let", "subgroup_uniformity", "texture_formats_tier1" ],
|
||||
WGSLLanguageFeatureName: [undefined, "readonly_and_readwrite_storage_textures", "packed_4x8_integer_dot_product", "unrestricted_pointer_parameters", "pointer_composite_access", "uniform_buffer_standard_layout", "subgroup_id", "texture_and_sampler_let", "subgroup_uniformity", "texture_formats_tier1", "linear_indexing" ],
|
||||
PowerPreference: [undefined, "low-power", "high-performance", ],
|
||||
CompositeAlphaMode: ["auto", "opaque", "premultiplied", "unpremultiplied", "inherit", ],
|
||||
StencilOperation: [undefined, "keep", "zero", "replace", "invert", "increment-clamp", "decrement-clamp", "increment-wrap", "decrement-wrap", ],
|
||||
@@ -1806,6 +1806,16 @@ class WebGPUInterface {
|
||||
computePassEncoder.setBindGroup(groupIndex, bindGroup, dynamicOffsets);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {number} computePassEncoderIdx
|
||||
* @param {number} offset
|
||||
* @param {number} data
|
||||
* @param {number|BigInt} size
|
||||
*/
|
||||
wgpuComputePassEncoderSetImmediates: (computePassEncoderIdx, offset, data, size) {
|
||||
console.warn("wgpuComputePassEncoderSetImmediates: unimplemented in browsers at the time of writing");
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {number} computePassEncoderIdx
|
||||
* @param {number} pipelineIdx
|
||||
@@ -2696,6 +2706,16 @@ class WebGPUInterface {
|
||||
renderBundleEncoder.setBindGroup(groupIndex, group, dynamicOffsets);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {number} renderBundleEncoderIdx
|
||||
* @param {number} offset
|
||||
* @param {number} data
|
||||
* @param {number|BigInt} size
|
||||
*/
|
||||
wgpuRenderBundleEncoderSetImmediates: (renderBundleEncoderIdx, offset, data, size) {
|
||||
console.warn("wgpuRenderBundleEncoderSetImmediates: unimplemented in browsers at the time of writing");
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {number} renderBundleEncoderIdx
|
||||
* @param {number} bufferIdx
|
||||
@@ -2893,6 +2913,16 @@ class WebGPUInterface {
|
||||
renderPassEncoder.setBindGroup(groupIndex, group, dynamicOffsets);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {number} renderPassEncoderIdx
|
||||
* @param {number} offset
|
||||
* @param {number} data
|
||||
* @param {number|BigInt} size
|
||||
*/
|
||||
wgpuRenderPassEncoderSetImmediates: (renderPassEncoderIdx, offset, data, size) {
|
||||
console.warn("wgpuRenderPassEncoderSetImmediates: unimplemented in browsers at the time of writing");
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {number} renderPassEncoderIdx
|
||||
* @param {number} colorPtr
|
||||
|
||||
67
vendor/wgpu/wgpu.odin
vendored
67
vendor/wgpu/wgpu.odin
vendored
@@ -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/v29.0.0.0, make sure to read the docs at '" + #directory + "doc.odin'")
|
||||
#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/v29.0.1.1, make sure to read the docs at '" + #directory + "doc.odin'")
|
||||
}
|
||||
|
||||
@(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/v29.0.0.0, make sure to read the docs at '" + #directory + "doc.odin'")
|
||||
#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/v29.0.1.1, make sure to read the docs at '" + #directory + "doc.odin'")
|
||||
}
|
||||
|
||||
@(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/v29.0.0.0, make sure to read the docs at '" + #directory + "doc.odin'")
|
||||
#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/v29.0.1.1, make sure to read the docs at '" + #directory + "doc.odin'")
|
||||
}
|
||||
|
||||
@(export)
|
||||
@@ -123,6 +123,10 @@ AddressMode :: enum i32 {
|
||||
ClampToEdge = 0x00000001,
|
||||
Repeat = 0x00000002,
|
||||
MirrorRepeat = 0x00000003,
|
||||
|
||||
// Native.
|
||||
|
||||
ClampToBorder = 0x00000004,
|
||||
}
|
||||
|
||||
BackendType :: enum i32 {
|
||||
@@ -309,16 +313,14 @@ FeatureName :: enum i32 {
|
||||
TextureCompressionAstcHdr,
|
||||
MappablePrimaryBuffers = 0x0003000E,
|
||||
BufferBindingArray,
|
||||
UniformBufferAndStorageTextureArrayNonUniformIndexing,
|
||||
// TODO: requires wgpu.h api change
|
||||
// AddressModeClampToZero,
|
||||
// AddressModeClampToBorder,
|
||||
StorageTextureArrayNonUniformIndexing = 0x00030010,
|
||||
AdressModeClampToZero = 0x00030011,
|
||||
AdressModeClampToBorder = 0x00030012,
|
||||
PolygonModeLine = 0x00030013,
|
||||
PolygonModePoint,
|
||||
ConservativeRasterization,
|
||||
// ClearTexture,
|
||||
SpirvShaderPassthrough = 0x00030017,
|
||||
// MultiView,
|
||||
ClearTexture,
|
||||
MultiView = 0x00030018,
|
||||
VertexAttribute64bit = 0x00030019,
|
||||
TextureFormatNv12,
|
||||
RayQuery = 0x0003001C,
|
||||
@@ -331,6 +333,37 @@ FeatureName :: enum i32 {
|
||||
TimestampQueryInsideEncoders,
|
||||
TimestampQueryInsidePasses,
|
||||
ShaderInt64,
|
||||
ShaderFloat32Atomic,
|
||||
TextureAtomic,
|
||||
TextureFormatP010,
|
||||
// TODO: requires wgpu.h api change
|
||||
// ExternalTexture,
|
||||
PipelineCache = 0x0003002B,
|
||||
ShaderInt64AtomicMinMax,
|
||||
ShaderInt64AtomicAllOps,
|
||||
// TODO: requires wgpu.h api change
|
||||
// VulkanGoogleDisplayTiming,
|
||||
// VulkanExternalMemoryWin32,
|
||||
TextureInt64Atomic = 0x00030030,
|
||||
// TODO: not implemented yet, see https://github.com/gfx-rs/wgpu/issues/7149
|
||||
UniformBufferBindingArrays,
|
||||
// TODO: requires wgpu.h api change
|
||||
// MeshShader,
|
||||
// RayHitVertexReturn,
|
||||
// MeshShaderMultiview,
|
||||
// ExtendedAccelerationStructureVertexFormat,
|
||||
// PassThroughShaders,
|
||||
ShaderBarycentrics = 0x00030037,
|
||||
SelectiveMultiview,
|
||||
// TODO: requires wgpu.h api change
|
||||
// MeshShaderPoints,
|
||||
MultisampleArray = 0x0003003A,
|
||||
CooperativeMatrix,
|
||||
ShaderPerVertex,
|
||||
ShaderDrawIndex,
|
||||
AccelerationStructureBindingArray,
|
||||
MemoryDecorationCoherent,
|
||||
MemoryDecorationVolative,
|
||||
}
|
||||
|
||||
FilterMode :: enum i32 {
|
||||
@@ -505,9 +538,7 @@ SType :: enum i32 {
|
||||
// Native.
|
||||
DeviceExtras = 0x00030001,
|
||||
NativeLimits,
|
||||
PipelineLayoutExtras,
|
||||
ShaderSourceGLSL,
|
||||
SupportedLimitsExtras,
|
||||
InstanceExtras,
|
||||
BindGroupEntryExtras,
|
||||
BindGroupLayoutEntryExtras,
|
||||
@@ -515,6 +546,7 @@ SType :: enum i32 {
|
||||
SurfaceConfigurationExtras,
|
||||
SurfaceSourceSwapChainPanel,
|
||||
PrimitiveStateExtras,
|
||||
SamplerDescriptorExtras,
|
||||
|
||||
// Odin.
|
||||
SurfaceSourceCanvasHTMLSelector = 0x00040001,
|
||||
@@ -652,13 +684,6 @@ TextureFormat :: enum i32 {
|
||||
|
||||
// Native.
|
||||
|
||||
// From FeatureName.TextureFormat16bitNorm
|
||||
NativeR16Unorm = 0x00030001,
|
||||
NativeR16Snorm,
|
||||
Rg16Unorm,
|
||||
Rg16Snorm,
|
||||
Rgba16Unorm,
|
||||
Rgba16Snorm,
|
||||
NV12,
|
||||
P010,
|
||||
}
|
||||
@@ -754,6 +779,7 @@ WGSLLanguageFeatureName :: enum i32 {
|
||||
TextureAndSamplerLet = 0x00000007,
|
||||
SubgroupUniformity = 0x00000008,
|
||||
TextureFormatsTier1 = 0x00000009,
|
||||
LinearIndexing = 0x0000000A,
|
||||
}
|
||||
|
||||
BufferUsage :: enum i32 {
|
||||
@@ -1635,6 +1661,7 @@ foreign libwgpu {
|
||||
ComputePassEncoderPushDebugGroup :: proc(computePassEncoder: ComputePassEncoder, groupLabel: StringView) ---
|
||||
@(link_name="wgpuComputePassEncoderSetBindGroup")
|
||||
RawComputePassEncoderSetBindGroup :: proc(computePassEncoder: ComputePassEncoder, groupIndex: u32, /* NULLABLE */ group: BindGroup, dynamicOffsetCount: uint, dynamicOffsets: /* const */ [^]u32) ---
|
||||
ComputePassEncoderSetImmediates :: proc(computePassEncoder: ComputePassEncoder, offset: u32, data: rawptr, size: uint) ---
|
||||
ComputePassEncoderSetLabel :: proc(computePassEncoder: ComputePassEncoder, label: StringView) ---
|
||||
ComputePassEncoderSetPipeline :: proc(computePassEncoder: ComputePassEncoder, pipeline: ComputePipeline) ---
|
||||
ComputePassEncoderAddRef :: proc(computePassEncoder: ComputePassEncoder) ---
|
||||
@@ -1731,6 +1758,7 @@ foreign libwgpu {
|
||||
RenderBundleEncoderPushDebugGroup :: proc(renderBundleEncoder: RenderBundleEncoder, groupLabel: StringView) ---
|
||||
@(link_name="wgpuRenderBundleEncoderSetBindGroup")
|
||||
RawRenderBundleEncoderSetBindGroup :: proc(renderBundleEncoder: RenderBundleEncoder, groupIndex: u32, /* NULLABLE */ group: BindGroup, dynamicOffsetCount: uint, dynamicOffsets: /* const */ [^]u32) ---
|
||||
RenderBundleEncoderSetImmediates :: proc(renderBundleEncoder: RenderBundleEncoder, offset: u32, data: rawptr, size: uint) ---
|
||||
RenderBundleEncoderSetIndexBuffer :: proc(renderBundleEncoder: RenderBundleEncoder, buffer: Buffer, format: IndexFormat, offset: u64, size: u64) ---
|
||||
RenderBundleEncoderSetLabel :: proc(renderBundleEncoder: RenderBundleEncoder, label: StringView) ---
|
||||
RenderBundleEncoderSetPipeline :: proc(renderBundleEncoder: RenderBundleEncoder, pipeline: RenderPipeline) ---
|
||||
@@ -1753,6 +1781,7 @@ foreign libwgpu {
|
||||
RenderPassEncoderPushDebugGroup :: proc(renderPassEncoder: RenderPassEncoder, groupLabel: StringView) ---
|
||||
@(link_name="wgpuRenderPassEncoderSetBindGroup")
|
||||
RawRenderPassEncoderSetBindGroup :: proc(renderPassEncoder: RenderPassEncoder, groupIndex: u32, /* NULLABLE */ group: BindGroup, dynamicOffsetCount: uint, dynamicOffsets: /* const */ [^]u32) ---
|
||||
RenderPassEncoderSetImmediates :: proc(renderPassEncoder: RenderPassEncoder, offset: u32, data: rawptr, size: uint) ---
|
||||
RenderPassEncoderSetBlendConstant :: proc(renderPassEncoder: RenderPassEncoder, color: /* const */ ^Color) ---
|
||||
RenderPassEncoderSetIndexBuffer :: proc(renderPassEncoder: RenderPassEncoder, buffer: Buffer, format: IndexFormat, offset: u64, size: u64) ---
|
||||
RenderPassEncoderSetLabel :: proc(renderPassEncoder: RenderPassEncoder, label: StringView) ---
|
||||
|
||||
8
vendor/wgpu/wgpu_native.odin
vendored
8
vendor/wgpu/wgpu_native.odin
vendored
@@ -27,10 +27,6 @@ foreign libwgpu {
|
||||
DeviceGetNativeMetalCommandQueue :: proc(device: Device) -> rawptr ---
|
||||
DeviceGetNativeMetalTexture :: proc(device: Device) -> rawptr ---
|
||||
|
||||
RenderPassEncoderSetImmediates :: proc(encoder: RenderPassEncoder, offset: u32, sizeBytes: u32, data: rawptr) ---
|
||||
ComputePassEncoderSetImmediates :: proc(encoder: ComputePassEncoder, offset: u32, sizeBytes: u32, data: rawptr) ---
|
||||
RenderBundleEncoderSetImmediates :: proc(encoder: RenderBundleEncoder, offset: u32, sizeBytes: u32, data: rawptr) ---
|
||||
|
||||
RenderPassEncoderMultiDrawIndirect :: proc(encoder: RenderPassEncoder, buffer: Buffer, offset: u64, count: u32) ---
|
||||
RenderPassEncoderMultiDrawIndexedIndirect :: proc(encoder: RenderPassEncoder, buffer: Buffer, offset: u64, count: u32) ---
|
||||
|
||||
@@ -47,6 +43,10 @@ foreign libwgpu {
|
||||
|
||||
DeviceStartGraphicsDebuggerCapture :: proc(device: Device) -> b32 ---
|
||||
DeviceStopGraphicsDebuggerCapture :: proc(device: Device) ---
|
||||
|
||||
CommandEncoderClearTexture :: proc(commandEncoder: CommandEncoder, texture: Texture, range: /* const */ ^ImageSubresourceRange = nil) ---
|
||||
|
||||
DeviceCreateShaderModuleTrusted :: proc(device: Device, descriptor: /* const */ ^ShaderModuleDescriptor, runtimeChecks: ShaderRuntimeChecks) -> ShaderModule ---
|
||||
}
|
||||
|
||||
GenerateReport :: proc "c" (instance: Instance) -> (report: GlobalReport) {
|
||||
|
||||
42
vendor/wgpu/wgpu_native_types.odin
vendored
42
vendor/wgpu/wgpu_native_types.odin
vendored
@@ -2,8 +2,8 @@ package wgpu
|
||||
|
||||
import "base:runtime"
|
||||
|
||||
BINDINGS_VERSION :: [4]u8{29, 0, 0, 0}
|
||||
BINDINGS_VERSION_STRING :: "29.0.0.0"
|
||||
BINDINGS_VERSION :: [4]u8{29, 0, 1, 1}
|
||||
BINDINGS_VERSION_STRING :: "29.0.1.1"
|
||||
|
||||
LogLevel :: enum i32 {
|
||||
Off,
|
||||
@@ -138,14 +138,10 @@ DeviceExtras :: struct {
|
||||
|
||||
NativeLimits :: struct {
|
||||
using chain: ChainedStruct,
|
||||
maxImmediateSize: u32,
|
||||
maxNonSamplerBindings: u32,
|
||||
maxBindingArrayElementsPerShaderStage: u32,
|
||||
}
|
||||
|
||||
PipelineLayoutExtras :: struct {
|
||||
using chain: ChainedStruct,
|
||||
immediateDataSize: u32,
|
||||
maxBindingArraySamplerElementsPerShaderStage: u32,
|
||||
maxMultiviewCount: u32,
|
||||
}
|
||||
|
||||
SubmissionIndex :: distinct u64
|
||||
@@ -258,6 +254,36 @@ PrimitiveStateExtras :: struct {
|
||||
|
||||
LogCallback :: #type proc "c" (level: LogLevel, message: StringView, userdata: rawptr)
|
||||
|
||||
ImageSubresourceRange :: struct {
|
||||
aspect: TextureAspect,
|
||||
baseMipLevel: u32,
|
||||
mipLevelCount: u32,
|
||||
baseArrayLayer: u32,
|
||||
arrayLayerCount: u32,
|
||||
}
|
||||
|
||||
ShaderRuntimeCheck :: enum i32 {
|
||||
BoundsChecks,
|
||||
ForceLoopBounding,
|
||||
RayQueryInitializationTracking,
|
||||
TaskShaderDispatchTracking,
|
||||
MeshShaderPrimitiveIndicesClamp,
|
||||
}
|
||||
ShaderRuntimeChecks :: bit_set[ShaderRuntimeCheck; Flags]
|
||||
|
||||
SamplerBorderColor :: enum i32 {
|
||||
Undefined,
|
||||
TransparentBlack,
|
||||
OpaqueBlack,
|
||||
OpaqueWhite,
|
||||
Zero,
|
||||
}
|
||||
|
||||
SamplerDescriptorExtras :: struct {
|
||||
using chain: ChainedStruct,
|
||||
samplerBoderColor: SamplerBorderColor,
|
||||
}
|
||||
|
||||
// Wrappers
|
||||
|
||||
ConvertOdinToWGPULogLevel :: proc(level: runtime.Logger_Level) -> LogLevel {
|
||||
|
||||
Reference in New Issue
Block a user