|
@@ -2,6 +2,9 @@ package wgpu
|
|
|
|
|
|
import "base:runtime"
|
|
import "base:runtime"
|
|
|
|
|
|
|
|
+BINDINGS_VERSION :: [4]u8{24, 0, 0, 2}
|
|
|
|
+BINDINGS_VERSION_STRING :: "24.0.0.2"
|
|
|
|
+
|
|
LogLevel :: enum i32 {
|
|
LogLevel :: enum i32 {
|
|
Off,
|
|
Off,
|
|
Error,
|
|
Error,
|
|
@@ -59,30 +62,21 @@ InstanceExtras :: struct {
|
|
flags: InstanceFlags,
|
|
flags: InstanceFlags,
|
|
dx12ShaderCompiler: Dx12Compiler,
|
|
dx12ShaderCompiler: Dx12Compiler,
|
|
gles3MinorVersion: Gles3MinorVersion,
|
|
gles3MinorVersion: Gles3MinorVersion,
|
|
- dxilPath: cstring,
|
|
|
|
- dxcPath: cstring,
|
|
|
|
|
|
+ dxilPath: StringView,
|
|
|
|
+ dxcPath: StringView,
|
|
}
|
|
}
|
|
|
|
|
|
DeviceExtras :: struct {
|
|
DeviceExtras :: struct {
|
|
using chain: ChainedStruct,
|
|
using chain: ChainedStruct,
|
|
- tracePath: cstring,
|
|
|
|
|
|
+ tracePath: StringView,
|
|
}
|
|
}
|
|
|
|
|
|
NativeLimits :: struct {
|
|
NativeLimits :: struct {
|
|
|
|
+ chain: ChainedStructOut,
|
|
maxPushConstantSize: u32,
|
|
maxPushConstantSize: u32,
|
|
maxNonSamplerBindings: u32,
|
|
maxNonSamplerBindings: u32,
|
|
}
|
|
}
|
|
|
|
|
|
-RequiredLimitsExtras :: struct {
|
|
|
|
- using chain: ChainedStruct,
|
|
|
|
- limits: NativeLimits,
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-SupportedLimitsExtras :: struct {
|
|
|
|
- using chain: ChainedStructOut,
|
|
|
|
- limits: NativeLimits,
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
PushConstantRange :: struct {
|
|
PushConstantRange :: struct {
|
|
stages: ShaderStageFlags,
|
|
stages: ShaderStageFlags,
|
|
start: u32,
|
|
start: u32,
|
|
@@ -97,29 +91,29 @@ PipelineLayoutExtras :: struct {
|
|
|
|
|
|
SubmissionIndex :: distinct u64
|
|
SubmissionIndex :: distinct u64
|
|
|
|
|
|
-WrappedSubmissionIndex :: struct {
|
|
|
|
- queue: Queue,
|
|
|
|
- submissionIndex: SubmissionIndex,
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
ShaderDefine :: struct {
|
|
ShaderDefine :: struct {
|
|
- name: cstring,
|
|
|
|
- value: cstring,
|
|
|
|
|
|
+ name: StringView,
|
|
|
|
+ value: StringView,
|
|
}
|
|
}
|
|
|
|
|
|
ShaderModuleGLSLDescriptor :: struct {
|
|
ShaderModuleGLSLDescriptor :: struct {
|
|
using chain: ChainedStruct,
|
|
using chain: ChainedStruct,
|
|
stage: ShaderStage,
|
|
stage: ShaderStage,
|
|
- code: cstring,
|
|
|
|
|
|
+ code: StringView,
|
|
defineCount: uint,
|
|
defineCount: uint,
|
|
defines: [^]ShaderDefine `fmt:"v,defineCount"`,
|
|
defines: [^]ShaderDefine `fmt:"v,defineCount"`,
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ShaderModuleDescriptorSpirV :: struct {
|
|
|
|
+ label: StringView,
|
|
|
|
+ sourceSize: u32,
|
|
|
|
+ source: [^]u32 `fmt:"v,sourceSize"`,
|
|
|
|
+}
|
|
|
|
+
|
|
RegistryReport :: struct {
|
|
RegistryReport :: struct {
|
|
numAllocated: uint,
|
|
numAllocated: uint,
|
|
numKeptFromUser: uint,
|
|
numKeptFromUser: uint,
|
|
numReleasedFromUser: uint,
|
|
numReleasedFromUser: uint,
|
|
- numErrors: uint,
|
|
|
|
elementSize: uint,
|
|
elementSize: uint,
|
|
}
|
|
}
|
|
|
|
|
|
@@ -135,6 +129,7 @@ HubReport :: struct {
|
|
renderBundles: RegistryReport,
|
|
renderBundles: RegistryReport,
|
|
renderPipelines: RegistryReport,
|
|
renderPipelines: RegistryReport,
|
|
computePipelines: RegistryReport,
|
|
computePipelines: RegistryReport,
|
|
|
|
+ pipelineCaches: RegistryReport,
|
|
querySets: RegistryReport,
|
|
querySets: RegistryReport,
|
|
buffers: RegistryReport,
|
|
buffers: RegistryReport,
|
|
textures: RegistryReport,
|
|
textures: RegistryReport,
|
|
@@ -144,11 +139,7 @@ HubReport :: struct {
|
|
|
|
|
|
GlobalReport :: struct {
|
|
GlobalReport :: struct {
|
|
surfaces: RegistryReport,
|
|
surfaces: RegistryReport,
|
|
- backendType: BackendType,
|
|
|
|
- vulkan: HubReport,
|
|
|
|
- metal: HubReport,
|
|
|
|
- dx12: HubReport,
|
|
|
|
- gl: HubReport,
|
|
|
|
|
|
+ hub: HubReport,
|
|
}
|
|
}
|
|
|
|
|
|
InstanceEnumerateAdapterOptions :: struct {
|
|
InstanceEnumerateAdapterOptions :: struct {
|
|
@@ -182,7 +173,7 @@ SurfaceConfigurationExtras :: struct {
|
|
desiredMaximumFrameLatency: i32,
|
|
desiredMaximumFrameLatency: i32,
|
|
}
|
|
}
|
|
|
|
|
|
-LogCallback :: #type proc "c" (level: LogLevel, message: cstring, userdata: rawptr)
|
|
|
|
|
|
+LogCallback :: #type proc "c" (level: LogLevel, message: StringView, userdata: rawptr)
|
|
|
|
|
|
// Wrappers
|
|
// Wrappers
|
|
|
|
|
|
@@ -210,3 +201,4 @@ ConvertLogLevel :: proc {
|
|
ConvertOdinToWGPULogLevel,
|
|
ConvertOdinToWGPULogLevel,
|
|
ConvertWGPUToOdinLogLevel,
|
|
ConvertWGPUToOdinLogLevel,
|
|
}
|
|
}
|
|
|
|
+
|