tiny.gpu.TextureCapabilities
Defined in contract.
API (8)
Actions
Public operations.
Fields and members
Public fields and members.
Source
Source: lib/gpu/src/contract.zig:878
zig
pub const TextureCapabilities = struct { supported: bool = false, formats: TextureFormatSet = .{}, usages: TextureUsage = .{}, max_extent: TextureExtent = .{}, max_sample_count: u32 = 1, pub fn supportsFormat(self: TextureCapabilities, format: TextureFormat) bool { return self.formats.contains(format); } pub fn supportsUsage(self: TextureCapabilities, usage: TextureUsage) bool { return self.usages.containsAll(usage); } pub fn supportsExtent(self: TextureCapabilities, extent: TextureExtent) bool { if (!extent.valid()) return false; if (self.max_extent.width != 0 and extent.width > self.max_extent.width) return false; if (self.max_extent.height != 0 and extent.height > self.max_extent.height) return false; if (self.max_extent.depth != 0 and extent.depth > self.max_extent.depth) return false; return true; }};Source: lib/gpu/src/root.zig:97
zig
pub const TextureCapabilities = contract.TextureCapabilities;Audit
| Definitions | 4 |
|---|---|
| Public names | 8 |
| Members | 5 |
| Version | 26.7.0 |
| Revision | daab053ee433 |