cleanup deps
This commit is contained in:
817
Cargo.lock
generated
817
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -12,12 +12,11 @@ edition = "2021"
|
||||
[dependencies]
|
||||
anyhow = "1.0.79"
|
||||
ash = "^0.37.2"
|
||||
ash-window = "0.12.0"
|
||||
chrono = "0.4.29"
|
||||
chrono-tz = "0.8.5"
|
||||
cstr = "0.2.11"
|
||||
ctrlc = { version = "3.4.2", features = ["termination"] }
|
||||
dbus = { version = "0.9.7", optional = true }
|
||||
dbus = { version = "0.9.7" }
|
||||
flexi_logger = "0.27.4"
|
||||
fontconfig-rs = "0.1.1"
|
||||
freetype-rs = "0.32.0"
|
||||
@@ -32,8 +31,6 @@ log = "0.4.20"
|
||||
once_cell = "1.18.0"
|
||||
openxr = { version = "0.17.1", features = ["linked"], optional = true }
|
||||
ovr_overlay = { features = ["ovr_input", "ovr_system"], git = "https://github.com/galister/ovr_overlay_oyasumi", optional = true }
|
||||
png = "0.17.10"
|
||||
raw-window-handle = "0.5.2"
|
||||
regex = "1.9.5"
|
||||
rodio = { version = "0.17.1", default-features = false, features = ["wav", "hound"] }
|
||||
rosc = { version = "0.10.1", optional = true }
|
||||
@@ -45,13 +42,11 @@ strum = { version = "0.25.0", features = ["derive"] }
|
||||
thiserror = "1.0.56"
|
||||
vulkano = { git = "https://github.com/vulkano-rs/vulkano", rev = "94f50f1" }
|
||||
vulkano-shaders = { git = "https://github.com/vulkano-rs/vulkano", rev = "94f50f1" }
|
||||
winit = "0.29.10"
|
||||
wlx-capture = { git = "https://github.com/galister/wlx-capture" }
|
||||
xdg = "2.5.2"
|
||||
|
||||
[features]
|
||||
default = ["openvr", "openxr", "osc", "x11", "wayland", "notifications"]
|
||||
notifications = ["dep:dbus"]
|
||||
default = ["openvr", "openxr", "osc", "x11", "wayland"]
|
||||
openvr = ["dep:ovr_overlay", "dep:json"]
|
||||
openxr = ["dep:openxr"]
|
||||
osc = ["dep:rosc"]
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
pub mod common;
|
||||
pub mod input;
|
||||
|
||||
#[cfg(feature = "notifications")]
|
||||
pub mod notifications;
|
||||
|
||||
#[cfg(feature = "openvr")]
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
io::Cursor,
|
||||
os::fd::{FromRawFd, IntoRawFd},
|
||||
slice::Iter,
|
||||
sync::{Arc, OnceLock, RwLock},
|
||||
@@ -17,16 +16,7 @@ use vulkano::{
|
||||
};
|
||||
|
||||
#[cfg(feature = "openxr")]
|
||||
use {ash::vk, std::os::raw::c_void, vulkano::swapchain::Surface};
|
||||
|
||||
pub const BLEND_ALPHA: AttachmentBlend = AttachmentBlend {
|
||||
src_color_blend_factor: BlendFactor::SrcAlpha,
|
||||
dst_color_blend_factor: BlendFactor::OneMinusSrcAlpha,
|
||||
color_blend_op: BlendOp::Add,
|
||||
src_alpha_blend_factor: BlendFactor::One,
|
||||
dst_alpha_blend_factor: BlendFactor::One,
|
||||
alpha_blend_op: BlendOp::Max,
|
||||
};
|
||||
use {ash::vk, std::os::raw::c_void};
|
||||
|
||||
use vulkano::{
|
||||
buffer::{
|
||||
@@ -111,6 +101,15 @@ pub struct Vert2Uv {
|
||||
|
||||
pub const INDICES: [u16; 6] = [2, 1, 0, 1, 2, 3];
|
||||
|
||||
pub const BLEND_ALPHA: AttachmentBlend = AttachmentBlend {
|
||||
src_color_blend_factor: BlendFactor::SrcAlpha,
|
||||
dst_color_blend_factor: BlendFactor::OneMinusSrcAlpha,
|
||||
color_blend_op: BlendOp::Add,
|
||||
src_alpha_blend_factor: BlendFactor::One,
|
||||
dst_alpha_blend_factor: BlendFactor::One,
|
||||
alpha_blend_op: BlendOp::Max,
|
||||
};
|
||||
|
||||
pub struct WlxGraphics {
|
||||
pub instance: Arc<Instance>,
|
||||
pub device: Arc<Device>,
|
||||
@@ -154,12 +153,11 @@ impl WlxGraphics {
|
||||
|
||||
use ash::vk::PhysicalDeviceDynamicRenderingFeatures;
|
||||
use vulkano::{Handle, Version};
|
||||
use winit::event_loop::EventLoop;
|
||||
|
||||
let event_loop = EventLoop::new()?;
|
||||
let mut instance_extensions = Surface::required_extensions(&event_loop)?;
|
||||
|
||||
instance_extensions.khr_get_physical_device_properties2 = true;
|
||||
let instance_extensions = InstanceExtensions {
|
||||
khr_get_physical_device_properties2: true,
|
||||
..InstanceExtensions::empty()
|
||||
};
|
||||
|
||||
let instance_extensions_raw = instance_extensions
|
||||
.into_iter()
|
||||
@@ -930,19 +928,6 @@ impl WlxCommandBuffer {
|
||||
Ok(image)
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn texture2d_png(&mut self, bytes: Vec<u8>) -> anyhow::Result<Arc<Image>> {
|
||||
let cursor = Cursor::new(bytes);
|
||||
let decoder = png::Decoder::new(cursor);
|
||||
let mut reader = decoder.read_info()?;
|
||||
let info = reader.info();
|
||||
let width = info.width;
|
||||
let height = info.height;
|
||||
let mut image_data = vec![0; (info.width * info.height * 4) as usize];
|
||||
reader.next_frame(&mut image_data)?;
|
||||
self.texture2d(width, height, Format::R8G8B8A8_UNORM, &image_data)
|
||||
}
|
||||
|
||||
pub fn end_render_pass(&mut self) -> anyhow::Result<()> {
|
||||
self.command_buffer
|
||||
.end_render_pass(SubpassEndInfo::default())?;
|
||||
|
||||
Reference in New Issue
Block a user