gpu: make it easier to query Device/Adapter limits correctly
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
661ac75a31
commit
3f51ef6fde
1 changed files with 9 additions and 1 deletions
|
|
@ -707,9 +707,17 @@ pub const RequiredLimits = extern struct {
|
|||
limits: Limits,
|
||||
};
|
||||
|
||||
/// Used to query limits from a Device or Adapter. Can be used as follows:
|
||||
///
|
||||
/// ```
|
||||
/// var limits: gpu.SupportedLimits = .{};
|
||||
/// if (!adapter.getLimits(&limits)) @panic("unsupported options");
|
||||
/// ```
|
||||
///
|
||||
/// Note that `getLimits` can only fail if `next_in_chain` options are invalid.
|
||||
pub const SupportedLimits = extern struct {
|
||||
next_in_chain: ?*ChainedStructOut = null,
|
||||
limits: Limits,
|
||||
limits: Limits = undefined,
|
||||
};
|
||||
|
||||
pub const VertexBufferLayout = extern struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue