gpu: improve SupportedLimits query example

`supported` is a better variable name because `supported.limits.foobar` is the actual
way it need be referenced, and `limits.limits.foobar` would be redundant.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2023-01-15 13:20:36 -07:00
parent 2fd8e876fd
commit 9d1c96ed0e

View file

@ -740,8 +740,8 @@ pub const RequiredLimits = extern struct {
/// 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");
/// var supported: gpu.SupportedLimits = .{};
/// if (!adapter.getLimits(&supported)) @panic("unsupported options");
/// ```
///
/// Note that `getLimits` can only fail if `next_in_chain` options are invalid.