Move back to upstream wgpu repository

We're relying on unreleased changes, so we depend on the latest commit
from their repository.
This commit is contained in:
Aaron Hill 2023-01-18 21:32:23 -05:00 committed by Nathan Adams
parent d280d44eed
commit 6fe7af58d5
10 changed files with 61 additions and 16 deletions

43
Cargo.lock generated
View File

@ -144,9 +144,9 @@ dependencies = [
[[package]]
name = "ash"
version = "0.37.1+1.3.235"
version = "0.37.2+1.3.238"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "911015c962d56e2e4052f40182ca5462ba60a3d2ff04e827c365a0ab3d65726d"
checksum = "28bf19c1f0a470be5fbf7522a308a05df06610252c5bcf5143e1b23f629a9a03"
dependencies = [
"libloading",
]
@ -582,6 +582,12 @@ dependencies = [
"winapi",
]
[[package]]
name = "com-rs"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf43edc576402991846b093a7ca18a3477e0ef9c588cde84964b5d3e43016642"
[[package]]
name = "combine"
version = "4.6.6"
@ -1961,6 +1967,21 @@ dependencies = [
"ahash",
]
[[package]]
name = "hassle-rs"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90601c6189668c7345fc53842cb3f3a3d872203d523be1b3cb44a36a3e62fb85"
dependencies = [
"bitflags",
"com-rs",
"libc",
"libloading",
"thiserror",
"widestring",
"winapi",
]
[[package]]
name = "heck"
version = "0.4.0"
@ -2568,7 +2589,7 @@ dependencies = [
[[package]]
name = "naga"
version = "0.10.0"
source = "git+https://github.com/gfx-rs/naga?rev=e7fc8e6#e7fc8e64f2f23397b149217ecce6e123c5aa5092"
source = "git+https://github.com/gfx-rs/naga?rev=e98bd92#e98bd9264c3a6b04dff15a6b1213c0c80201740a"
dependencies = [
"bit-set",
"bitflags",
@ -4929,7 +4950,7 @@ dependencies = [
[[package]]
name = "wgpu"
version = "0.14.0"
source = "git+https://github.com/Dinnerbone/wgpu?rev=a154700447338d7333f1a226e3699d0f72e684e4#a154700447338d7333f1a226e3699d0f72e684e4"
source = "git+https://github.com/gfx-rs/wgpu?rev=e3ebb03d0f14716bc0527f8076c9efae1fbad4c6#e3ebb03d0f14716bc0527f8076c9efae1fbad4c6"
dependencies = [
"arrayvec 0.7.2",
"cfg-if 1.0.0",
@ -4937,6 +4958,7 @@ dependencies = [
"log",
"naga",
"parking_lot",
"profiling",
"raw-window-handle 0.5.0",
"serde",
"smallvec",
@ -4952,7 +4974,7 @@ dependencies = [
[[package]]
name = "wgpu-core"
version = "0.14.0"
source = "git+https://github.com/Dinnerbone/wgpu?rev=a154700447338d7333f1a226e3699d0f72e684e4#a154700447338d7333f1a226e3699d0f72e684e4"
source = "git+https://github.com/gfx-rs/wgpu?rev=e3ebb03d0f14716bc0527f8076c9efae1fbad4c6#e3ebb03d0f14716bc0527f8076c9efae1fbad4c6"
dependencies = [
"arrayvec 0.7.2",
"bit-vec",
@ -4976,7 +4998,7 @@ dependencies = [
[[package]]
name = "wgpu-hal"
version = "0.14.0"
source = "git+https://github.com/Dinnerbone/wgpu?rev=a154700447338d7333f1a226e3699d0f72e684e4#a154700447338d7333f1a226e3699d0f72e684e4"
source = "git+https://github.com/gfx-rs/wgpu?rev=e3ebb03d0f14716bc0527f8076c9efae1fbad4c6#e3ebb03d0f14716bc0527f8076c9efae1fbad4c6"
dependencies = [
"android_system_properties",
"arrayvec 0.7.2",
@ -4992,6 +5014,7 @@ dependencies = [
"gpu-alloc",
"gpu-allocator",
"gpu-descriptor",
"hassle-rs",
"js-sys",
"khronos-egl",
"libc",
@ -5016,7 +5039,7 @@ dependencies = [
[[package]]
name = "wgpu-types"
version = "0.14.0"
source = "git+https://github.com/Dinnerbone/wgpu?rev=a154700447338d7333f1a226e3699d0f72e684e4#a154700447338d7333f1a226e3699d0f72e684e4"
source = "git+https://github.com/gfx-rs/wgpu?rev=e3ebb03d0f14716bc0527f8076c9efae1fbad4c6#e3ebb03d0f14716bc0527f8076c9efae1fbad4c6"
dependencies = [
"bitflags",
"serde",
@ -5032,6 +5055,12 @@ dependencies = [
"safe_arch 0.6.0",
]
[[package]]
name = "widestring"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17882f045410753661207383517a6f62ec3dbeb6a4ed2acce01f0728238d1983"
[[package]]
name = "winapi"
version = "0.3.9"

View File

@ -71,6 +71,5 @@ inherits = "release"
[profile.web-wasm-extensions]
inherits = "release"
[patch.crates-io]
naga = { git = "https://github.com/gfx-rs/naga", rev = "e7fc8e6" }
naga = { git = "https://github.com/gfx-rs/naga", rev = "e98bd92" }

View File

@ -381,7 +381,10 @@ fn trace_path(_opt: &Opt) -> Option<&Path> {
fn main() -> Result<()> {
let opt: Opt = Opt::parse();
let instance = wgpu::Instance::new(opt.graphics.into());
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: opt.graphics.into(),
dx12_shader_compiler: wgpu::Dx12Compiler::default(),
});
let descriptors =
futures::executor::block_on(WgpuRenderBackend::<TextureTarget>::build_descriptors(
opt.graphics.into(),

View File

@ -9,10 +9,10 @@ version.workspace = true
[dependencies]
bitflags = "1.3.2"
naga = { git = "https://github.com/gfx-rs/naga", rev = "e7fc8e6" }
naga = { git = "https://github.com/gfx-rs/naga", rev = "e98bd92" }
num-derive = "0.3.3"
num-traits = "0.2.15"
[dev-dependencies]
insta = "1.26.0"
naga = { git = "https://github.com/gfx-rs/naga", rev = "e7fc8e6", features = ["wgsl-out", "validate"] }
naga = { git = "https://github.com/gfx-rs/naga", rev = "e98bd92", features = ["wgsl-out", "validate"] }

View File

@ -8,7 +8,7 @@ repository.workspace = true
version.workspace = true
[dependencies]
wgpu = { git = "https://github.com/Dinnerbone/wgpu", rev = "a154700447338d7333f1a226e3699d0f72e684e4", features = ["naga"] }
wgpu = { git = "https://github.com/gfx-rs/wgpu", rev = "e3ebb03d0f14716bc0527f8076c9efae1fbad4c6", features = ["naga"] }
tracing = "0.1.37"
ruffle_render = { path = "..", features = ["tessellator"] }
bytemuck = { version = "1.12.3", features = ["derive"] }

View File

@ -80,7 +80,10 @@ impl WgpuRenderBackend<SwapChainTarget> {
format_list(&get_backend_names(backend), "and")
);
}
let instance = wgpu::Instance::new(backend);
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: backend,
dx12_shader_compiler: wgpu::Dx12Compiler::default(),
});
let surface = unsafe { instance.create_surface(window) }?;
let descriptors = futures::executor::block_on(Self::build_descriptors(
backend,
@ -108,7 +111,10 @@ impl WgpuRenderBackend<crate::target::TextureTarget> {
format_list(&get_backend_names(backend), "and")
);
}
let instance = wgpu::Instance::new(backend);
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: backend,
dx12_shader_compiler: wgpu::Dx12Compiler::default(),
});
let descriptors = futures::executor::block_on(Self::build_descriptors(
backend,
instance,
@ -297,6 +303,7 @@ impl<T: RenderTarget + 'static> RenderBackend for WgpuRenderBackend<T> {
sample_count: 1,
dimension: wgpu::TextureDimension::D2,
format,
view_formats: &[format],
usage: wgpu::TextureUsages::COPY_SRC,
});
@ -466,6 +473,7 @@ impl<T: RenderTarget + 'static> RenderBackend for WgpuRenderBackend<T> {
sample_count: 1,
dimension: wgpu::TextureDimension::D2,
format: wgpu::TextureFormat::Rgba8Unorm,
view_formats: &[wgpu::TextureFormat::Rgba8Unorm],
usage: wgpu::TextureUsages::TEXTURE_BINDING
| wgpu::TextureUsages::COPY_DST
| wgpu::TextureUsages::RENDER_ATTACHMENT

View File

@ -53,6 +53,7 @@ impl TexturePool {
sample_count,
dimension: wgpu::TextureDimension::D2,
format,
view_formats: &[format],
usage,
});
let view = texture.create_view(&Default::default());

View File

@ -281,6 +281,7 @@ impl WgpuContext3D {
sample_count: 1,
dimension: wgpu::TextureDimension::D2,
format,
view_formats: &[format],
usage: wgpu::TextureUsages::RENDER_ATTACHMENT
| wgpu::TextureUsages::COPY_SRC
| wgpu::TextureUsages::TEXTURE_BINDING,

View File

@ -188,6 +188,7 @@ impl TextureTarget {
sample_count: 1,
dimension: wgpu::TextureDimension::D2,
format,
view_formats: &[format],
usage: wgpu::TextureUsages::RENDER_ATTACHMENT | wgpu::TextureUsages::COPY_SRC,
});
let buffer_label = create_debug_label!("Render target buffer");

View File

@ -1423,7 +1423,10 @@ fn run_swf(
if check_img {
const BACKEND: wgpu::Backends = wgpu::Backends::PRIMARY;
let instance = wgpu::Instance::new(BACKEND);
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: BACKEND,
dx12_shader_compiler: wgpu::Dx12Compiler::default(),
});
let descriptors =
futures::executor::block_on(WgpuRenderBackend::<TextureTarget>::build_descriptors(