Move Examples to Subfolder
@ -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",
|
||||
|
||||
@ -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(),
|
||||
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 116 KiB |
@ -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(),
|
||||
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
@ -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(),
|
||||
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
@ -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,
|
||||
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
@ -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,
|
||||
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
@ -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,
|
||||
|
Before Width: | Height: | Size: 494 KiB After Width: | Height: | Size: 494 KiB |
|
Before Width: | Height: | Size: 487 KiB After Width: | Height: | Size: 487 KiB |
|
Before Width: | Height: | Size: 485 KiB After Width: | Height: | Size: 485 KiB |
@ -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,
|
||||
|
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 138 KiB |
@ -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(),
|
||||
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
@ -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(),
|
||||
|
Before Width: | Height: | Size: 479 KiB After Width: | Height: | Size: 479 KiB |
@ -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(),
|
||||
|
Before Width: | Height: | Size: 584 KiB After Width: | Height: | Size: 584 KiB |
@ -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(),
|
||||
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
@ -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(),
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@ -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(),
|
||||
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 116 KiB |
@ -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(),
|
||||
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
@ -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,
|
||||