gpu: implement Dawn textureGet*
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
dbac3c325a
commit
7b62d5f81b
1 changed files with 6 additions and 12 deletions
|
|
@ -1099,33 +1099,27 @@ pub const Interface = gpu.Interface(struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub inline fn textureGetDepthOrArrayLayers(texture: *gpu.Texture) u32 {
|
pub inline fn textureGetDepthOrArrayLayers(texture: *gpu.Texture) u32 {
|
||||||
_ = texture;
|
return procs.textureGetDepthOrArrayLayers.?(@ptrCast(c.WGPUTexture, texture));
|
||||||
unreachable;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub inline fn textureGetDimension(texture: *gpu.Texture) gpu.Texture.Dimension {
|
pub inline fn textureGetDimension(texture: *gpu.Texture) gpu.Texture.Dimension {
|
||||||
_ = texture;
|
return @intToEnum(gpu.Texture.Dimension, procs.textureGetDimension.?(@ptrCast(c.WGPUTexture, texture)));
|
||||||
unreachable;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub inline fn textureGetFormat(texture: *gpu.Texture) gpu.Texture.Format {
|
pub inline fn textureGetFormat(texture: *gpu.Texture) gpu.Texture.Format {
|
||||||
_ = texture;
|
return @intToEnum(gpu.Texture.Format, procs.textureGetFormat.?(@ptrCast(c.WGPUTexture, texture)));
|
||||||
unreachable;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub inline fn textureGetHeight(texture: *gpu.Texture) u32 {
|
pub inline fn textureGetHeight(texture: *gpu.Texture) u32 {
|
||||||
_ = texture;
|
return procs.textureGetHeight.?(@ptrCast(c.WGPUTexture, texture));
|
||||||
unreachable;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub inline fn textureGetMipLevelCount(texture: *gpu.Texture) u32 {
|
pub inline fn textureGetMipLevelCount(texture: *gpu.Texture) u32 {
|
||||||
_ = texture;
|
return procs.textureGetMipLevelCount.?(@ptrCast(c.WGPUTexture, texture));
|
||||||
unreachable;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub inline fn textureGetSampleCount(texture: *gpu.Texture) u32 {
|
pub inline fn textureGetSampleCount(texture: *gpu.Texture) u32 {
|
||||||
_ = texture;
|
return procs.textureGetSampleCount.?(@ptrCast(c.WGPUTexture, texture));
|
||||||
unreachable;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub inline fn textureGetUsage(texture: *gpu.Texture) gpu.Texture.UsageFlags {
|
pub inline fn textureGetUsage(texture: *gpu.Texture) gpu.Texture.UsageFlags {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue