feat: setup bevy-dmabuf, not hooked up yet
Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
22
Cargo.lock
generated
22
Cargo.lock
generated
@@ -589,6 +589,23 @@ dependencies = [
|
|||||||
"tracing",
|
"tracing",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "bevy-dmabuf"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "321fa0b7c6b02ac16d5f85f1703b9d4a9a50e2ad3f9adae3b52138868a2747e8"
|
||||||
|
dependencies = [
|
||||||
|
"ash",
|
||||||
|
"bevy",
|
||||||
|
"color-eyre",
|
||||||
|
"drm-fourcc",
|
||||||
|
"serde",
|
||||||
|
"thiserror 2.0.12",
|
||||||
|
"tracing",
|
||||||
|
"wgpu",
|
||||||
|
"zbus",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bevy-mesh-text-3d"
|
name = "bevy-mesh-text-3d"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
@@ -1092,7 +1109,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "bevy_mod_openxr"
|
name = "bevy_mod_openxr"
|
||||||
version = "0.3.0"
|
version = "0.3.0"
|
||||||
source = "git+https://github.com/Schmarni-Dev/bevy_openxr?branch=non_default_wait_frame_system#f0fd9a3086f1d898cf8d1a5338a3deae7ef66e2f"
|
source = "git+https://github.com/Schmarni-Dev/bevy_openxr?branch=vk_exts#a60db3da6cfa48afb3345c3c370fa26578bda341"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"android_system_properties",
|
"android_system_properties",
|
||||||
"ash",
|
"ash",
|
||||||
@@ -1110,7 +1127,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "bevy_mod_xr"
|
name = "bevy_mod_xr"
|
||||||
version = "0.3.0"
|
version = "0.3.0"
|
||||||
source = "git+https://github.com/Schmarni-Dev/bevy_openxr?branch=non_default_wait_frame_system#f0fd9a3086f1d898cf8d1a5338a3deae7ef66e2f"
|
source = "git+https://github.com/Schmarni-Dev/bevy_openxr?branch=vk_exts#a60db3da6cfa48afb3345c3c370fa26578bda341"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bevy",
|
"bevy",
|
||||||
]
|
]
|
||||||
@@ -5350,6 +5367,7 @@ name = "stardust-xr-server"
|
|||||||
version = "0.45.0"
|
version = "0.45.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bevy",
|
"bevy",
|
||||||
|
"bevy-dmabuf",
|
||||||
"bevy-mesh-text-3d",
|
"bevy-mesh-text-3d",
|
||||||
"bevy_mod_openxr",
|
"bevy_mod_openxr",
|
||||||
"bevy_mod_xr",
|
"bevy_mod_xr",
|
||||||
|
|||||||
13
Cargo.toml
13
Cargo.toml
@@ -42,17 +42,9 @@ auto_link_exclude_list = ["libc*", "libdl*", "libpthread*", "ld-linux*"]
|
|||||||
[profile.dev.package."*"]
|
[profile.dev.package."*"]
|
||||||
opt-level = 3
|
opt-level = 3
|
||||||
|
|
||||||
# [profile.release]
|
|
||||||
# opt-level = 3
|
|
||||||
# debug = "line-tables-only"
|
|
||||||
# strip = true
|
|
||||||
# debug-assertions = true
|
|
||||||
# overflow-checks = false
|
|
||||||
# lto = "thin"
|
|
||||||
|
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
bevy_mod_openxr = { git = "https://github.com/Schmarni-Dev/bevy_openxr", branch = "non_default_wait_frame_system" }
|
bevy_mod_openxr = { git = "https://github.com/Schmarni-Dev/bevy_openxr", branch = "vk_exts" }
|
||||||
bevy_mod_xr = { git = "https://github.com/Schmarni-Dev/bevy_openxr", branch = "non_default_wait_frame_system" }
|
bevy_mod_xr = { git = "https://github.com/Schmarni-Dev/bevy_openxr", branch = "vk_exts" }
|
||||||
bevy_gltf = { git = "https://github.com/Schmarni-Dev/bevy", branch = "gltf_backport" }
|
bevy_gltf = { git = "https://github.com/Schmarni-Dev/bevy", branch = "gltf_backport" }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
@@ -114,6 +106,7 @@ bevy_mod_xr = "0.3"
|
|||||||
bevy_mod_openxr = "0.3"
|
bevy_mod_openxr = "0.3"
|
||||||
# bevy_sk.git = "https://github.com/MalekiRe/bevy_sk"
|
# bevy_sk.git = "https://github.com/MalekiRe/bevy_sk"
|
||||||
bevy_sk = { git = "https://github.com/technobaboo/bevy_sk", branch = "stochastic" }
|
bevy_sk = { git = "https://github.com/technobaboo/bevy_sk", branch = "stochastic" }
|
||||||
|
bevy-dmabuf = "0.1.0"
|
||||||
|
|
||||||
# bevy-mesh-text-3d.git = "https://github.com/terhechte/bevy-mesh-text-3d"
|
# bevy-mesh-text-3d.git = "https://github.com/terhechte/bevy-mesh-text-3d"
|
||||||
# use my fork until my pr to use minimal bevy features was merged
|
# use my fork until my pr to use minimal bevy features was merged
|
||||||
|
|||||||
13
src/main.rs
13
src/main.rs
@@ -28,12 +28,14 @@ use bevy::render::settings::{Backends, RenderCreation, WgpuSettings};
|
|||||||
use bevy::render::{RenderDebugFlags, RenderPlugin};
|
use bevy::render::{RenderDebugFlags, RenderPlugin};
|
||||||
use bevy::scene::ScenePlugin;
|
use bevy::scene::ScenePlugin;
|
||||||
use bevy::winit::{WakeUp, WinitPlugin};
|
use bevy::winit::{WakeUp, WinitPlugin};
|
||||||
|
use bevy_dmabuf::import::DmabufImportPlugin;
|
||||||
use bevy_mod_openxr::action_set_attaching::OxrActionAttachingPlugin;
|
use bevy_mod_openxr::action_set_attaching::OxrActionAttachingPlugin;
|
||||||
use bevy_mod_openxr::action_set_syncing::OxrActionSyncingPlugin;
|
use bevy_mod_openxr::action_set_syncing::OxrActionSyncingPlugin;
|
||||||
use bevy_mod_openxr::add_xr_plugins;
|
use bevy_mod_openxr::add_xr_plugins;
|
||||||
use bevy_mod_openxr::exts::OxrExtensions;
|
use bevy_mod_openxr::exts::OxrExtensions;
|
||||||
use bevy_mod_openxr::features::overlay::OxrOverlaySettings;
|
use bevy_mod_openxr::features::overlay::OxrOverlaySettings;
|
||||||
use bevy_mod_openxr::features::passthrough::OxrPassthroughPlugin;
|
use bevy_mod_openxr::features::passthrough::OxrPassthroughPlugin;
|
||||||
|
use bevy_mod_openxr::graphics::{GraphicsBackend, OxrManualGraphicsConfig};
|
||||||
use bevy_mod_openxr::init::{OxrInitPlugin, should_run_frame_loop};
|
use bevy_mod_openxr::init::{OxrInitPlugin, should_run_frame_loop};
|
||||||
use bevy_mod_openxr::reference_space::OxrReferenceSpacePlugin;
|
use bevy_mod_openxr::reference_space::OxrReferenceSpacePlugin;
|
||||||
use bevy_mod_openxr::render::{OxrRenderPlugin, OxrWaitFrameSystem};
|
use bevy_mod_openxr::render::{OxrRenderPlugin, OxrWaitFrameSystem};
|
||||||
@@ -245,6 +247,11 @@ fn bevy_loop(
|
|||||||
) -> AppExit {
|
) -> AppExit {
|
||||||
let mut app = App::new();
|
let mut app = App::new();
|
||||||
app.insert_resource(DbusConnection(dbus_connection));
|
app.insert_resource(DbusConnection(dbus_connection));
|
||||||
|
app.insert_resource(OxrManualGraphicsConfig {
|
||||||
|
fallback_backend: GraphicsBackend::Vulkan(()),
|
||||||
|
vk_instance_exts: Vec::new(),
|
||||||
|
vk_device_exts: bevy_dmabuf::required_device_extensions(),
|
||||||
|
});
|
||||||
app.add_plugins(AssetPlugin {
|
app.add_plugins(AssetPlugin {
|
||||||
meta_check: AssetMetaCheck::Never,
|
meta_check: AssetMetaCheck::Never,
|
||||||
unapproved_path_mode: UnapprovedPathMode::Allow,
|
unapproved_path_mode: UnapprovedPathMode::Allow,
|
||||||
@@ -284,7 +291,8 @@ fn bevy_loop(
|
|||||||
// .add(AnimationPlugin)
|
// .add(AnimationPlugin)
|
||||||
.add(AudioPlugin::default())
|
.add(AudioPlugin::default())
|
||||||
.add(GizmoPlugin)
|
.add(GizmoPlugin)
|
||||||
.add(WindowPlugin::default());
|
.add(WindowPlugin::default())
|
||||||
|
.add(DmabufImportPlugin);
|
||||||
let mut task_pool_plugin = TaskPoolPlugin::default();
|
let mut task_pool_plugin = TaskPoolPlugin::default();
|
||||||
// make tokio work
|
// make tokio work
|
||||||
let handle = tokio::runtime::Handle::current();
|
let handle = tokio::runtime::Handle::current();
|
||||||
@@ -344,7 +352,8 @@ fn bevy_loop(
|
|||||||
.disable::<OxrActionSyncingPlugin>()
|
.disable::<OxrActionSyncingPlugin>()
|
||||||
} else {
|
} else {
|
||||||
// enable a event
|
// enable a event
|
||||||
plugins.add(XrSessionPlugin { auto_handle: false })
|
plugins = plugins.add(XrSessionPlugin { auto_handle: false });
|
||||||
|
bevy_dmabuf::wgpu_init::add_dmabuf_init_plugin(plugins)
|
||||||
});
|
});
|
||||||
|
|
||||||
app.add_plugins(bevy_sk::hand::HandPlugin);
|
app.add_plugins(bevy_sk::hand::HandPlugin);
|
||||||
|
|||||||
Reference in New Issue
Block a user