use custom ser/de impl for TextureFormat (#2908)

Co-authored-by: Alphyr <47725341+a1phyr@users.noreply.github.com>
This commit is contained in:
Leo Kettmeir 2022-09-29 18:43:50 +01:00 committed by GitHub
parent c927e810de
commit 26f223964e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 841 additions and 87 deletions

5
Cargo.lock generated
View File

@ -1682,9 +1682,9 @@ dependencies = [
[[package]]
name = "serde_json"
version = "1.0.82"
version = "1.0.85"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82c2c1fdcd807d1098552c5b9a36e425e42e9fbd7c6a37a8425f390f781f7fa7"
checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44"
dependencies = [
"itoa",
"ryu",
@ -2313,6 +2313,7 @@ dependencies = [
"bitflags",
"bitflags_serde_shim",
"serde",
"serde_json",
]
[[package]]

View File

@ -29,7 +29,7 @@
mip_level_count: 1,
sample_count: 1,
dimension: r#2d,
format: rgba8unorm,
format: "rgba8unorm",
usage: 27,
)),
// First fill the texture to ensure it wasn't just zero initialized or "happened" to be zero.

View File

@ -26,7 +26,7 @@
mip_level_count: 1,
sample_count: 1,
dimension: r#2d,
format: rgba8unorm,
format: "rgba8unorm",
usage: 27,
)),
CreateTextureView(
@ -67,7 +67,7 @@
),
targets: [
Some((
format: rgba8unorm,
format: "rgba8unorm",
)),
],
)),

View File

@ -26,7 +26,7 @@
mip_level_count: 1,
sample_count: 1,
dimension: r#2d,
format: rgba8unorm,
format: "rgba8unorm",
usage: 5, // SAMPLED + COPY_SRC
)),
CreateTextureView(
@ -52,7 +52,7 @@
mip_level_count: 1,
sample_count: 1,
dimension: r#2d,
format: rgba8unorm,
format: "rgba8unorm",
usage: 9, // STORAGE + COPY_SRC
)),
CreateTextureView(
@ -89,7 +89,7 @@
visibility: 4, // COMPUTE
ty: StorageTexture (
access: r#write-only,
format: rgba8unorm,
format: "rgba8unorm",
view_dimension: r#2d,
),
count: None,

View File

@ -19,7 +19,7 @@
mip_level_count: 1,
sample_count: 1,
dimension: r#2d,
format: rgba8unorm,
format: "rgba8unorm",
usage: 1, // COPY_SRC
)),
CreateBuffer(

View File

@ -19,7 +19,7 @@
mip_level_count: 1,
sample_count: 1,
dimension: r#2d,
format: rgba8unorm,
format: "rgba8unorm",
usage: 17, // RENDER_ATTACHMENT + COPY_SRC
)),
CreateTextureView(

View File

@ -19,3 +19,6 @@ replay = ["serde", "bitflags_serde_shim"]
bitflags = "1.0"
serde = { version = "1.0", features = ["serde_derive"], optional = true }
bitflags_serde_shim = { version = "0.2", optional = true }
[dev-dependencies]
serde_json = "1.0.85"

File diff suppressed because it is too large Load Diff