mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-09 14:32:41 +00:00
wgpu: fix wrapper and add more wrappers
This commit is contained in:
20
vendor/wgpu/wgpu.odin
vendored
20
vendor/wgpu/wgpu.odin
vendored
@@ -1530,8 +1530,10 @@ foreign libwgpu {
|
||||
DeviceCreateShaderModule :: proc(device: Device, descriptor: /* const */ ^ShaderModuleDescriptor) -> ShaderModule ---
|
||||
DeviceCreateTexture :: proc(device: Device, descriptor: /* const */ ^TextureDescriptor) -> Texture ---
|
||||
DeviceDestroy :: proc(device: Device) ---
|
||||
DeviceGetAdapterInfo :: proc(device: Device, info: ^AdapterInfo) -> Status ---
|
||||
DeviceGetFeatures :: proc(device: Device, features: ^SupportedFeatures) ---
|
||||
@(link_name="wgpuDeviceGetAdapterInfo")
|
||||
RawDeviceGetAdapterInfo :: proc(device: Device, info: ^AdapterInfo) -> Status ---
|
||||
@(link_name="wgpuDeviceGetFeatures")
|
||||
RawDeviceGetFeatures :: proc(device: Device, features: ^SupportedFeatures) ---
|
||||
@(link_name="wgpuDeviceGetLimits")
|
||||
RawDeviceGetLimits :: proc(device: Device, limits: ^Limits) -> Status ---
|
||||
DeviceGetLostFuture :: proc(device: Device) -> Future ---
|
||||
@@ -1721,8 +1723,8 @@ AdapterGetLimits :: proc "c" (adapter: Adapter) -> (limits: Limits, status: Stat
|
||||
return
|
||||
}
|
||||
|
||||
AdapterGetInfo :: proc "c" (adapter: Adapter) -> (info: AdapterInfo) {
|
||||
RawAdapterGetInfo(adapter, &info)
|
||||
AdapterGetInfo :: proc "c" (adapter: Adapter) -> (info: AdapterInfo, status: Status) {
|
||||
status = RawAdapterGetInfo(adapter, &info)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1774,6 +1776,16 @@ DeviceGetLimits :: proc "c" (device: Device) -> (limits: Limits, status: Status)
|
||||
return
|
||||
}
|
||||
|
||||
DeviceGetAdapterInfo :: proc "c" (device: Device) -> (info: AdapterInfo, status: Status) {
|
||||
status = RawDeviceGetAdapterInfo(device, &info)
|
||||
return
|
||||
}
|
||||
|
||||
DeviceGetFeatures :: proc "c" (device: Device) -> (features: SupportedFeatures) {
|
||||
RawDeviceGetFeatures(device, &features)
|
||||
return
|
||||
}
|
||||
|
||||
BufferWithDataDescriptor :: struct {
|
||||
/* NULLABLE */ label: StringView,
|
||||
usage: BufferUsageFlags,
|
||||
|
||||
Reference in New Issue
Block a user