mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-21 22:34:43 +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",
|
||||
"vulkano",
|
||||
"vulkano-shaders",
|
||||
"vulkano-taskgraph",
|
||||
"winit 0.29.15",
|
||||
]
|
||||
|
||||
@ -402,7 +403,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "concurrent-slotmap"
|
||||
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 = [
|
||||
"virtual-buffer",
|
||||
]
|
||||
@ -1684,12 +1685,6 @@ dependencies = [
|
||||
"getrandom",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rangemap"
|
||||
version = "1.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f60fcc7d6849342eff22c4350c8b9a989ee8ceabc4b481253e8946b9fe83d684"
|
||||
|
||||
[[package]]
|
||||
name = "raw-window-handle"
|
||||
version = "0.4.3"
|
||||
@ -2408,10 +2403,10 @@ dependencies = [
|
||||
name = "vulkano-taskgraph"
|
||||
version = "0.34.0"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"ash",
|
||||
"concurrent-slotmap",
|
||||
"parking_lot",
|
||||
"rangemap",
|
||||
"smallvec",
|
||||
"thread_local",
|
||||
"vulkano",
|
||||
|
@ -31,6 +31,10 @@ path = "vulkano-macros"
|
||||
version = "0.34"
|
||||
path = "vulkano-shaders"
|
||||
|
||||
[workspace.dependencies.vulkano-taskgraph]
|
||||
version = "0.34"
|
||||
path = "vulkano-taskgraph"
|
||||
|
||||
[workspace.dependencies.vulkano-util]
|
||||
version = "0.34"
|
||||
path = "vulkano-util"
|
||||
@ -42,7 +46,7 @@ ahash = "0.8"
|
||||
# https://github.com/KhronosGroup/Vulkan-Headers/commits/main/registry/vk.xml
|
||||
ash = "0.38.0"
|
||||
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"
|
||||
crossbeam-queue = "0.3"
|
||||
half = "2.0"
|
||||
|
@ -16,4 +16,5 @@ glam = { workspace = true }
|
||||
rand = { workspace = true }
|
||||
vulkano = { workspace = true, features = ["macros"] }
|
||||
vulkano-shaders = { workspace = true }
|
||||
vulkano-taskgraph = { workspace = 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 }
|
||||
|
||||
[dependencies]
|
||||
ahash = { workspace = true }
|
||||
ash = { workspace = true }
|
||||
concurrent-slotmap = { workspace = true }
|
||||
parking_lot = { workspace = true }
|
||||
rangemap = { workspace = true }
|
||||
smallvec = { workspace = true }
|
||||
thread_local = { 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.
|
||||
AccessFlags impl {
|
||||
// TODO: use the Vulkano associated constants once | becomes const for custom types.
|
||||
const WRITES: AccessFlags = AccessFlags(
|
||||
ash::vk::AccessFlags2::SHADER_WRITE.as_raw()
|
||||
| ash::vk::AccessFlags2::COLOR_ATTACHMENT_WRITE.as_raw()
|
||||
| ash::vk::AccessFlags2::DEPTH_STENCIL_ATTACHMENT_WRITE.as_raw()
|
||||
| ash::vk::AccessFlags2::TRANSFER_WRITE.as_raw()
|
||||
| ash::vk::AccessFlags2::HOST_WRITE.as_raw()
|
||||
| ash::vk::AccessFlags2::MEMORY_WRITE.as_raw()
|
||||
| ash::vk::AccessFlags2::SHADER_STORAGE_WRITE.as_raw()
|
||||
| ash::vk::AccessFlags2::VIDEO_DECODE_WRITE_KHR.as_raw()
|
||||
| ash::vk::AccessFlags2::VIDEO_ENCODE_WRITE_KHR.as_raw()
|
||||
| ash::vk::AccessFlags2::TRANSFORM_FEEDBACK_WRITE_EXT.as_raw()
|
||||
| ash::vk::AccessFlags2::TRANSFORM_FEEDBACK_COUNTER_WRITE_EXT.as_raw()
|
||||
| ash::vk::AccessFlags2::COMMAND_PREPROCESS_WRITE_NV.as_raw()
|
||||
| ash::vk::AccessFlags2::ACCELERATION_STRUCTURE_WRITE_KHR.as_raw()
|
||||
);
|
||||
const WRITES: AccessFlags = AccessFlags::SHADER_WRITE
|
||||
.union(AccessFlags::COLOR_ATTACHMENT_WRITE)
|
||||
.union(AccessFlags::DEPTH_STENCIL_ATTACHMENT_WRITE)
|
||||
.union(AccessFlags::TRANSFER_WRITE)
|
||||
.union(AccessFlags::HOST_WRITE)
|
||||
.union(AccessFlags::MEMORY_WRITE)
|
||||
.union(AccessFlags::SHADER_STORAGE_WRITE)
|
||||
.union(AccessFlags::VIDEO_DECODE_WRITE)
|
||||
.union(AccessFlags::VIDEO_ENCODE_WRITE)
|
||||
.union(AccessFlags::TRANSFORM_FEEDBACK_WRITE)
|
||||
.union(AccessFlags::TRANSFORM_FEEDBACK_COUNTER_WRITE)
|
||||
.union(AccessFlags::COMMAND_PREPROCESS_WRITE)
|
||||
.union(AccessFlags::ACCELERATION_STRUCTURE_WRITE);
|
||||
|
||||
pub(crate) fn contains_reads(self) -> bool {
|
||||
!(self - Self::WRITES).is_empty()
|
||||
/// Returns whether `self` contains any read flags.
|
||||
#[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)
|
||||
}
|
||||
|
||||
/// Returns whether `self` contains stages that are only available in
|
||||
/// `VkAccessFlagBits2`.
|
||||
/// Returns whether `self` contains flags that are only available in `VkAccessFlagBits2`.
|
||||
pub(crate) fn contains_flags2(self) -> bool {
|
||||
!(self
|
||||
- (AccessFlags::INDIRECT_COMMAND_READ
|
||||
|
Loading…
Reference in New Issue
Block a user