gpu: convert *opaque -> opaque for SwapChain

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-29 23:00:48 -07:00 committed by Stephen Gutekanst
parent 2c1a8240c5
commit f59435f0b0
4 changed files with 11 additions and 11 deletions

View file

@ -105,7 +105,7 @@ pub const Device = opaque {
return Impl.deviceCreateShaderModule(device, descriptor);
}
pub inline fn createSwapChain(device: *Device, surface: ?Surface, descriptor: *const SwapChainDescriptor) SwapChain {
pub inline fn createSwapChain(device: *Device, surface: ?Surface, descriptor: *const SwapChainDescriptor) *SwapChain {
return Impl.deviceCreateSwapChain(device, surface, descriptor);
}

View file

@ -11,7 +11,7 @@ pub const Instance = opaque {
next_in_chain: ?*const ChainedStruct = null,
};
pub inline fn createSurface(instance: *Instance, descriptor: *const SurfaceDescriptor) Surface {
pub inline fn createSurface(instance: *Instance, descriptor: *const SurfaceDescriptor) *Surface {
return Impl.instanceCreateSurface(instance, descriptor);
}

View file

@ -1,12 +1,12 @@
const ChainedStruct = @import("types.zig").ChainedStruct;
const Impl = @import("interface.zig").Impl;
pub const Surface = *opaque {
pub inline fn reference(surface: Surface) void {
pub const Surface = opaque {
pub inline fn reference(surface: *Surface) void {
Impl.surfaceReference(surface);
}
pub inline fn release(surface: Surface) void {
pub inline fn release(surface: *Surface) void {
Impl.surfaceRelease(surface);
}
};

View file

@ -6,24 +6,24 @@ const TextureFormat = @import("texture.zig").TextureFormat;
const TextureView = @import("texture_view.zig").TextureView;
const Impl = @import("interface.zig").Impl;
pub const SwapChain = *opaque {
pub inline fn configure(swap_chain: SwapChain, format: TextureFormat, allowed_usage: TextureUsageFlags, width: u32, height: u32) void {
pub const SwapChain = opaque {
pub inline fn configure(swap_chain: *SwapChain, format: TextureFormat, allowed_usage: TextureUsageFlags, width: u32, height: u32) void {
Impl.swapChainConfigure(swap_chain, format, allowed_usage, width, height);
}
pub inline fn getCurrentTextureView(swap_chain: SwapChain) TextureView {
pub inline fn getCurrentTextureView(swap_chain: *SwapChain) TextureView {
return Impl.swapChainGetCurrentTextureView(swap_chain);
}
pub inline fn present(swap_chain: SwapChain) void {
pub inline fn present(swap_chain: *SwapChain) void {
Impl.swapChainPresent(swap_chain);
}
pub inline fn reference(swap_chain: SwapChain) void {
pub inline fn reference(swap_chain: *SwapChain) void {
Impl.swapChainReference(swap_chain);
}
pub inline fn release(swap_chain: SwapChain) void {
pub inline fn release(swap_chain: *SwapChain) void {
Impl.swapChainRelease(swap_chain);
}
};