mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-29 17:44:09 +01:00
Replace wgpu-macros package with use of macro_rules_attribute. (#9963)
This commit is contained in:
1 parent
f9f55b7d51
commit
d0ecda96cd
132 files changed
+889
-897
No files matched your search
@@ -1,7 +1,7 @@
|
||||
use super::*;
|
||||
use wgpu_test::{gpu_test, GpuTestConfiguration, TestParameters};
|
||||
use wgpu_test::{apply, gpu_test, GpuTestConfiguration, TestParameters};
|
||||
|
||||
#[gpu_test]
|
||||
#[apply(gpu_test!)]
|
||||
pub static TWO_BUFFERS: GpuTestConfiguration = GpuTestConfiguration::new()
|
||||
.parameters(
|
||||
TestParameters::default()
|
||||
|
||||
@@ -322,7 +322,7 @@ pub fn main() {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "boids",
|
||||
// Generated on 1080ti on Vk/Windows
|
||||
|
||||
@@ -440,7 +440,7 @@ pub fn main() {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "bunnymark",
|
||||
image_path: "/examples/features/src/bunnymark/screenshot.png",
|
||||
|
||||
@@ -318,7 +318,7 @@ pub fn main() {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "conservative-raster",
|
||||
image_path: "/examples/features/src/conservative_raster/screenshot.png",
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
use super::*;
|
||||
use wgpu_test::{gpu_test, GpuTestConfiguration, TestParameters};
|
||||
use wgpu_test::{apply, gpu_test, GpuTestConfiguration, TestParameters};
|
||||
|
||||
// These tests are split into `COOPERATIVE_MATRIX_F16` and
|
||||
// `COOPERATIVE_MATRIX_F32` because the latter can run without
|
||||
// `wgpu::Features::SHADER_F16`.
|
||||
|
||||
#[gpu_test]
|
||||
#[apply(gpu_test!)]
|
||||
pub static COOPERATIVE_MATRIX_F32: GpuTestConfiguration = GpuTestConfiguration::new()
|
||||
.parameters(
|
||||
TestParameters::default()
|
||||
@@ -45,7 +45,7 @@ pub static COOPERATIVE_MATRIX_F32: GpuTestConfiguration = GpuTestConfiguration::
|
||||
assert!(max_error < tolerance);
|
||||
});
|
||||
|
||||
#[gpu_test]
|
||||
#[apply(gpu_test!)]
|
||||
pub static COOPERATIVE_MATRIX_F16: GpuTestConfiguration = GpuTestConfiguration::new()
|
||||
.parameters(
|
||||
TestParameters::default()
|
||||
|
||||
@@ -381,7 +381,7 @@ pub fn main() {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "cube",
|
||||
// Generated on 1080ti on Vk/Windows
|
||||
@@ -397,7 +397,7 @@ pub static TEST: crate::framework::ExampleTestParams = crate::framework::Example
|
||||
};
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST_LINES: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "cube-lines",
|
||||
// Generated on 1080ti on Vk/Windows
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use super::*;
|
||||
use wgpu_test::{gpu_test, GpuTestConfiguration, TestParameters};
|
||||
use wgpu_test::{apply, gpu_test, GpuTestConfiguration, TestParameters};
|
||||
|
||||
#[gpu_test]
|
||||
#[apply(gpu_test!)]
|
||||
pub static SYNC: GpuTestConfiguration = GpuTestConfiguration::new()
|
||||
.parameters(
|
||||
// Taken from hello-compute tests.
|
||||
|
||||
@@ -104,7 +104,7 @@ pub fn main() {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "mesh_shader",
|
||||
image_path: "/examples/features/src/mesh_shader/screenshot.png",
|
||||
|
||||
@@ -511,7 +511,7 @@ pub fn main() {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "mipmap",
|
||||
image_path: "/examples/features/src/mipmap/screenshot.png",
|
||||
@@ -524,7 +524,7 @@ pub static TEST: crate::framework::ExampleTestParams = crate::framework::Example
|
||||
};
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST_QUERY: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "mipmap-query",
|
||||
image_path: "/examples/features/src/mipmap/screenshot_query.png",
|
||||
|
||||
@@ -322,7 +322,7 @@ pub fn main() {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "msaa-line",
|
||||
image_path: "/examples/features/src/msaa_line/screenshot.png",
|
||||
|
||||
@@ -537,7 +537,7 @@ pub fn main() {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: EXAMPLE_NAME,
|
||||
image_path: "/examples/features/src/multiple_render_targets/screenshot.png",
|
||||
|
||||
@@ -389,7 +389,7 @@ pub fn main() {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "ray_aabb_compute",
|
||||
image_path: "/examples/features/src/ray_aabb_compute/screenshot.png",
|
||||
|
||||
@@ -462,7 +462,7 @@ pub fn main() {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "ray_cube_compute",
|
||||
image_path: "/examples/features/src/ray_cube_compute/screenshot.png",
|
||||
|
||||
@@ -348,7 +348,7 @@ pub fn main() {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "ray_cube_fragment",
|
||||
image_path: "/examples/features/src/ray_cube_fragment/screenshot.png",
|
||||
|
||||
@@ -448,7 +448,7 @@ pub fn main() {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "ray_cube_normals",
|
||||
image_path: "/examples/features/src/ray_cube_normals/screenshot.png",
|
||||
|
||||
@@ -528,7 +528,7 @@ pub fn main() {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "ray_scene",
|
||||
image_path: "/examples/features/src/ray_scene/screenshot.png",
|
||||
|
||||
@@ -345,7 +345,7 @@ pub fn main() {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "ray_shadows",
|
||||
image_path: "/examples/features/src/ray_shadows/screenshot.png",
|
||||
|
||||
@@ -431,7 +431,7 @@ pub fn main() {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "ray_traced_triangle",
|
||||
image_path: "/examples/features/src/ray_traced_triangle/screenshot.png",
|
||||
|
||||
@@ -841,7 +841,7 @@ pub fn main() {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "shadow",
|
||||
image_path: "/examples/features/src/shadow/screenshot.png",
|
||||
|
||||
@@ -470,7 +470,7 @@ pub fn main() {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "skybox",
|
||||
image_path: "/examples/features/src/skybox/screenshot.png",
|
||||
@@ -485,7 +485,7 @@ pub static TEST: crate::framework::ExampleTestParams = crate::framework::Example
|
||||
};
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST_BCN: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "skybox-bc7",
|
||||
image_path: "/examples/features/src/skybox/screenshot_bc7.png",
|
||||
@@ -498,7 +498,7 @@ pub static TEST_BCN: crate::framework::ExampleTestParams = crate::framework::Exa
|
||||
};
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST_ETC2: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "skybox-etc2",
|
||||
image_path: "/examples/features/src/skybox/screenshot_etc2.png",
|
||||
@@ -511,7 +511,7 @@ pub static TEST_ETC2: crate::framework::ExampleTestParams = crate::framework::Ex
|
||||
};
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST_ASTC: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "skybox-astc",
|
||||
image_path: "/examples/features/src/skybox/screenshot_astc.png",
|
||||
|
||||
@@ -222,7 +222,7 @@ pub fn main() {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST_SRGB: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "srgb-blend-srg",
|
||||
// Generated on WARP/Windows
|
||||
@@ -236,7 +236,7 @@ pub static TEST_SRGB: crate::framework::ExampleTestParams = crate::framework::Ex
|
||||
};
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST_LINEAR: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "srgb-blend-linear",
|
||||
// Generated on WARP/Windows
|
||||
|
||||
@@ -239,7 +239,7 @@ pub fn main() {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "stencil-triangles",
|
||||
image_path: "/examples/features/src/stencil_triangles/screenshot.png",
|
||||
|
||||
@@ -431,7 +431,7 @@ pub fn main() {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "texture-arrays",
|
||||
image_path: "/examples/features/src/texture_arrays/screenshot.png",
|
||||
@@ -451,7 +451,7 @@ pub static TEST: crate::framework::ExampleTestParams = crate::framework::Example
|
||||
};
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST_UNIFORM: crate::framework::ExampleTestParams =
|
||||
crate::framework::ExampleTestParams {
|
||||
name: "texture-arrays-uniform",
|
||||
@@ -472,7 +472,7 @@ pub static TEST_UNIFORM: crate::framework::ExampleTestParams =
|
||||
};
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST_NON_UNIFORM: crate::framework::ExampleTestParams =
|
||||
crate::framework::ExampleTestParams {
|
||||
name: "texture-arrays-non-uniform",
|
||||
|
||||
@@ -431,11 +431,11 @@ pub fn main() {
|
||||
#[cfg(test)]
|
||||
pub mod tests {
|
||||
use wgpu::Backends;
|
||||
use wgpu_test::{gpu_test, FailureCase, GpuTestConfiguration};
|
||||
use wgpu_test::{apply, gpu_test, FailureCase, GpuTestConfiguration};
|
||||
|
||||
use super::{submit_render_and_compute_pass_with_queries, QueryResults};
|
||||
|
||||
#[gpu_test]
|
||||
#[apply(gpu_test!)]
|
||||
pub static TIMESTAMPS_PASS_BOUNDARIES: GpuTestConfiguration = GpuTestConfiguration::new()
|
||||
.parameters(
|
||||
wgpu_test::TestParameters::default()
|
||||
@@ -444,7 +444,7 @@ pub mod tests {
|
||||
)
|
||||
.run_sync(|ctx| test_timestamps(ctx, false, false));
|
||||
|
||||
#[gpu_test]
|
||||
#[apply(gpu_test!)]
|
||||
pub static TIMESTAMPS_ENCODER: GpuTestConfiguration = GpuTestConfiguration::new()
|
||||
.parameters(
|
||||
wgpu_test::TestParameters::default()
|
||||
@@ -456,7 +456,7 @@ pub mod tests {
|
||||
)
|
||||
.run_sync(|ctx| test_timestamps(ctx, true, false));
|
||||
|
||||
#[gpu_test]
|
||||
#[apply(gpu_test!)]
|
||||
pub static TIMESTAMPS_PASSES: GpuTestConfiguration = GpuTestConfiguration::new()
|
||||
.parameters(
|
||||
wgpu_test::TestParameters::default()
|
||||
|
||||
@@ -824,7 +824,7 @@ pub fn main() {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[wgpu_test::gpu_test]
|
||||
#[wgpu_test::apply(wgpu_test::gpu_test!)]
|
||||
pub static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
|
||||
name: "water",
|
||||
image_path: "/examples/features/src/water/screenshot.png",
|
||||
|
||||
Reference in new issue
Block a user