Commit Graph

298 Commits

Author SHA1 Message Date
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
Rua
f069fdc35f
Upgrade to Rust 2021, update dependencies (#1772)
* Upgrade to Rust 2021, update dependencies

* Missed one

* Fix raw_window_handle breaking changes
2021-12-16 15:46:44 +07:00
Francisco Ayala Le Brun
5d0c2390ba
Fix gl-interop validation error & window not closing (#1768) 2021-12-06 04:11:59 +07:00
Rua
0ebf05f35d
Bring vertex input in line with other pipeline state, reorganise modules (#1758)
* Bring vertex input in line with other pipeline state, reorganise modules

* Documentation improvement

* Use ShaderInterfaceEntryType in shader interface instead of format

* Example fix
2021-12-06 03:30:56 +07:00
Will Song
aa5a97481e
use repr(C) (#1757) 2021-11-24 21:19:57 +07:00
Rua
9ac0de2842
Allocate less than the maximum descriptor count when variable (#1751)
* Allocate less than the maximum descriptor count when variable

* Workaround for driver bug
2021-11-24 01:33:10 +07:00
Ilya Lakhin
b84b0c9c55 #1734 Changelog update 2021-11-23 19:59:37 +07:00
Francisco Ayala Le Brun
4d0e709c18
Fixes related to Image export & OpenGL Interop (#1734)
* Fix device memory missing p_next structures

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

* Fix fd export for StorageImage

* Add gl-interop example; Remove debug assert comment

* Fix gl-interop example being run on Windows and MacOS

* Add builder field to DeviceMemoryBuilder
2021-11-23 19:55:32 +07:00
Rua
c6959aa961
Move shader analysis to Vulkano crate, make available for runtime shaders (#1747)
* Move shader parsing and information extraction to Vulkano, make available for runtime shaders

* Small change

* Add new pipeline stages to match shader stages

* Fix review issues
2021-11-13 22:06:16 +07:00
Rua
325ef8ee38
Check against DescriptorRequirements instead of pipeline layout at draw time (#1744) 2021-11-13 17:10:52 +07:00
Rua
189a589002
Arcs, Arcs everywhere (#1739)
* `Arc`s, `Arc`s everywhere

* Additional types that I forgot

* Include Arc when returning image from ImageView
2021-11-03 03:33:58 +07:00
Rua
5a326db546
Add DescriptorRequirements (#1729)
* Add DescriptorRequirements

* Doc fix
2021-10-26 00:16:54 +07:00
Rua
35fed6b577
Add basic support for khr_push_descriptor (#1727)
* Add basic support for khr_push_descriptor

* Add basic support for khr_push_descriptor

* Support arrays in `DescriptorWrite`

* Use assert when creating the builder
2021-10-20 21:56:56 +07:00
Rua
64ca6f78e1
Lots of additional dynamic state, and some new pipeline state (#1724)
* Add extra dynamic state commands to the command buffer builders

* Add TessellationState

* Re-enable InputAssemblyState, add dynamic state, update Ash

* Rework depth_stencil module, add dynamic state

* Rename module raster > rasterization, add dynamic state

* Replace DynamicStateMode with bool, replace Option with StateMode enum for potentially dynamic states, rename Blend > ColorBlendState, add dynamic state

* Re-enable MultisampleState

* Re-enable ViewportState, add state to GraphicsPipeline with retrieval methods, add dynamic state

* Add builder methods for state types

* Color blend improvements

* Further checks on input assembly dynamic state

* Add color_write_enable

* Add topology class, check that it matches

* Add line_stipple

* Move some builder code to the individual state types

* Add discard rectangles

* Trim down GraphicsPipelineCreationError variants, order alphabetically
2021-10-12 19:42:32 +07:00
Rua
885fbc6a4c
Add Send + Sync requirements to various traits (#1720)
* Remove Send + Sync and BufferAccess traits where they are redundant

* Require Send + Sync for ImageViewAbstract

* Require Send + Sync for ImageAccess, AttachmentsList and MemoryPoolAlloc

* Require Send + Sync for DescriptorSet and DescriptorPoolAlloc

* Require Send + Sync for FramebufferAbstract

* Minor rearranging

* Require Send + Sync for PrimaryCommandBuffer, SecondaryCommandBuffer and CommandPoolAlloc

* Require Send + Sync for Command (private trait)

* Cargo fmt
2021-09-29 12:00:56 -05:00
Okko Hakola
2151a4d1ce
Remove validation layer request from fractal example (#1708)
* Add interactive fractal example

* Rename folder

* Update guide

* Remove layers & debug callback from fractal example
2021-09-14 21:45:49 +07:00
Okko Hakola
e0839af295
Add an interactive fractal example (#1707)
* Add interactive fractal example

* Rename folder

* Update guide
2021-09-13 22:14:54 +07:00
Rua
8d321430cb
Add auto-generated SPIR-V parsing (#1701)
* Add auto-generated SPIR-V parsing

* Add further reflection utilities for decorations, names and members, clean up Vulkano-shaders
2021-09-13 19:39:17 +07:00
Ilya Lakhin
ddbde190ff
Sharing generated Rust types between shaders (#1694)
* Vulkano-shader mutual compilation mode

* Tests fixes

* Shared constants option for multi-shader

* Cargo fmt

* Fix doc typos
2021-09-06 02:18:04 +07:00
Austin Johnson
588f91dc59
fix warnings/errors (#1692) 2021-09-04 01:41:17 -05:00
Rua
cd8302328f
Update dependencies (#1689) 2021-09-03 23:21:15 -05:00