File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed
Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ mockall = "=0.11.3"
2929
3030[features ]
3131default =[" shaderc/build-from-source" ]
32- detect-platform =[]
32+ detect-platform =[" dep:default_backend " ]
3333winit-windowing =[]
3434gfx-with-opengl =[" dep:gfx-backend-gl" ]
3535gfx-with-vulkan =[" dep:gfx-backend-vulkan" ]
@@ -41,14 +41,17 @@ gfx-with-dx12=["dep:gfx-backend-dx12"]
4141crate-type = [" cdylib" , " rlib" ]
4242incremental = true
4343
44- [target .'cfg(all(unix, not(target_os = "macos")))' .dependencies .gfx-backend-gl ]
44+ [target .'cfg(all(unix, not(target_os = "macos")))' .dependencies .default_backend ]
4545package = " gfx-backend-gl"
4646version = " =0.9.0"
47+ optional = true
4748
48- [target .'cfg(all(target_os = "macos"))' .dependencies .gfx-backend-metal ]
49+ [target .'cfg(all(target_os = "macos"))' .dependencies .default_backend ]
4950package = " gfx-backend-metal"
5051version = " =0.9.0"
52+ optional = true
5153
52- [target .'cfg(all(windows))' .dependencies . gfx-backend-dx12 ]
54+ [target .'cfg(all(windows))' .depedencies . default_backend ]
5355package = " gfx-backend-dx12"
5456version = " =0.9.0"
57+ optional = true
Original file line number Diff line number Diff line change @@ -12,13 +12,13 @@ if #[cfg(feature = "gfx-with-gl")] {
1212 pub use gfx_backend_dx11 as RenderingAPI ;
1313} else if #[ cfg( feature = "gfx-with-dx12" ) ] {
1414 pub use gfx_backend_dx12 as RenderingAPI ;
15- } else if #[ cfg( all( feature = "detect-platform" , windows ) ) ] {
16- pub use gfx_backend_dx12 as RenderingAPI ;
15+ } else if #[ cfg( all( feature = "detect-platform" ) ) ] {
16+ pub use default_backend as RenderingAPI ;
1717} else if #[ cfg( all( feature = "detect-platform" , target_os = "macos" ) ) ] {
1818 pub use gfx_backend_metal as RenderingAPI ;
1919} else if #[ cfg( all( feature = "detect-platform" , unix, not( target_os = "macos" ) ) ) ] {
2020 pub use gfx_backend_gl as RenderingAPI ;
2121} else {
22- compile_error !( "No supported GPU API found for the current platform." ) ;
22+ panic !( "No supported GPU API found for the current platform." ) ;
2323 }
2424}
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ name = "lambda"
1212path = " src/lib.rs"
1313
1414[dependencies ]
15- lambda-rs-platform = { path = " ../lambda-rs-platform" , version = " 2023.1.26" }
15+ lambda-rs-platform = { path = " ../lambda-rs-platform" , version = " 2023.1.26" }
1616
1717[dev-dependencies ]
1818cargo-audit = " 0.16.0"
You can’t perform that action at this time.
0 commit comments