1. [x] Describe in common words what is the purpose of this change, related
Github Issues, and highlight important implementation aspects.
Fixed the misprint
2. [x] Please put changelog entries **in the description of this Pull Request**
if knowledge of this change could be valuable to users. No need to put the
entries to the changelog directly, they will be transferred to the changelog
files(`CHANGELOG_VULKANO.md` and `CHANGELOG_VK_SYS.md`)
by maintainers right after the Pull Request merge.
* Entries for Vulkano changelog:
- `**Breaking** Breaking entry description.`
- `Non-breaking entry description.`...
* Entries for VkSys changelog:
- `Entry 1.`
- `Entry 2.`...
3. [x] Run `cargo fmt` on the changes.
4. [x] Make sure that the changes are covered by unit-tests.
5. [x] Update documentation to reflect any user-facing changes - in this repository.
When we implemented self_copy for images and buffers (#1782),
`basic_conflict` test failed. So we removed it and added tests for
`overlapping` and `non_overlapping` ranges checks when using buffer self
copy.
* Allow `copy_image` source and destination to be the same image
The doc: `srcImage and dstImage can be the same image or alias the same
memory`.
This was achieved by locking only one image exclusively if both are the same.
* Allow `blit_image` and `copy_buffer` to have the same src/dest buffers
Regarding this and the previous commits, I noticed an important note in
the docs.
`regions must not overlap`
Before this, it was not important check for us to do, since we can't
have overlapping regions if both buffers are different. But now we must
add some checks to make sure its safe to use these functions while also
allowing for shared buffers between src and dest.
* Added bounds and overlapping checks for `copy_buffer`
* Added overlap checks for `blit_image` and `copy_image`
Created utility file `src/command_buffer/validity/ranges.rs` which hold
functions that help compute if there is overlap in regions.
* Fixed bug in regions overlap check
It should be ANDed together and not ORed
* Added `image_blit` to the `image-self-copy` example
* Added example for `copy_buffer_dimensions` using `basic-compute-shaders`
Also updated copyright year for this and the `image-self-copy-blit`
example.
* Added command `clear_attachment`
This command implements `vkClearAttachments`, most checks are done
except for:
- Handling attachments with `VK_ATTACHMENT_UNUSED`, `vulkano` doesn't
support unused attachments for now.
- command buffer protection and protectedNoFault, which `vulkano` is not
supporting now.
* Added `clear_attachments` example
This explains the usage of `clear_attachments` command
* Modified `ClearRect.rect_offset` to use `u32`
Since, in vulkan docs, it says that the rect must be inside the render
area, its better to use `u32` so that we don't get negative values since
its not applicable here.
I was using `i32` because in vulkan docs its using `VkRect2D` inside
`VkClearRect` which is a general rectangle object. Since ours is only
specific to `ClearRect` its better to make it specific.