diff options
| author | Laytan Laats <laytanlaats@hotmail.com> | 2025-02-27 18:39:29 +0100 |
|---|---|---|
| committer | Laytan Laats <laytanlaats@hotmail.com> | 2025-02-27 18:39:29 +0100 |
| commit | 1942a538d89ec1828b7bcb75dd8ea1b62a09dcdf (patch) | |
| tree | e30126c5b2de23acddc8523ce6998ec7e6cda081 | |
| parent | 1cb28f7f73b093fb7042e9cd3d94713e6c904436 (diff) | |
wgpu: fix wrapper and add more wrappers
| -rw-r--r-- | vendor/wgpu/wgpu.odin | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/vendor/wgpu/wgpu.odin b/vendor/wgpu/wgpu.odin index 8dfbaa5c6..aed501d4c 100644 --- a/vendor/wgpu/wgpu.odin +++ b/vendor/wgpu/wgpu.odin @@ -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, |