gpu: implement Dawn textureGet*

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-30 17:23:37 -07:00 committed by Stephen Gutekanst
parent dbac3c325a
commit 7b62d5f81b

View file

@ -1099,33 +1099,27 @@ pub const Interface = gpu.Interface(struct {
}
pub inline fn textureGetDepthOrArrayLayers(texture: *gpu.Texture) u32 {
_ = texture;
unreachable;
return procs.textureGetDepthOrArrayLayers.?(@ptrCast(c.WGPUTexture, texture));
}
pub inline fn textureGetDimension(texture: *gpu.Texture) gpu.Texture.Dimension {
_ = texture;
unreachable;
return @intToEnum(gpu.Texture.Dimension, procs.textureGetDimension.?(@ptrCast(c.WGPUTexture, texture)));
}
pub inline fn textureGetFormat(texture: *gpu.Texture) gpu.Texture.Format {
_ = texture;
unreachable;
return @intToEnum(gpu.Texture.Format, procs.textureGetFormat.?(@ptrCast(c.WGPUTexture, texture)));
}
pub inline fn textureGetHeight(texture: *gpu.Texture) u32 {
_ = texture;
unreachable;
return procs.textureGetHeight.?(@ptrCast(c.WGPUTexture, texture));
}
pub inline fn textureGetMipLevelCount(texture: *gpu.Texture) u32 {
_ = texture;
unreachable;
return procs.textureGetMipLevelCount.?(@ptrCast(c.WGPUTexture, texture));
}
pub inline fn textureGetSampleCount(texture: *gpu.Texture) u32 {
_ = texture;
unreachable;
return procs.textureGetSampleCount.?(@ptrCast(c.WGPUTexture, texture));
}
pub inline fn textureGetUsage(texture: *gpu.Texture) gpu.Texture.UsageFlags {