mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-10-29 21:42:26 +00:00
Task graph [4/10]: compilation (#2560)
This commit is contained in:
parent
cd4603b3cc
commit
79c30fd1a8
11
Cargo.lock
generated
11
Cargo.lock
generated
@ -114,6 +114,7 @@ dependencies = [
|
|||||||
"rand",
|
"rand",
|
||||||
"vulkano",
|
"vulkano",
|
||||||
"vulkano-shaders",
|
"vulkano-shaders",
|
||||||
|
"vulkano-taskgraph",
|
||||||
"winit 0.29.15",
|
"winit 0.29.15",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -402,7 +403,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "concurrent-slotmap"
|
name = "concurrent-slotmap"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/vulkano-rs/concurrent-slotmap?rev=bf52f0a55713bb29dde3e38bc3497b03473d1628#bf52f0a55713bb29dde3e38bc3497b03473d1628"
|
source = "git+https://github.com/vulkano-rs/concurrent-slotmap?rev=fa906d916d8d126d3cc3a2b4ab9a29fa27bee62d#fa906d916d8d126d3cc3a2b4ab9a29fa27bee62d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"virtual-buffer",
|
"virtual-buffer",
|
||||||
]
|
]
|
||||||
@ -1684,12 +1685,6 @@ dependencies = [
|
|||||||
"getrandom",
|
"getrandom",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "rangemap"
|
|
||||||
version = "1.5.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f60fcc7d6849342eff22c4350c8b9a989ee8ceabc4b481253e8946b9fe83d684"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "raw-window-handle"
|
name = "raw-window-handle"
|
||||||
version = "0.4.3"
|
version = "0.4.3"
|
||||||
@ -2408,10 +2403,10 @@ dependencies = [
|
|||||||
name = "vulkano-taskgraph"
|
name = "vulkano-taskgraph"
|
||||||
version = "0.34.0"
|
version = "0.34.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"ahash",
|
||||||
"ash",
|
"ash",
|
||||||
"concurrent-slotmap",
|
"concurrent-slotmap",
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"rangemap",
|
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"thread_local",
|
"thread_local",
|
||||||
"vulkano",
|
"vulkano",
|
||||||
|
@ -31,6 +31,10 @@ path = "vulkano-macros"
|
|||||||
version = "0.34"
|
version = "0.34"
|
||||||
path = "vulkano-shaders"
|
path = "vulkano-shaders"
|
||||||
|
|
||||||
|
[workspace.dependencies.vulkano-taskgraph]
|
||||||
|
version = "0.34"
|
||||||
|
path = "vulkano-taskgraph"
|
||||||
|
|
||||||
[workspace.dependencies.vulkano-util]
|
[workspace.dependencies.vulkano-util]
|
||||||
version = "0.34"
|
version = "0.34"
|
||||||
path = "vulkano-util"
|
path = "vulkano-util"
|
||||||
@ -42,7 +46,7 @@ ahash = "0.8"
|
|||||||
# https://github.com/KhronosGroup/Vulkan-Headers/commits/main/registry/vk.xml
|
# https://github.com/KhronosGroup/Vulkan-Headers/commits/main/registry/vk.xml
|
||||||
ash = "0.38.0"
|
ash = "0.38.0"
|
||||||
bytemuck = "1.9"
|
bytemuck = "1.9"
|
||||||
concurrent-slotmap = { git = "https://github.com/vulkano-rs/concurrent-slotmap", rev = "bf52f0a55713bb29dde3e38bc3497b03473d1628" }
|
concurrent-slotmap = { git = "https://github.com/vulkano-rs/concurrent-slotmap", rev = "fa906d916d8d126d3cc3a2b4ab9a29fa27bee62d" }
|
||||||
core-graphics-types = "0.1"
|
core-graphics-types = "0.1"
|
||||||
crossbeam-queue = "0.3"
|
crossbeam-queue = "0.3"
|
||||||
half = "2.0"
|
half = "2.0"
|
||||||
|
@ -16,4 +16,5 @@ glam = { workspace = true }
|
|||||||
rand = { workspace = true }
|
rand = { workspace = true }
|
||||||
vulkano = { workspace = true, features = ["macros"] }
|
vulkano = { workspace = true, features = ["macros"] }
|
||||||
vulkano-shaders = { workspace = true }
|
vulkano-shaders = { workspace = true }
|
||||||
|
vulkano-taskgraph = { workspace = true }
|
||||||
winit = { workspace = true, default-features = true }
|
winit = { workspace = true, default-features = true }
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -14,10 +14,10 @@ keywords = { workspace = true }
|
|||||||
categories = { workspace = true }
|
categories = { workspace = true }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
ahash = { workspace = true }
|
||||||
ash = { workspace = true }
|
ash = { workspace = true }
|
||||||
concurrent-slotmap = { workspace = true }
|
concurrent-slotmap = { workspace = true }
|
||||||
parking_lot = { workspace = true }
|
parking_lot = { workspace = true }
|
||||||
rangemap = { workspace = true }
|
|
||||||
smallvec = { workspace = true }
|
smallvec = { workspace = true }
|
||||||
thread_local = { workspace = true }
|
thread_local = { workspace = true }
|
||||||
vulkano = { workspace = true }
|
vulkano = { workspace = true }
|
||||||
|
2622
vulkano-taskgraph/src/graph/compile.rs
Normal file
2622
vulkano-taskgraph/src/graph/compile.rs
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -512,33 +512,33 @@ vulkan_bitflags! {
|
|||||||
|
|
||||||
/// A set of memory access types that are included in a memory dependency.
|
/// A set of memory access types that are included in a memory dependency.
|
||||||
AccessFlags impl {
|
AccessFlags impl {
|
||||||
// TODO: use the Vulkano associated constants once | becomes const for custom types.
|
const WRITES: AccessFlags = AccessFlags::SHADER_WRITE
|
||||||
const WRITES: AccessFlags = AccessFlags(
|
.union(AccessFlags::COLOR_ATTACHMENT_WRITE)
|
||||||
ash::vk::AccessFlags2::SHADER_WRITE.as_raw()
|
.union(AccessFlags::DEPTH_STENCIL_ATTACHMENT_WRITE)
|
||||||
| ash::vk::AccessFlags2::COLOR_ATTACHMENT_WRITE.as_raw()
|
.union(AccessFlags::TRANSFER_WRITE)
|
||||||
| ash::vk::AccessFlags2::DEPTH_STENCIL_ATTACHMENT_WRITE.as_raw()
|
.union(AccessFlags::HOST_WRITE)
|
||||||
| ash::vk::AccessFlags2::TRANSFER_WRITE.as_raw()
|
.union(AccessFlags::MEMORY_WRITE)
|
||||||
| ash::vk::AccessFlags2::HOST_WRITE.as_raw()
|
.union(AccessFlags::SHADER_STORAGE_WRITE)
|
||||||
| ash::vk::AccessFlags2::MEMORY_WRITE.as_raw()
|
.union(AccessFlags::VIDEO_DECODE_WRITE)
|
||||||
| ash::vk::AccessFlags2::SHADER_STORAGE_WRITE.as_raw()
|
.union(AccessFlags::VIDEO_ENCODE_WRITE)
|
||||||
| ash::vk::AccessFlags2::VIDEO_DECODE_WRITE_KHR.as_raw()
|
.union(AccessFlags::TRANSFORM_FEEDBACK_WRITE)
|
||||||
| ash::vk::AccessFlags2::VIDEO_ENCODE_WRITE_KHR.as_raw()
|
.union(AccessFlags::TRANSFORM_FEEDBACK_COUNTER_WRITE)
|
||||||
| ash::vk::AccessFlags2::TRANSFORM_FEEDBACK_WRITE_EXT.as_raw()
|
.union(AccessFlags::COMMAND_PREPROCESS_WRITE)
|
||||||
| ash::vk::AccessFlags2::TRANSFORM_FEEDBACK_COUNTER_WRITE_EXT.as_raw()
|
.union(AccessFlags::ACCELERATION_STRUCTURE_WRITE);
|
||||||
| ash::vk::AccessFlags2::COMMAND_PREPROCESS_WRITE_NV.as_raw()
|
|
||||||
| ash::vk::AccessFlags2::ACCELERATION_STRUCTURE_WRITE_KHR.as_raw()
|
|
||||||
);
|
|
||||||
|
|
||||||
pub(crate) fn contains_reads(self) -> bool {
|
/// Returns whether `self` contains any read flags.
|
||||||
!(self - Self::WRITES).is_empty()
|
#[inline]
|
||||||
|
pub const fn contains_reads(self) -> bool {
|
||||||
|
!self.difference(Self::WRITES).is_empty()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn contains_writes(self) -> bool {
|
/// Returns whether `self` contains any write flags.
|
||||||
|
#[inline]
|
||||||
|
pub const fn contains_writes(self) -> bool {
|
||||||
self.intersects(Self::WRITES)
|
self.intersects(Self::WRITES)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns whether `self` contains stages that are only available in
|
/// Returns whether `self` contains flags that are only available in `VkAccessFlagBits2`.
|
||||||
/// `VkAccessFlagBits2`.
|
|
||||||
pub(crate) fn contains_flags2(self) -> bool {
|
pub(crate) fn contains_flags2(self) -> bool {
|
||||||
!(self
|
!(self
|
||||||
- (AccessFlags::INDIRECT_COMMAND_READ
|
- (AccessFlags::INDIRECT_COMMAND_READ
|
||||||
|
Loading…
Reference in New Issue
Block a user