Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resync with WGPU 0.20. #601

Open
wants to merge 6 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Per Keep a Changelog there are 6 main categories of changes:

## Versions

- [v0.20.0] (#v0.20.0)
- [Unreleased](#unreleased)
- [v0.3.0](#v030)
- [v0.2.0](#v020)
Expand All @@ -29,6 +30,16 @@ Per Keep a Changelog there are 6 main categories of changes:
- [v0.0.1](#v001)
- [Diffs](#diffs)

## v0.20.0

### Major Changes
There will be basic maintenance to keep Rend3 alive. (JN).

### Changes
- Version number advanced to 0.20. From now on, the version will generally follow WGPU.
- Incorporated all items listed as "Unreleased".
- Upgraded dependent packages to WGPU 0.20, and appropriate versions of Egui and Winit.

## Unreleased

### Major Changes
Expand Down
14 changes: 0 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,3 @@ opt-level = 3
[profile.release]
debug = true
lto = "thin"

[patch.crates-io]
# wgpu = { git = "https://github.com/gfx-rs/wgpu.git", rev = "fac4731288117d951d0944d96cf0b00fa006dd6c" }
# wgpu-core = { git = "https://github.com/gfx-rs/wgpu.git", rev = "fac4731288117d951d0944d96cf0b00fa006dd6c" }
# wgpu-hal = { git = "https://github.com/gfx-rs/wgpu.git", rev = "fac4731288117d951d0944d96cf0b00fa006dd6c" }
# wgpu-types = { git = "https://github.com/gfx-rs/wgpu.git", rev = "fac4731288117d951d0944d96cf0b00fa006dd6c" }
# wgpu = { git = "https://github.com/cwfitzgerald/wgpu.git", rev = "bda861f77e0ca0b97697850ad19d19a8b8f1cc9c" }
# wgpu-core = { git = "https://github.com/cwfitzgerald/wgpu.git", rev = "bda861f77e0ca0b97697850ad19d19a8b8f1cc9c" }
# wgpu-hal = { git = "https://github.com/cwfitzgerald/wgpu.git", rev = "bda861f77e0ca0b97697850ad19d19a8b8f1cc9c" }
# wgpu-types = { git = "https://github.com/cwfitzgerald/wgpu.git", rev = "bda861f77e0ca0b97697850ad19d19a8b8f1cc9c" }
# wgpu = { path = "../wgpu/wgpu" }
# wgpu-core = { path = "../wgpu/wgpu-core" }
# wgpu-hal = { path = "../wgpu/wgpu-hal" }
# wgpu-types = { path = "../wgpu/wgpu-types" }
28 changes: 14 additions & 14 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "rend3-examples-package"
license = "MIT OR Apache-2.0 OR Zlib"
version = "0.3.0"
version = "0.20.0"
authors = ["The rend3 Developers"]
edition = "2021"
publish = false
Expand All @@ -20,9 +20,9 @@ path = "src/main.rs"
# error handling
anyhow = "1"
# The egui immediate mode gui library
egui = "0.26"
egui = "0.28"
# Winit integration with egui (turn off the clipboard feature)
egui-winit = { version = "0.26", default-features = false, features = ["links", "wayland"] }
egui-winit = { version = "0.28", default-features = false, features = ["links", "wayland"] }
# logging
env_logger = { version = "0.11", default-features = false, features = ["auto-color", "humantime"] }
# Linear algebra library
Expand All @@ -36,7 +36,7 @@ log = "0.4"
# Inline string
indoc = "2"
# Importing images
image = { version = "0.24", default-features = false, features = [
image = { version = "0.25", default-features = false, features = [
"png",
"jpeg",
"tiff",
Expand All @@ -48,27 +48,27 @@ pico-args = "0.5"
# block on async functions
pollster = "0.3"
# Renderer core
rend3 = { version = "^0.3.0", path = "../rend3" }
rend3 = { version = "^0.20", path = "../rend3" }
# Play animations on imported gltf models
rend3-anim = { version = "^0.3.0", path = "../rend3-anim" }
rend3-anim = { version = "^0.20", path = "../rend3-anim" }
# Egui integration with rend3
rend3-egui = { version = "^0.3.0", path = "../rend3-egui" }
rend3-egui = { version = "^0.20", path = "../rend3-egui" }
# Programmable render list that dictates how the scene renders
rend3-routine = { version = "^0.3.0", path = "../rend3-routine" }
rend3-routine = { version = "^0.20", path = "../rend3-routine" }
# Framework that deals with the event loop, setting up the renderer, and platform differences.
rend3-framework = { version = "^0.3.0", path = "../rend3-framework" }
rend3-framework = { version = "^0.20", path = "../rend3-framework" }
# Import gltf models
rend3-gltf = { version = "^0.3.0", path = "../rend3-gltf" }
rend3-gltf = { version = "^0.20", path = "../rend3-gltf" }
# Opening URL's
webbrowser = "0.8.2"
webbrowser = "1"
# Instant but portable to the web
web-time = "1.1"
# windowing
winit = "0.29.4"
# Integration with wgpu
wgpu = "0.19.0"
wgpu = "0.20"
# Profiling with wgpu
wgpu-profiler = "0.16.0"
wgpu-profiler = "0.17"

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_log = "1"
Expand All @@ -83,7 +83,7 @@ wasm-bindgen-futures = "0.4"
ndk-glue = { version = "0.7", features = ["logger"] }

[dev-dependencies]
rend3-test = { version = "^0.3.0", path = "../rend3-test" }
rend3-test = { version = "^0.20.0", path = "../rend3-test" }
tokio = "1"

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
Expand Down
4 changes: 3 additions & 1 deletion examples/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ pub async fn test_app<A: App<T>, T: 'static>(mut config: TestConfiguration<A>) -

let image = download_image(&renderer, texture, config.size).await.unwrap();

compare_image_to_path(&image, Path::new(config.reference_path), config.threshold_set).unwrap();
compare_image_to_path(&image, Path::new(config.reference_path), config.threshold_set)
.context(config.reference_path) // Location of reference image
.unwrap();

Ok(())
}
8 changes: 4 additions & 4 deletions rend3-anim/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rend3-anim"
version = "0.3.0"
version = "0.20.0"
authors = ["The rend3 Developers"]
edition = "2021"
description = "Skeletal animation playback utilities for rend3 rendering library."
Expand All @@ -12,6 +12,6 @@ rust-version = "1.71"

[dependencies]
itertools = "0.12"
rend3 = { version = "^0.3.0", path = "../rend3" }
rend3-routine = { version = "^0.3.0", path = "../rend3-routine" }
rend3-gltf = { version = "^0.3.0", path = "../rend3-gltf" }
rend3 = { version = "^0.20.0", path = "../rend3" }
rend3-routine = { version = "^0.20", path = "../rend3-routine" }
rend3-gltf = { version = "^0.20", path = "../rend3-gltf" }
12 changes: 6 additions & 6 deletions rend3-egui/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rend3-egui"
version = "0.3.0"
version = "0.20.0"
authors = ["The rend3 Developers"]
edition = "2021"
description = "Egui Render Routine for the rend3 rendering library."
Expand All @@ -12,9 +12,9 @@ categories = ["game-development", "graphics", "rendering", "rendering::engine",
rust-version = "1.71"

[dependencies]
egui = "0.26"
egui-wgpu = "0.26"
egui = "0.28"
egui-wgpu = "0.28"
glam = "0.25"
rend3 = { version = "^0.3.0", path = "../rend3" }
wgpu = "0.19.0"
wgpu-types = "0.19.0"
rend3 = { version = "^0.20", path = "../rend3" }
wgpu = "0.20"
wgpu-types = "0.20"
8 changes: 4 additions & 4 deletions rend3-framework/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rend3-framework"
version = "0.3.0"
version = "0.20.0"
authors = ["The rend3 Developers"]
edition = "2021"
description = "Simple framework for making applications with the rend3 rendering library."
Expand All @@ -18,12 +18,12 @@ glam = "0.25"
log = "0.4"
parking_lot = "0.12"
profiling = { version = "1", default-features = false }
rend3 = { version = "0.3.0", path = "../rend3" }
rend3-routine = { version = "0.3.0", path = "../rend3-routine" }
rend3 = { version = "0.20.0", path = "../rend3" }
rend3-routine = { version = "0.20.0", path = "../rend3-routine" }
thiserror = { version = "1" }
web-time = "1.1"
winit = { version = "0.29.4", features = ["rwh_05"] }
wgpu = "0.19.0"
wgpu = "0.20.0"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
# logging
Expand Down
8 changes: 4 additions & 4 deletions rend3-gltf/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rend3-gltf"
version = "0.3.0"
version = "0.20.0"
authors = ["The rend3 Developers"]
edition = "2021"
description = "gltf scene and model loader for the rend3 rendering library."
Expand All @@ -22,12 +22,12 @@ ddsfile = { version = "0.5", optional = true }
float-ord = "0.3.2"
glam = "0.25"
gltf = { version = "1.0", default-features = false, features = ["KHR_lights_punctual", "KHR_texture_transform", "KHR_materials_unlit", "extras", "names", "utils"] }
image = { version = "0.24", default-features = false }
image = { version = "0.25", default-features = false }
ktx2 = { version = "0.3", optional = true }
log = "0.4"
profiling = {version = "1", default-features = false }
rend3 = { version = "^0.3.0", path = "../rend3" }
rend3-routine = { version = "^0.3.0", path = "../rend3-routine" }
rend3 = { version = "^0.20.0", path = "../rend3" }
rend3-routine = { version = "^0.20.0", path = "../rend3-routine" }
rustc-hash = "1"
thiserror = "1"

Expand Down
10 changes: 5 additions & 5 deletions rend3-routine/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rend3-routine"
version = "0.3.0"
version = "0.20.0"
authors = ["The rend3 Developers"]
edition = "2021"
description = "Customizable Render Routines for the rend3 rendering library."
Expand All @@ -20,13 +20,13 @@ encase = { version = "0.7", features = ["glam"] }
flume = "0.11"
glam = { version = "0.25.0", features = ["bytemuck"] }
log = "0.4"
naga = { version = "0.19.0", features = ["wgsl-in"] }
naga = { version = "0.20.0", features = ["wgsl-in"] }
ordered-float = "4"
parking_lot = "0.12"
profiling = {version = "1", default-features = false }
rend3 = { version = "^0.3.0", path = "../rend3" }
rend3 = { version = "^0.20.0", path = "../rend3" }
rust-embed = { version = "8", features = ["interpolate-folder-path"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
wgpu = "0.19.0"
wgpu-profiler = "0.16.0"
wgpu = "0.20"
wgpu-profiler = "0.17"
16 changes: 12 additions & 4 deletions rend3-routine/src/forward.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ use rend3::{
use serde::Serialize;
use wgpu::{
BindGroup, BindGroupLayout, ColorTargetState, ColorWrites, CompareFunction, DepthBiasState, DepthStencilState,
FragmentState, IndexFormat, MultisampleState, PipelineLayoutDescriptor, PolygonMode, PrimitiveState,
PrimitiveTopology, RenderPipeline, RenderPipelineDescriptor, ShaderModule, StencilState, TextureFormat,
VertexState,
FragmentState, IndexFormat, MultisampleState, PipelineCompilationOptions, PipelineLayoutDescriptor, PolygonMode,
PrimitiveState, PrimitiveTopology, RenderPipeline, RenderPipelineDescriptor, ShaderModule, StencilState,
TextureFormat, VertexState,
};

use crate::common::{CameraSpecifier, PerMaterialArchetypeInterface, WholeFrameInterfaces};
use crate::uniforms::PerCameraUniform;

/// This structure is unused.
#[allow(dead_code)] // This structure is never constructed
#[derive(Serialize)]
struct ForwardPreprocessingArguments {
profile: Option<RendererProfile>,
Expand Down Expand Up @@ -348,7 +350,12 @@ fn build_forward_pipeline_inner<M: Material>(
let mut desc = RenderPipelineDescriptor {
label: Some(args.name),
layout: Some(pll),
vertex: VertexState { module: args.shaders.vs_module, entry_point: args.shaders.vs_entry, buffers: &[] },
vertex: VertexState {
module: args.shaders.vs_module,
entry_point: args.shaders.vs_entry,
buffers: &[],
compilation_options: PipelineCompilationOptions::default(), // use default WGPU options. New in WGPU 0.20 (JN)
},
primitive: PrimitiveState {
topology: PrimitiveTopology::TriangleList,
strip_index_format: None,
Expand Down Expand Up @@ -377,6 +384,7 @@ fn build_forward_pipeline_inner<M: Material>(
module: args.shaders.fs_module,
entry_point: args.shaders.fs_entry,
targets: &[],
compilation_options: PipelineCompilationOptions::default(), // use default WGPU options. New in WGPU 0.20 (JN)
}),
multiview: None,
};
Expand Down
4 changes: 3 additions & 1 deletion rend3-routine/src/skinning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ use rend3::{
};
use wgpu::{
BindGroupLayout, Buffer, BufferBindingType, BufferDescriptor, BufferUsages, CommandEncoder, ComputePassDescriptor,
ComputePipeline, ComputePipelineDescriptor, PipelineLayoutDescriptor, ShaderModuleDescriptor, ShaderStages,
ComputePipeline, ComputePipelineDescriptor, PipelineCompilationOptions, PipelineLayoutDescriptor,
ShaderModuleDescriptor, ShaderStages,
};

/// The per-skeleton data, as uploaded to the GPU compute shader.
Expand Down Expand Up @@ -173,6 +174,7 @@ impl GpuSkinner {
layout: Some(&layout),
module: &module,
entry_point: "main",
compilation_options: PipelineCompilationOptions::default(), // use default WGPU options. New in WGPU 0.20 (JN)
});

Self { bgl, pipeline }
Expand Down
15 changes: 11 additions & 4 deletions rend3-routine/src/skybox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ use rend3::{
};
use wgpu::{
BindGroup, BindGroupLayout, BindingType, ColorTargetState, ColorWrites, CompareFunction, DepthBiasState,
DepthStencilState, Face, FragmentState, FrontFace, MultisampleState, PipelineLayoutDescriptor, PolygonMode,
PrimitiveState, PrimitiveTopology, RenderPipeline, RenderPipelineDescriptor, ShaderModuleDescriptor, ShaderSource,
ShaderStages, StencilState, TextureFormat, TextureSampleType, TextureViewDimension, VertexState,
DepthStencilState, Face, FragmentState, FrontFace, MultisampleState, PipelineCompilationOptions,
PipelineLayoutDescriptor, PolygonMode, PrimitiveState, PrimitiveTopology, RenderPipeline, RenderPipelineDescriptor,
ShaderModuleDescriptor, ShaderSource, ShaderStages, StencilState, TextureFormat, TextureSampleType,
TextureViewDimension, VertexState,
};

use crate::common::WholeFrameInterfaces;
Expand Down Expand Up @@ -140,7 +141,12 @@ impl SkyboxPipelines {
renderer.device.create_render_pipeline(&RenderPipelineDescriptor {
label: Some("skybox pass"),
layout: Some(&pll),
vertex: VertexState { module: &skybox_sm, entry_point: "vs_main", buffers: &[] },
vertex: VertexState {
module: &skybox_sm,
entry_point: "vs_main",
buffers: &[],
compilation_options: PipelineCompilationOptions::default(), // use default WGPU options. New in WGPU 0.20 (JN)
},
primitive: PrimitiveState {
topology: PrimitiveTopology::TriangleList,
strip_index_format: None,
Expand All @@ -166,6 +172,7 @@ impl SkyboxPipelines {
blend: None,
write_mask: ColorWrites::all(),
})],
compilation_options: PipelineCompilationOptions::default(), // use default WGPU options. New in WGPU 0.20 (JN)
}),
multiview: None,
})
Expand Down
14 changes: 10 additions & 4 deletions rend3-routine/src/tonemapping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ use rend3::{
};
use wgpu::{
BindGroup, BindGroupLayout, BindingType, ColorTargetState, ColorWrites, Device, FragmentState, FrontFace,
MultisampleState, PipelineLayoutDescriptor, PolygonMode, PrimitiveState, PrimitiveTopology, RenderPipeline,
RenderPipelineDescriptor, ShaderModuleDescriptor, ShaderSource, ShaderStages, TextureFormat, TextureSampleType,
TextureViewDimension, VertexState,
MultisampleState, PipelineCompilationOptions, PipelineLayoutDescriptor, PolygonMode, PrimitiveState,
PrimitiveTopology, RenderPipeline, RenderPipelineDescriptor, ShaderModuleDescriptor, ShaderSource, ShaderStages,
TextureFormat, TextureSampleType, TextureViewDimension, VertexState,
};

use crate::common::WholeFrameInterfaces;
Expand Down Expand Up @@ -52,7 +52,12 @@ fn create_pipeline(
device.create_render_pipeline(&RenderPipelineDescriptor {
label: Some("tonemapping pass"),
layout: Some(&pll),
vertex: VertexState { module: &module, entry_point: "vs_main", buffers: &[] },
vertex: VertexState {
module: &module,
entry_point: "vs_main",
buffers: &[],
compilation_options: PipelineCompilationOptions::default(), // use default WGPU options. New in WGPU 0.20 (JN)
},
primitive: PrimitiveState {
topology: PrimitiveTopology::TriangleList,
strip_index_format: None,
Expand All @@ -68,6 +73,7 @@ fn create_pipeline(
module: &module,
entry_point: fs_entry_point,
targets: &[Some(ColorTargetState { format: output_format, blend: None, write_mask: ColorWrites::all() })],
compilation_options: PipelineCompilationOptions::default(), // use default WGPU options. New in WGPU 0.20 (JN)
}),
multiview: None,
})
Expand Down
6 changes: 3 additions & 3 deletions rend3-test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rend3-test"
version = "0.3.0"
version = "0.20.0"
authors = ["The rend3 Developers"]
edition = "2021"
description = "Testing utilities for rend3."
Expand All @@ -18,10 +18,10 @@ anyhow = "1"
env_logger = "0.11"
flume = { version = "0.11", features = ["spin"] }
glam = "0.25"
image = { version = "0.24", default-features = false, features = ["png"] }
image = { version = "0.25", default-features = false, features = ["png", "jpeg"] }
rend3 = { path = "../rend3" }
rend3-routine = { path = "../rend3-routine" }
wgpu = "0.19.0"
wgpu = "0.20"

# These should be dev-deps but doing this allows us to have a single attribute on all tests
# and not need to have conditional attributes on every single test.
Expand Down
Loading