Commit Graph

318 Commits

Author SHA1 Message Date
Austin Johnson
6e4d8c3494
Swapchain acquisition checks (#2009)
* Initial solution to swapchain acquisition checks

* replace internal_object comparisons
2022-10-02 10:44:46 +02:00
Rua
f96519a8a3
Add state tracking and validation to Fence (#2010)
* Add state tracking and validation to `Fence`

* Forgot bind_sparse
2022-10-01 21:32:17 -05:00
Rua
6b19b6ccf4
Remove command_buffer::submit module, make new Queue methods public (#2002) 2022-09-27 02:58:47 -05:00
Rua
c085dd8d9f
Queue operations refactoring (#1995) 2022-09-24 01:45:06 -05:00
Rua
0bab019d10
Treat atomic writes in shaders as write accesses (#1989) 2022-09-18 02:45:55 -05:00
Austin Johnson
8f99ceab32
Example Tweaks (#1987)
* Example Tweaks

* use released glium
2022-09-17 17:37:22 +02:00
Rua
46187e85fb
Rename next and chunk methods of CpuBufferPool for consistency (#1978) 2022-09-17 02:51:26 -05:00
Austin Johnson
8e8482016a
Impl Present Wait Feature (#1965)
* impl present_wait feature

* handle timeout case

* add missing doc

* document the return type of wait_for_present

* impl check for VUID-04999

* don't enforce gt if present_id is zero

* impl PresentInfoExt

* Remove NonZeroU64 from wait_for_present in favor of an error

* fix gl-interop example

* fix docs and fmt

* PresentInfoExt -> PresentInfo, Added swapchain + index to info

* fix doc test,  didn't save file...

* fix gl-interop

* Remove Whitespace
2022-09-17 09:38:32 +02:00
Codotaku
e0af8af960
fix (#1977) 2022-09-13 21:11:54 +02:00
Rua
e99ad4fce5
Add khr_external_fence and remaining parts of khr_external_semaphore (#1972) 2022-09-13 04:07:10 -05:00
Rua
4abc27b9e5
Make PhysicalDevice an independent object (#1967)
* Better validation and errors

* Small fix

* Make `PhysicalDevice` an independent object

Co-authored-by: Austin Johnson <me@austinj.work>
2022-09-10 01:00:08 -05:00
Rua
2705984c77
Macrofy all Vulkan bitflag and enum types, check for device support (#1964) 2022-09-05 15:16:40 -05:00
Rua
f96768f556
Slight change 2022-09-05 15:57:53 +02:00
Rua
5a1df026dc
Reword for clarity 2022-09-05 15:57:11 +02:00
Rua
f77644bcef
Refactor bind/push commands (#1962) 2022-09-02 11:02:41 -05:00
Rua
f0e6e4c6b7
Fix or allow all Clippy errors, re-enable dead code and unused variable warnings (#1953) 2022-08-12 05:18:35 -05:00
antonino maniscalco
77e59002de
Merged ImmutableBuffer into DeviceLocalBuffer #1934 (#1936)
* Merged `ImmutableBuffer` into `DeviceLocalBuffer` #1934

* Updated documentation
2022-07-31 11:54:46 +02:00
Rua
14f14f76ee
Update winit to 0.27 (#1933)
* Update winit to 0.27

* Fix windows

* Better fix?
2022-07-30 01:58:44 -05:00
Rua
6a755cd2f3
Add VulkanLibrary as first initialization step before Instance (#1932)
* Add `VulkanLibrary` as first initialization step before `Instance`

* Fix MacOS error

* Fix Vulkano-utils
2022-07-30 01:53:52 -05:00
Austin Johnson
df97b2c55f
Support for VK_KHR_portability_subset Devices (#1927)
* opt-in portability

* Only enable portability flag if extension is present

Automatically enable khr_portability_subset on Device; Remove required_extensions from PhysicalDevice & Device

* enable InstanceCreateInfo.enumerate_portability on all examples

* add additional documentation for enumerate_portability
2022-07-18 15:11:43 +02:00
Joseph Micheli
e8cf282e51
Documentation todos (#1920)
* Added ImageUsage::transient_input_attachment()

* Address TODOs in examples

* Added actual example to command_buffer module documentation.

* Fixed error in command_buffer example

* Check  max_framebuffer_height/width/layers in AttachmentImage constructors.

* Add detailed explanation for shader! macro to triangle examples
2022-07-13 12:26:47 +02:00
Okko Hakola
18f68337a5
Vulkano util proposal (#1918)
* Init vulkano util library

* Add window & renderer structs

* Update fractal to use vulkano utils

* Add general purpose image view generation to storage image

* Add some missing functionality

* Fix game of life

* Rename error

* Fix tests

* Update documentation texts

* Modify license comment

* Add to changelog

* Improve docs

* Allow option to wait on the future

* Update doc text

* Add filter fn

* Modify queue selection

* Fix import error

* Remove non working tests

* Rename start and finish frame to acquire and present

* Allow pub creation of window renderer

* Ensure config members are pub and it has send + sync

* Remove send syncs
2022-06-24 17:27:33 +02:00
Rua
6352adf4ff
Add support for dynamic rendering (#1902) 2022-05-29 11:53:36 -05:00
Ryan Andersen
a89359007b
Image extent zero length (#1893)
* Updating examples and SwapchainCreationError enum to resolve #1892 and related discussion

* Slightly better documentation
2022-05-09 14:25:26 +02:00
Ryan Andersen
ba7f0b20e6
Device local example (#1890) 2022-05-06 18:31:08 +02:00
Rua
9e2b41a5c4
Improve render pass commands, more validation (#1884)
* Use only the selected range of buffer and image views in synchronization

* Improve render pass commands, more validation

Co-authored-by: Austin Johnson <me@austinj.work>
2022-04-23 20:16:19 -05:00
Okko Hakola
f523234e41
Fix debug utils message severity error (#1883) 2022-04-19 16:24:58 +02:00
Rua
201e21d3e6
Rewrite copy commands (#1873)
* Allow `SyncCommandBufferBuilder` commands to specify the access range

* Allow `SyncCommandBufferBuilder` commands to specify the access range

* Better handling of image initialization

* Small fix

* Rewrite copy commands

* Better handling of maintenance1

* Small leftovers

* Remove conflict_key
2022-04-16 15:02:42 +02:00
Rua
44e30574d9
Rename debug commands, add some new ones (#1878) 2022-04-16 07:54:32 -05:00
Okko Hakola
d1ab3f6726
Fix game of life example on macos (#1829) 2022-03-28 15:28:51 +02:00
Rua
c70fcc575f
Rework mapped memory, add BufferContents trait with bytemuck (#1853)
* Rework mapped memory, add `BufferContents` trait with bytemuck

* Platform fix
2022-03-07 02:30:49 +07:00
Rua
9e8682fce7
Add UnsafeImageCreateInfo and ImageViewCreateInfo (#1844) 2022-02-27 00:18:14 -06:00
Rua
a593fee072
Add SamplerCreateInfo and SamplerYcbcrConversionCreateInfo (#1842) 2022-02-26 02:46:53 -06:00
Rua
42b4bd9441
Add CreateInfo for Event, Fence and Semaphore. (#1841)
* Add `CreateInfo` for `Event`, `Fence` and `Semaphore`.

* Small fixup

* Random idea...

* Fix CI error on Windows and Mac
2022-02-26 02:42:14 -06:00
Rua
c61ed1bfe3
Add QueryPoolCreateInfo (#1840) 2022-02-25 17:52:59 -06:00
Rua
786683c2a9
Add DescriptorSetLayoutCreateInfo and PipelineLayoutCreateInfo (#1834)
* Add `DescriptorSetLayoutCreateInfo` and `PipelineLayoutCreateInfo`

* DescriptorType non_exhaustive
2022-02-25 16:52:44 -06:00
Austin Johnson
51c5d197bf
Update examples readme
The readme still redirected users to the vulkano-examples repository. This has since been achieved. Included a step-by-step guide to switching version tag.
2022-02-23 02:17:35 -06:00
Rua
645faa4530
Add SwapchainCreateInfo, various related changes (#1832) 2022-02-20 10:55:34 +01:00
Rua
21330c747a
Add RenderPassCreateInfo and FramebufferCreateInfo (#1828) 2022-02-19 18:14:16 -06:00
Rua
8775777f47
Add InstanceCreateInfo and DeviceCreateInfo (#1814)
* Convert creation of `Instance` and `Device` to use a builder

* Big oops

* Add `InstanceCreateInfo` and `DeviceCreateInfo`

* Doc fix

* impl FromStr for Version, remove elidable qf2
2022-02-14 16:32:27 +07:00
Austin Johnson
901d2b2bc2
Refactor VertexBuffersCollection to acccept Arc<dyn BufferAccess> (#1824) 2022-02-13 11:38:14 +01:00
Okko Hakola
96c52ad11a
Add multi-window game of life application example (#1812) 2022-02-02 17:21:32 +01:00
Rua
0c06394e6c
Better validation of image view creation, descriptor set updates, draw-time resources and others (#1806) 2022-01-30 03:53:33 +07:00
Todd York
ec4f7631e0
Fix support for 2D array images (#1803)
* Fix mipmap generation for arrayed images

* Add example for texture array

* Change ImageView constructor to explicitly require ImageViewType

* Revert "Change ImageView constructor to explicitly require ImageViewType"

This reverts commit 3ad55717c4.
2022-01-29 18:59:45 +01:00
Rua
4c7cdb44fe
Sampler improvements (#1787)
* Sampler improvements

* Check Filter::Cubic for blits as well

* Small doc fix

* Better checks for blits

* Doc fix

* can_be_sampled > can_sample
2022-01-11 10:32:53 +07:00
Rua
16171c51ac
Improve shader analysis, add and refine DescriptorRequirements fields (#1786)
* Improve shader analysis, add and refine DescriptorRequirements fields

* Simplify a bit
2022-01-11 09:06:22 +07:00
Francisco Ayala Le Brun
adef9bd17a
Fix undefined behaviour on external semaphore & image creation; Fix wrong device chosen on hybrid graphics (#1783)
* Fix device memory missing p_next structures

* Fix exportable attachment image missing p_next; Fix mutable bit off

* Fix fd export for StorageImage

* Fix undefined behaviour on external semaphore & image creation

* Add uuid check on physical device creation

* Add rev specification to glium dependency
2022-01-05 04:14:18 +07:00
Amjad Alsharafi
657012142b
Allow copy_image, blit_image and copy_buffer source and destination to be the same image (#1782)
* 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.
2022-01-03 03:54:02 +07:00
Amjad Alsharafi
d75390042f
Added command clear_attachment (#1779)
* 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.
2021-12-19 19:20:51 +07:00
Rua
2151697af0
Remove DescriptorSetBuilder, use descriptor writes directly (#1774)
* Remove DescriptorSetBuilder, use descriptor writes directly

* Merge two error types
2021-12-18 17:32:38 +07:00