mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-26 08:44:08 +00:00
d6c4d5c5c3
When the appropriate features are enabled, manually implement `serde::Serialize` and `serde::Deserialize`, such that the serialized form of `NonMaxU32::new(n).unwrap()` is the same as that of `n`. This eliminates the last trace of 1-based indices from Naga's snapshot tests, and aligns `std::fmt::Debug` with the serialized form.
128 lines
3.1 KiB
Plaintext
128 lines
3.1 KiB
Plaintext
(
|
|
types: [
|
|
(
|
|
name: None,
|
|
inner: Scalar((
|
|
kind: Sint,
|
|
width: 4,
|
|
)),
|
|
),
|
|
(
|
|
name: None,
|
|
inner: Atomic((
|
|
kind: Uint,
|
|
width: 4,
|
|
)),
|
|
),
|
|
(
|
|
name: None,
|
|
inner: Scalar((
|
|
kind: Uint,
|
|
width: 4,
|
|
)),
|
|
),
|
|
(
|
|
name: None,
|
|
inner: Scalar((
|
|
kind: Bool,
|
|
width: 1,
|
|
)),
|
|
),
|
|
(
|
|
name: Some("__atomic_compare_exchange_result<Uint,4>"),
|
|
inner: Struct(
|
|
members: [
|
|
(
|
|
name: Some("old_value"),
|
|
ty: 2,
|
|
binding: None,
|
|
offset: 0,
|
|
),
|
|
(
|
|
name: Some("exchanged"),
|
|
ty: 3,
|
|
binding: None,
|
|
offset: 4,
|
|
),
|
|
],
|
|
span: 8,
|
|
),
|
|
),
|
|
],
|
|
special_types: (
|
|
ray_desc: None,
|
|
ray_intersection: None,
|
|
predeclared_types: {
|
|
AtomicCompareExchangeWeakResult((
|
|
kind: Uint,
|
|
width: 4,
|
|
)): 4,
|
|
},
|
|
),
|
|
constants: [],
|
|
overrides: [
|
|
(
|
|
name: Some("o"),
|
|
id: None,
|
|
ty: 0,
|
|
init: None,
|
|
),
|
|
],
|
|
global_variables: [
|
|
(
|
|
name: Some("a"),
|
|
space: WorkGroup,
|
|
binding: None,
|
|
ty: 1,
|
|
init: None,
|
|
),
|
|
],
|
|
global_expressions: [],
|
|
functions: [],
|
|
entry_points: [
|
|
(
|
|
name: "f",
|
|
stage: Compute,
|
|
early_depth_test: None,
|
|
workgroup_size: (1, 1, 1),
|
|
function: (
|
|
name: Some("f"),
|
|
arguments: [],
|
|
result: None,
|
|
local_variables: [],
|
|
expressions: [
|
|
GlobalVariable(0),
|
|
Override(0),
|
|
As(
|
|
expr: 1,
|
|
kind: Uint,
|
|
convert: Some(4),
|
|
),
|
|
Literal(U32(1)),
|
|
AtomicResult(
|
|
ty: 4,
|
|
comparison: true,
|
|
),
|
|
],
|
|
named_expressions: {},
|
|
body: [
|
|
Emit((
|
|
start: 2,
|
|
end: 3,
|
|
)),
|
|
Atomic(
|
|
pointer: 0,
|
|
fun: Exchange(
|
|
compare: Some(2),
|
|
),
|
|
value: 3,
|
|
result: Some(4),
|
|
),
|
|
Return(
|
|
value: None,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
) |