gpu: convert *opaque -> opaque for TextureView

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-29 23:01:55 -07:00 committed by Stephen Gutekanst
parent f59435f0b0
commit 3589e9cbaf
4 changed files with 7 additions and 7 deletions

View file

@ -32,7 +32,7 @@ pub const ExternalTextureBindingLayout = extern struct {
pub const ExternalTextureDescriptor = extern struct { pub const ExternalTextureDescriptor = extern struct {
next_in_chain: ?*const ChainedStruct = null, next_in_chain: ?*const ChainedStruct = null,
label: ?[*:0]const u8 = null, label: ?[*:0]const u8 = null,
plane0: TextureView, plane0: *TextureView,
plane1: ?TextureView, plane1: ?TextureView,
do_yuv_to_rgb_conversion_only: bool = false, do_yuv_to_rgb_conversion_only: bool = false,
// TODO: dawn.json says length 12, does it mean array length? // TODO: dawn.json says length 12, does it mean array length?

View file

@ -11,7 +11,7 @@ pub const SwapChain = opaque {
Impl.swapChainConfigure(swap_chain, format, allowed_usage, width, height); 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); return Impl.swapChainGetCurrentTextureView(swap_chain);
} }

View file

@ -8,7 +8,7 @@ const Impl = @import("interface.zig").Impl;
const copy_stride_undefined = @import("main.zig").copy_stride_undefined; const copy_stride_undefined = @import("main.zig").copy_stride_undefined;
pub const Texture = *opaque { pub const Texture = *opaque {
pub inline fn createView(texture: Texture, descriptor: ?*const TextureViewDescriptor) TextureView { pub inline fn createView(texture: Texture, descriptor: ?*const TextureViewDescriptor) *TextureView {
return Impl.textureCreateView(texture, descriptor); return Impl.textureCreateView(texture, descriptor);
} }

View file

@ -6,16 +6,16 @@ const Impl = @import("interface.zig").Impl;
const mip_level_count_undefined = @import("main.zig").mip_level_count_undefined; const mip_level_count_undefined = @import("main.zig").mip_level_count_undefined;
const array_layer_count_undefined = @import("main.zig").array_layer_count_undefined; const array_layer_count_undefined = @import("main.zig").array_layer_count_undefined;
pub const TextureView = *opaque { pub const TextureView = opaque {
pub inline fn setLabel(texture_view: TextureView, label: [*:0]const u8) void { pub inline fn setLabel(texture_view: *TextureView, label: [*:0]const u8) void {
Impl.textureViewSetLabel(texture_view, label); Impl.textureViewSetLabel(texture_view, label);
} }
pub inline fn reference(texture_view: TextureView) void { pub inline fn reference(texture_view: *TextureView) void {
Impl.textureViewReference(texture_view); Impl.textureViewReference(texture_view);
} }
pub inline fn release(texture_view: TextureView) void { pub inline fn release(texture_view: *TextureView) void {
Impl.textureViewRelease(texture_view); Impl.textureViewRelease(texture_view);
} }
}; };