Commit Graph

2675 Commits

Author SHA1 Message Date
Robin Heinemann
63aaa853ff
CpuAccessibleBuffer: switch to parking_lot RwLock (#1450)
This allows ReadLock and WriteLock to be Send and Sync.
2020-12-09 05:23:14 +07:00
Jan Tebernum
782272c08d
Unlock images correctly on Err (#1449)
* Unlock images correctly on Err

If the CommandBuffer encountered an error in the lock_submit function,
it would unlock all the previously locked resources and return the
error. It would unlock all the images with a None value which would
panic in an assertion in the unlock method of the images. Now it checks
for the final_layout and unlocks the image this way.
This change should help with the panics mentioned in #1441 and #1447.
With this fix it should return the error that is occuring instead of
panicking.

* Add fix to the change log to inform users.
2020-12-05 06:28:01 +07:00
Ivan Zvonimir Horvat
9320d97115
examples: bin; pipeline_caching, add underscore for unused var (#1448) 2020-12-03 22:44:10 +07:00
Rua
a5553e14e1
Check usage bits on image when creating image view (#1444)
* Check usage bits on image when creating image view

* Changelog entry
2020-12-03 22:36:59 +07:00
Jan Tebernum
dea9a421d0
Finish pipeline cache (#1443)
* Implement caching for GraphicsPipeline

Added the method build_with_cache to set an Option that holds an Arc
containing a PipelineCache. This could probably be optimized to just
hold a vk::PipelineCache(u64) and start with a vk::NULL_HANDLE and
set the value to the internal_object of the PipelineCache. Using the Arc
is probably safer for now, but it is an idea.

* Add changes to the CHANGELOG

* Added a cache option to the ComputePipeline

This is a breaking change as there is no ComputePipelineBuilder and the
cache has to be added in the new function and the underlying functions
that build the ComputePipeline.
This needs to be discussed.

* Document the cache feature for the ComputePipeline

* Formatting with cargo fmt

* Remove outdated documentation

* Added testing for the PipelineCache

Checking that the cache returns the same data if the get_data method is
invoked twice without building a new pipeline.
Checking that the cache returns the same data if the same pipeline is
built two times with the cache.
Checking that the cache returns different data if there is a different
pipeline built in between the get_data calls.

* Create an example for the PipelineCache

* Formatting
2020-11-29 15:40:44 +07:00
Cassiano Honorio da Silva
620b829bdb
Rename feature shader_f3264 to shader_float64 (#1440)
Fixes shader_f3264 device feature name
2020-11-23 17:34:02 +07:00
Matej Kormuth
4ebc2c8211
add debug_marker_{begin, end, insert} methods (#1439) 2020-11-20 07:40:07 +07:00
Austin Johnson
3ecaaf5f48
Update examples to winit 0.23 (#1438) 2020-11-10 14:32:29 -06:00
Travis Finkenauer
ccd22a4aa4
Convert HTTP links to HTTPS (#1397)
* Convert readme HTTP links to HTTPS

* Convert source files' URLs to HTTPS
2020-11-10 11:03:50 -06:00
Rua
f5d6dff620
Bump winit to 0.23 (#1427) 2020-11-10 11:01:42 -06:00
Rua
862593abae
Some safety checks for AutoCommandBufferBuilder::execute_commands (#1431)
* Move SubpassContents to command_buffer module, use it as parameter type instead of bool, add RenderPassState internally

* Add some safety checks to execute_commands

* Move Kind and related types to top-level module, add CommandBuffer::kind trait method, keep Kind value in AutoCommandBuffer(Builder)

* Some minor code cleanup

* Documentation update
2020-11-10 11:01:13 -06:00
Austin Johnson
3a473699eb
github actions (#1437) 2020-11-10 10:29:09 -06:00
Ivan Zvonimir Horvat
6f67a70fb1
1418: unsafe array; pass-by-ref (#1436) 2020-11-10 09:57:00 -06:00
Federico Morrone
3892ed7e32
Added arch example in Readme (#1419) 2020-10-25 19:33:59 +07:00
Ilya Lakhin
770ea22bb8
Changelog entry for PR #1410 and turning off Travis Linux Nightly build job (#1424)
Changelog entry for PR #1410; Nightly build temporary disabled until #1423 resolved
2020-10-25 19:30:44 +07:00
Tetrel
70186b5034
Copy buffer dimensions (#1407)
Add a method to AutoCommandBufferBuilder that allows copying elements of buffers containing arrays
2020-10-08 14:31:32 +07:00
sburton84
3449bee270
Call the correct surface creation function on Windows. (#1410)
On Windows 'Surface::from_hwnd' should be called rather than 'Surface::from_wayland'.
2020-10-08 14:23:16 +07:00
Colin Marc
aa1f402c9d
Update MoltenVK setup instructions (#1385) 2020-06-12 11:13:17 -05:00
Antonino Siena
b0c8eca283
Improve vulkano-win (#1386)
* Use winit's hinstance() function

* Require HasRawWindowHandle for the window and remove handle parameter

Co-authored-by: Antonino Siena <a.siena@gmx.de>
2020-06-12 11:12:47 -05:00
Antonino Siena
c5dd6eda3e
Feature: Create a Surface from a RawWindowHandle (#1381)
* Feature: Create a Surface from a RawWindowHandle

* Comment on the new features

* Updated changelog

* Corrected feature name

* Compiler error corrections

* Empty commit for CI

Co-authored-by: Antonino Siena <a.siena@gmx.de>
2020-06-09 03:23:22 -05:00
Richard Diamond
cf669bb6be
Support a number of SPIRV capability related features. (#1382) 2020-06-08 21:00:56 -05:00
Trangar
737016c047
Ran rustfmt and added rustfmt checkbox to pull req template (#1367)
* Ran rustfmt, updated PULL_REQUEST_TEMPLATE.md  and added a rustfmt check to CI

* Disabled the travis rustfmt check
2020-06-04 13:47:34 -05:00
Rua
e4e324d632
Add properties method to Format (#1379)
* Add properties method to Format

* Documentation

* Changelog
2020-06-04 13:41:39 -05:00
Austin Johnson
eee101bc4d
publish 0.18.1 && vk-sys 0.5.2 (#1374) 2020-06-01 13:52:18 -05:00
Rua
1f27ab3ea9
AutoCommandBufferBuilder takes &mut self instead of self (#1376)
* AutoCommandBufferBuilder takes &mut self instead of self

* Changelog message
2020-06-01 09:41:42 -05:00
Austin Johnson
a4591a20cf
update examples to use ImageUsage::color_attachment instead of caps.supported_usage_flags (#1373)
* add additional ImageUsage constructors

* update examples to use ImageUsage::color_attachment instead of caps.supported_usage_flags

* fix additional usage in multi-window example

* update ignore to not include mandelbrot.png and triangle.png

* update ignore to not include mandelbrot.png and triangle.png
2020-06-01 02:10:02 -05:00
Austin Johnson
536ac5303b
add additional ImageUsage constructors (#1372) 2020-06-01 00:47:34 -05:00
Austin Johnson
4e3d38ac5b
update half & metal; fix couple of warnings; add missing changelog entries (#1364) 2020-05-15 19:14:25 -05:00
Richard Diamond
57c545d7ab
Add support for the Physical Storage Buffer Access feature. (#1359)
This feature was recently promoted from an extension to the core spec in Vulkan 1.2. It is already supported on many recent drivers: NVidia, Mesa RADV, and AMDVLK.

Other than supporting enabling the feature and the basic buffer address query, I made no attempt to create safe interfaces for its use. Such will come later, after I've experimented with its use in Geobacter.
2020-05-15 13:26:06 -05:00
Sam Smith
68cc93932d
Added more detailed explenation to docs (#1361)
* Change documentation.

Changed the documentation to explain how the data layout of an image is changed as it is copied from image to buffer.

* Fixed the trailing whitespace
2020-05-13 15:35:56 -05:00
one-bit
c96309e55e
Fixed warnings (#1363)
* Fixed all warnings as of Rust 1.43.1

* Update CHANGELOG_VULKANO.md

- Fixed all warnings as of Rust 1.43.1
2020-05-12 19:57:40 -05:00
Trangar
df493136cf
Added a .boxed() function to GpuFuture to reduce boilerplate code (#1362) 2020-05-12 18:05:09 -05:00
Richard Diamond
15b4a955f7
Fix an abort() in the tests. (#1358)
Not sure how widespread this issue is, I'm on Mesa 20.0 currently. I've re-enabled a heap size check only when the reported size is != 0, because MoltenVK apparently has an issue with the reported heap sizes.
2020-05-12 17:21:03 -05:00
jeffw387
315f63abe5
new function to check image/device compatibility (#1339)
* new function to check image/device compatibility

* merged master to get rustfmt changes, format all
2020-05-09 19:36:20 -05:00
Ilya Lakhin
4f89414143
Dynamic Compute Shader local size (#1357)
* Exposing additional properties from the physical device

* dynamic-local-size example

* Changelog fix

* Extra whitespaces in changelog removed
2020-05-09 10:46:12 -05:00
Ilya Lakhin
f211a3af2a
Anonymous specialization constants support (#1338) 2020-05-09 05:59:10 -05:00
Branan Riley
c74ac31f27
Allow applications to access the loaded function pointers (#952)
Without this, an application has to create their own loader for the
Vulkan function pointers if they need to drop down to raw Vulkan
calls. It's not a lot of effort to load them, but it's nicer to just
have them available on the Instance or Device rather than having to
pass an extra parameter around for function pointer access.

Co-authored-by: Austin Johnson <me@austinj.work>
2020-05-08 19:02:07 -05:00
jdnewman85
48109761a8
Add CpuBufferPool example (#1352)
* Use traingle example as template

* Remove triangle example comments

* Switch to CpuBufferPool chunks instead of CpuAccessibleBuffer for vertex data

* rustfmt

* Keep unwrap()s on same line
2020-05-08 17:26:34 -05:00
jdnewman85
00ba3ac285
Delete .rustfmt.toml (#1353)
Almost none of the options are valid anymore. The few that are, seem to be default. I move to delete the .rustfmt.toml completely, to allow rustfmt to be run without config errors.
2020-05-08 17:23:47 -05:00
SuperSamus
5aee07050b
Fix typo on CpuAccessibleBuffer doc comment (#1346)
Also removed unnecessary newline.
2020-04-29 05:30:46 -05:00
Austin Johnson
b245e6c4dc
Update winit, half, and smallvec; Release 0.18 (#1332)
update winit, half, and smallvec; release 0.18
2020-03-11 20:48:15 -05:00
Austin Johnson
de2ef70a77
Release 0.17 (#1323) 2020-02-09 03:51:32 -06:00
simdimdim
8ef0beaddf
Update to winit 0.21 (#1321) 2020-02-05 23:31:02 -06:00
Austin Johnson
18189e0724
implement exclusive fullscreen (#1310)
* implement exclusive fullscreen

* fullscreen ext should be device ext

* add acquire/release

* require VK_KHR_get_surface_capabilities2

* fullscreen_exclusive is now an enum; explicit acquire/release methods added; FullscreenExclusiveError added to handle errors; FullscreenExclusiveLost varients added to acquire and present related errors

* add checks for double acquire/release; require AppControlled for acquire/release functions

* update examples and tests; resolve issue with try_gpu_lock() on SwapchainImage; update changelogs
2020-02-04 18:57:16 -06:00
Rua
287a940178
Add Send + Sync to implementations for trait objects (#1316) 2020-02-02 17:08:25 -06:00
Rua
a1176227f7
Add Eq and Hash implementations to types used in draw calls (#1314)
* Add Eq and Hash implementations to various buffer and image types

* Changelog entry

* Add Eq and Hash to graphics pipelines too

* Changelog entry

* Remove Eq and Hash from dyn GraphicsPipelineAbstract, as the device cannot be checked

* Add Eq and Hash to GraphicsPipelineAbstract, include size in buffer equality

* Add Eq and Hash to descriptor sets

* Changelog entry

* Add Eq and Hash to Instance, check for it in Device
2020-02-01 15:33:17 -06:00
José Miguel Sánchez García
c620aefd29
Add 's' to dimension in Swapchain::recreate_with_dimension (#1315) 2020-01-31 16:37:05 -06:00
Austin Johnson
dd7b202e80
export swapchain aquire suboptimal (#1311) 2020-01-29 01:44:28 -06:00
Killian
26bb70ed96
Stop Join Future from doing the same submit multiple times. (#1313) 2020-01-28 23:42:11 -06:00
Austin Johnson
50cc41dd27
Label breaking changes accordingly... (#1308)
and breaking changes are now listed at the top.
2020-01-26 19:25:48 -06:00