Skip to content

Commit

Permalink
Updated to ash 0.25
Browse files Browse the repository at this point in the history
  • Loading branch information
gwihlidal committed Nov 15, 2018
1 parent eb9949c commit 4ec975b
Show file tree
Hide file tree
Showing 7 changed files with 311 additions and 293 deletions.
8 changes: 8 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changes

## 0.1.1 (2018-11-15)

* Updated to ash 0.25 (Vulkan 1.1)
* Added support for NVX generated commands
* Added support for read-only depth/stencil + writeable depth/stencil
* Added Copy and Default traits to AccessType and ImageLayout
* Added Debug, Default, and Clone traits to GlobalBarrier, BufferBarrier, and ImageBarrier

## 0.1.0 (2018-08-26)

* First release
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vk-sync"
version = "0.1.0"
version = "0.1.1"
license = "MIT/Apache-2.0"
authors = ["Graham Wihlidal <graham@wihlidal.ca>"]
homepage = "https://github.com/gwihlidal/vk-sync-rs"
Expand All @@ -26,7 +26,7 @@ name = "vk_sync"
path = "src/lib.rs"

[dependencies]
ash = { version = "0.24.4", optional = true }
ash = { version = "0.25", optional = true }

[features]
default = ["ash_bind"]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Add this to your `Cargo.toml`:

```toml
[dependencies]
vk-sync = "0.1.0"
vk-sync = "0.1.1"
```

and this to your crate root:
Expand Down
20 changes: 10 additions & 10 deletions src/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ use ash;
/// barriers to be passed to `vkCmdPipelineBarrier`.
/// `command_buffer` is passed unmodified to `vkCmdPipelineBarrier`.
pub fn pipeline_barrier(
device: ash::vk::cmds::DeviceFnV1_0,
device: ash::vk::DeviceFnV1_0,
command_buffer: ash::vk::CommandBuffer,
global_barrier: Option<GlobalBarrier>,
buffer_barriers: &[BufferBarrier],
image_barriers: &[ImageBarrier],
) {
let mut src_stage_mask = ash::vk::PIPELINE_STAGE_TOP_OF_PIPE_BIT;
let mut dst_stage_mask = ash::vk::PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;
let mut src_stage_mask = ash::vk::PipelineStageFlags::TOP_OF_PIPE;
let mut dst_stage_mask = ash::vk::PipelineStageFlags::BOTTOM_OF_PIPE;

let mut vk_memory_barriers: Vec<ash::vk::MemoryBarrier> = Vec::with_capacity(1);
let mut vk_buffer_barriers: Vec<ash::vk::BufferMemoryBarrier> =
Expand Down Expand Up @@ -66,12 +66,12 @@ pub fn pipeline_barrier(
/// Sets an event when the accesses defined by `previous_accesses` are completed.
/// `command_buffer` and `event` are passed unmodified to `vkCmdSetEvent`.
pub fn set_event(
device: ash::vk::cmds::DeviceFnV1_0,
device: ash::vk::DeviceFnV1_0,
command_buffer: ash::vk::CommandBuffer,
event: ash::vk::Event,
previous_accesses: &[AccessType],
) {
let mut stage_mask = ash::vk::PIPELINE_STAGE_TOP_OF_PIPE_BIT;
let mut stage_mask = ash::vk::PipelineStageFlags::TOP_OF_PIPE;
for previous_access in previous_accesses {
let previous_info = get_access_info(previous_access);
stage_mask |= previous_info.stage_mask;
Expand All @@ -86,12 +86,12 @@ pub fn set_event(
/// Resets an event when the accesses defined by `previous_accesses` are completed.
/// `command_buffer` and `event` are passed unmodified to `vkCmdResetEvent`.
pub fn reset_event(
device: ash::vk::cmds::DeviceFnV1_0,
device: ash::vk::DeviceFnV1_0,
command_buffer: ash::vk::CommandBuffer,
event: ash::vk::Event,
previous_accesses: &[AccessType],
) {
let mut stage_mask = ash::vk::PIPELINE_STAGE_TOP_OF_PIPE_BIT;
let mut stage_mask = ash::vk::PipelineStageFlags::TOP_OF_PIPE;
for previous_access in previous_accesses {
let previous_info = get_access_info(previous_access);
stage_mask |= previous_info.stage_mask;
Expand All @@ -109,15 +109,15 @@ pub fn reset_event(
///
/// `commandBuffer` and `events` are passed unmodified to `vkCmdWaitEvents`.
pub fn wait_events(
device: ash::vk::cmds::DeviceFnV1_0,
device: ash::vk::DeviceFnV1_0,
command_buffer: ash::vk::CommandBuffer,
events: &[ash::vk::Event],
global_barrier: Option<GlobalBarrier>,
buffer_barriers: &[BufferBarrier],
image_barriers: &[ImageBarrier],
) {
let mut src_stage_mask = ash::vk::PIPELINE_STAGE_TOP_OF_PIPE_BIT;
let mut dst_stage_mask = ash::vk::PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;
let mut src_stage_mask = ash::vk::PipelineStageFlags::TOP_OF_PIPE;
let mut dst_stage_mask = ash::vk::PipelineStageFlags::BOTTOM_OF_PIPE;

let mut vk_memory_barriers: Vec<ash::vk::MemoryBarrier> = Vec::with_capacity(1);
let mut vk_buffer_barriers: Vec<ash::vk::BufferMemoryBarrier> =
Expand Down
Loading

0 comments on commit 4ec975b

Please sign in to comment.