Move Examples to Subfolder

This commit is contained in:
Connor Fitzgerald 2025-01-04 16:52:03 -05:00
parent 4ed5021996
commit c73bd2fa60
141 changed files with 34 additions and 32 deletions

View File

@ -6,7 +6,8 @@ members = [
# default members
"benches",
"examples",
"examples/features",
# "examples/standalone/*",
"lock-analyzer",
"naga-cli",
"naga",
@ -24,7 +25,8 @@ members = [
exclude = []
default-members = [
"benches",
"examples",
"examples/features",
# "examples/standalone/*",
"lock-analyzer",
"naga-cli",
"naga",

View File

@ -327,7 +327,7 @@ pub fn main() {
static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
name: "boids",
// Generated on 1080ti on Vk/Windows
image_path: "/examples/src/boids/screenshot.png",
image_path: "/examples/features/src/boids/screenshot.png",
width: 1024,
height: 768,
optional_features: wgpu::Features::default(),

View File

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 116 KiB

View File

@ -151,7 +151,7 @@ impl crate::framework::Example for Example {
let shader = device.create_shader_module(wgpu::ShaderModuleDescriptor {
label: None,
source: wgpu::ShaderSource::Wgsl(Cow::Borrowed(include_str!(
"../../../wgpu-hal/examples/halmark/shader.wgsl"
"../../../../wgpu-hal/examples/halmark/shader.wgsl"
))),
});
@ -238,7 +238,7 @@ impl crate::framework::Example for Example {
});
let texture = {
let img_data = include_bytes!("../../../logo.png");
let img_data = include_bytes!("../../../../logo.png");
let decoder = png::Decoder::new(std::io::Cursor::new(img_data));
let mut reader = decoder.read_info().unwrap();
let mut buf = vec![0; reader.output_buffer_size()];
@ -440,7 +440,7 @@ pub fn main() {
#[wgpu_test::gpu_test]
static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
name: "bunnymark",
image_path: "/examples/src/bunnymark/screenshot.png",
image_path: "/examples/features/src/bunnymark/screenshot.png",
width: 1024,
height: 768,
optional_features: wgpu::Features::default(),

View File

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

@ -317,7 +317,7 @@ pub fn main() {
#[wgpu_test::gpu_test]
static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
name: "conservative-raster",
image_path: "/examples/src/conservative_raster/screenshot.png",
image_path: "/examples/features/src/conservative_raster/screenshot.png",
width: 1024,
height: 768,
optional_features: wgpu::Features::default(),

View File

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

@ -383,7 +383,7 @@ pub fn main() {
static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
name: "cube",
// Generated on 1080ti on Vk/Windows
image_path: "/examples/src/cube/screenshot.png",
image_path: "/examples/features/src/cube/screenshot.png",
width: 1024,
height: 768,
optional_features: wgpu::Features::default(),
@ -399,7 +399,7 @@ static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTest
static TEST_LINES: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
name: "cube-lines",
// Generated on 1080ti on Vk/Windows
image_path: "/examples/src/cube/screenshot-lines.png",
image_path: "/examples/features/src/cube/screenshot-lines.png",
width: 1024,
height: 768,
optional_features: wgpu::Features::POLYGON_MODE_LINE,

View File

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View File

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View File

@ -597,7 +597,7 @@ impl<E: Example + wgpu::WasmNotSendSync> From<ExampleTestParams<E>>
let bytes = dst_buffer_slice.get_mapped_range().to_vec();
wgpu_test::image::compare_image_output(
dbg!(env!("CARGO_MANIFEST_DIR").to_string() + "/../" + params.image_path),
dbg!(env!("CARGO_MANIFEST_DIR").to_string() + "/../../" + params.image_path),
&ctx.adapter_info,
params.width,
params.height,

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -508,7 +508,7 @@ pub fn main() {
#[wgpu_test::gpu_test]
static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
name: "mipmap",
image_path: "/examples/src/mipmap/screenshot.png",
image_path: "/examples/features/src/mipmap/screenshot.png",
width: 1024,
height: 768,
optional_features: wgpu::Features::default(),
@ -521,7 +521,7 @@ static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTest
#[wgpu_test::gpu_test]
static TEST_QUERY: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
name: "mipmap-query",
image_path: "/examples/src/mipmap/screenshot_query.png",
image_path: "/examples/features/src/mipmap/screenshot_query.png",
width: 1024,
height: 768,
optional_features: QUERY_FEATURES,

View File

Before

Width:  |  Height:  |  Size: 494 KiB

After

Width:  |  Height:  |  Size: 494 KiB

View File

Before

Width:  |  Height:  |  Size: 487 KiB

After

Width:  |  Height:  |  Size: 487 KiB

View File

Before

Width:  |  Height:  |  Size: 485 KiB

After

Width:  |  Height:  |  Size: 485 KiB

View File

@ -321,7 +321,7 @@ pub fn main() {
#[wgpu_test::gpu_test]
static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
name: "msaa-line",
image_path: "/examples/src/msaa_line/screenshot.png",
image_path: "/examples/features/src/msaa_line/screenshot.png",
width: 1024,
height: 768,
optional_features: wgpu::Features::TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES,

View File

Before

Width:  |  Height:  |  Size: 138 KiB

After

Width:  |  Height:  |  Size: 138 KiB

View File

@ -534,7 +534,7 @@ pub fn main() {
#[wgpu_test::gpu_test]
static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
name: EXAMPLE_NAME,
image_path: "/examples/src/multiple_render_targets/screenshot.png",
image_path: "/examples/features/src/multiple_render_targets/screenshot.png",
width: 1024,
height: 768,
optional_features: wgpu::Features::default(),

View File

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View File

@ -486,7 +486,7 @@ pub fn main() {
#[wgpu_test::gpu_test]
static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
name: "ray_cube_compute",
image_path: "/examples/src/ray_cube_compute/screenshot.png",
image_path: "/examples/features/src/ray_cube_compute/screenshot.png",
width: 1024,
height: 768,
optional_features: wgpu::Features::default(),

View File

Before

Width:  |  Height:  |  Size: 479 KiB

After

Width:  |  Height:  |  Size: 479 KiB

View File

@ -373,7 +373,7 @@ pub fn main() {
#[wgpu_test::gpu_test]
static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
name: "ray_cube_fragment",
image_path: "/examples/src/ray_cube_fragment/screenshot.png",
image_path: "/examples/features/src/ray_cube_fragment/screenshot.png",
width: 1024,
height: 768,
optional_features: wgpu::Features::default(),

View File

Before

Width:  |  Height:  |  Size: 584 KiB

After

Width:  |  Height:  |  Size: 584 KiB

View File

@ -551,7 +551,7 @@ pub fn main() {
#[wgpu_test::gpu_test]
static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
name: "ray_scene",
image_path: "/examples/src/ray_scene/screenshot.png",
image_path: "/examples/features/src/ray_scene/screenshot.png",
width: 1024,
height: 768,
optional_features: wgpu::Features::default(),

View File

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

View File

@ -367,7 +367,7 @@ pub fn main() {
#[wgpu_test::gpu_test]
static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
name: "ray_cube_shadows",
image_path: "/examples/src/ray_shadows/screenshot.png",
image_path: "/examples/features/src/ray_shadows/screenshot.png",
width: 1024,
height: 768,
optional_features: wgpu::Features::default(),

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -425,7 +425,7 @@ pub fn main() {
#[wgpu_test::gpu_test]
static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
name: "ray_traced_triangle",
image_path: "/examples/src/ray_traced_triangle/screenshot.png",
image_path: "/examples/features/src/ray_traced_triangle/screenshot.png",
width: 1024,
height: 768,
optional_features: wgpu::Features::default(),

View File

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 116 KiB

View File

@ -844,7 +844,7 @@ pub fn main() {
#[wgpu_test::gpu_test]
static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
name: "shadow",
image_path: "/examples/src/shadow/screenshot.png",
image_path: "/examples/features/src/shadow/screenshot.png",
width: 1024,
height: 768,
optional_features: wgpu::Features::default(),

View File

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 79 KiB

View File

@ -474,7 +474,7 @@ pub fn main() {
#[wgpu_test::gpu_test]
static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
name: "skybox",
image_path: "/examples/src/skybox/screenshot.png",
image_path: "/examples/features/src/skybox/screenshot.png",
width: 1024,
height: 768,
optional_features: wgpu::Features::default(),
@ -489,7 +489,7 @@ static TEST: crate::framework::ExampleTestParams = crate::framework::ExampleTest
#[wgpu_test::gpu_test]
static TEST_BCN: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
name: "skybox-bc7",
image_path: "/examples/src/skybox/screenshot_bc7.png",
image_path: "/examples/features/src/skybox/screenshot_bc7.png",
width: 1024,
height: 768,
optional_features: wgpu::Features::TEXTURE_COMPRESSION_BC,
@ -502,7 +502,7 @@ static TEST_BCN: crate::framework::ExampleTestParams = crate::framework::Example
#[wgpu_test::gpu_test]
static TEST_ETC2: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
name: "skybox-etc2",
image_path: "/examples/src/skybox/screenshot_etc2.png",
image_path: "/examples/features/src/skybox/screenshot_etc2.png",
width: 1024,
height: 768,
optional_features: wgpu::Features::TEXTURE_COMPRESSION_ETC2,
@ -515,7 +515,7 @@ static TEST_ETC2: crate::framework::ExampleTestParams = crate::framework::Exampl
#[wgpu_test::gpu_test]
static TEST_ASTC: crate::framework::ExampleTestParams = crate::framework::ExampleTestParams {
name: "skybox-astc",
image_path: "/examples/src/skybox/screenshot_astc.png",
image_path: "/examples/features/src/skybox/screenshot_astc.png",
width: 1024,
height: 768,
optional_features: wgpu::Features::TEXTURE_COMPRESSION_ASTC,

Some files were not shown because too many files have changed in this diff Show More