Commit Graph

2494 Commits

Author SHA1 Message Date
Lucas Kent
257994c7e8 Remove remaining std::mem::replace usages in examples (#1006) 2018-08-04 14:38:57 +02:00
Andrew Hickman
b0832072fc Avoid allocating a DynamicState every frame (#1008)
* Avoid allocating a DynamicState every frame

* Don't mutate the DynamicState

* Undo DynamicState::dynamic_state doc change
2018-08-04 14:38:33 +02:00
Jim Blandy
175763a953 Avoid gratuitous use of std::mem::replace. (#1005)
Either these calls to `replace` are unnecessary, or I'm going to learn something
I really need to know.

The only way difference I can see between `replace` and a simple assignment is
that `replace` returns ownership of the value to the caller, so the old value is
dropped after the new value has been put in place. But if Rust lets us assign to
or move from a variable, that means that no other alias can observe that
happening --- which I think means that the drop can't possibly care whether it
occurs before or after the move.
2018-07-30 12:07:35 +02:00
Justin Ryan Hurst
29399c7acf IOS and MacOS Surface ids were not to spec (#998) 2018-07-28 15:16:57 +02:00
Jim Blandy
f6bbf5b200 Docs: Fix swapchain image count computation. (#997)
The previous expression gives unreasonable answers for some combinations of
`swapchain::Capabilities`' `min_image_count` and `max_image_count` values. For
example, for `3` and `None`, the expression evaluates to 2, which isn't a
permitted image count.

I looked for a terser expression (using `Option` methods, say), but the `match`
expression ended up being the most legible I came up with.
2018-07-28 15:16:02 +02:00
Andrew Hickman
1d521d35d2 Don't force the surface to take ownership of the window (#991)
* Don't force the surface to take ownership of the window

* Update changelog
2018-07-28 15:14:37 +02:00
Andrew Hickman
67ace6b1c5 Add SingleInstanceBufferDefinition (#988)
* add SingleInstanceBufferDefinition

* Fixes from code review
2018-07-08 15:26:07 +02:00
Artyom Pavlov
f029b2bf69 Fix CpuBufferPool allocation strategy (#986)
The previous strategy was quite sub-optimal and was failing hard with OOM when `chunk` was used for allocating big buffers, e.g. textures.

Fixes: #984
2018-07-08 09:34:46 +02:00
aloucks
7a3434efd1 Update glslangValidator.exe to latest version (#979)
VulkanSDK: 1.1.77.0
Date: 20-Jun-2018
SHA256: 41631380388244fa88209beac748553705087ed7df375c08456a82e0769bd0c4
https://vulkan.lunarg.com/sdk/home#sdk/downloadConfirm/1.1.77.0/windows/VulkanSDK-1.1.77.0-Installer.exe

sha256sum VulkanSDK/1.1.77.0/Bin/glslangValidator.exe
90b377479fb137f4ac69460d5f5cdc54cd23bace5eb6e6812516fdfa693b25cf *VulkanSDK/1.1.77.0/Bin/glslangValidator.exe

glslangValidator.exe --version

Glslang Version: 7.7.2767
ESSL Version: OpenGL ES GLSL 3.20 glslang Khronos. 7.2767
GLSL Version: 4.60 glslang Khronos. 7.2767
SPIR-V Version 0x00010300, Revision 1
GLSL.std.450 Version 100, Revision 1
Khronos Tool ID 8
SPIR-V Generator Version 7
GL_KHR_vulkan_glsl version 100
ARB_GL_gl_spirv version 100
2018-06-30 19:18:37 +02:00
Lucas Kent
71d90e562a Upgrade deps + fix warnings in examples (#982)
* Upgrade dependencies

* Fix warnings in examples
2018-06-30 19:15:33 +02:00
aloucks
f7905d6cfc Validate sha256 checksum for glslangValidator.exe (#972) 2018-06-09 09:41:58 +02:00
Branan Riley
44530af81c Update winit to 0.13.1 (#953) 2018-06-05 12:58:59 +02:00
Leonardo Yvens
5ddcce24c6 Fix future object safety of BufferAccess (#966)
It was recently discovered in rust-lang/rust#50781 that `Self: Trait` bounds in trait methods are really not object-safe. This will be made into a warning by rust-lang/rust#50966, and vulkano will be affected by the warning .

Thankfully the fix looks simple, by just moving `fn len` from `BufferAccess` to being directly in `TypedBufferAccess`.
2018-06-05 12:27:29 +02:00
Jacob Gardner
0e50cfa17d Fix instancing bug where we reference the first parameter for the number of instances (#965) 2018-06-05 12:22:52 +02:00
Cldfire
e515ffd846 Add overview of generated macro code to vulkano-shader-derive (#958) 2018-06-05 12:22:22 +02:00
Lucas Kent
bb3e6d616c Fix clear values in runtime-shader example (#968) 2018-06-05 12:21:36 +02:00
Branan Riley
d4004e1770 Allow subpass dependencies on VK_SUBPASS_EXTERNAL (#951)
This updates the asserts in `RenderPass` creation to allow
`VK_SUBPASS_EXTERNAL` as a special value in addition to any value less
than the total number of subpasses. This enables custom unsafe
implementations of `RenderPassDesc` to define their external dependencies.
2018-06-05 12:21:13 +02:00
hcpl
b0428f6ed3 Update syn to 0.14 (#969) 2018-06-05 12:14:01 +02:00
Las
401bc3bcbe Fix typo (#957)
Fixes #949
2018-05-22 12:32:48 +02:00
Nicholas Lordello
37fcd507d0 Use libvulkan.dylib instead of MoltenVK by default on macOS (#948) 2018-04-19 09:48:33 +02:00
hcpl
800c1789d9 Update syn to 0.13 (#940) 2018-04-06 10:53:28 +02:00
Casey Rodarmor
54fd1500e1 Remove pritnln from parse::test::test (#941) 2018-04-06 08:26:33 +02:00
Artyom Pavlov
570203945c replaced tempdir with tempfile (#938) 2018-03-27 14:05:48 +02:00
Pierre Krieger
5e73ce96a1
Publish 0.9.0 (#936) 2018-03-14 17:57:22 +01:00
Gabriel Majeri
77c76b77ed Update dependencies (#903)
* Update dependencies

* Update winit to 0.11

* Update CHANGELOG.md
2018-03-13 12:34:30 +01:00
Casey Rodarmor
c11208521b Remove unused use std::iter; in triangle example (#935) 2018-03-13 11:36:09 +01:00
Pierre Krieger
de19ef2e14
Publish 0.8.0 (#934) 2018-03-11 20:18:08 +01:00
Pirh
54e97ae07d Link IOKit to fix compilation on macOS against open-source MoltenVK (#926)
Required by the following imports: 93c524d2f0/MoltenVK/MoltenVK/Utility/MVKOSExtensions.mm (L31-L32)
2018-03-02 12:15:07 +01:00
Yanchi Toth
f611365225 Fix macos compilation (#929)
* Fix compilation of vulkano-win

* Update metal-rs to latest
2018-03-02 12:14:34 +01:00
Gabriel Majeri
a9ac84c877 Fix linking MoltenVK on Mac OS (#925) 2018-03-02 12:10:39 +01:00
John Doneth
3231e92715 Fixed resizing bug in examples (#303) (#919)
Fixed the OutOfDate error in the examples by conditionally unwrapping futures
2018-02-14 08:51:52 +01:00
Branan Riley
e9104208c4 Allow Surface to reference an external window object (#848)
* Allow Surface to reference an external window object

This makes the Surface struct generic across a Window
type, so that a surface can own (or reference, if W is
an Arc) an external window object.

This also updates vulkano-win to take advantage of this.
There is no longer a dedicated Window struct in vulkano-win.
Instead, the Surface is simply passed ownership of the
winit::Window.

This fixes #844

* Update examples for new surface API

* Update Changelog

* Remove unnecessary send/sync bounds

* Update swapchain docs for new Surface behavior
2018-02-13 14:29:36 +01:00
Pierre Krieger
aa6ce2f977
Yank version 0.7.3 (#918) 2018-02-13 12:12:08 +01:00
Pierre Krieger
7ff3e5d51f
Publish vk-sys 0.3.3 (#917) 2018-02-12 16:12:43 +01:00
Pierre Krieger
2519bc915a
Publish 0.7.3 (#916)
* Publish 0.7.3

* Also publish glsl-to-spirv 0.1.4
2018-02-10 19:17:41 +01:00
Lucas Kent
05dcbabb28 missing initial_layout/final_layout panic gives a useful message (#906) 2018-01-09 10:19:50 +01:00
Bram Buurlage
057507f7c2 Fixed issue #857 / swapchain resize causes panic (#908)
* Fixed issue #857

* Update CHANGELOG.md
2018-01-09 08:47:19 +01:00
Lucas Kent
aedb37f93e Enforce one ClearValue per Attachment (#905) 2018-01-08 13:52:58 +01:00
Anna Harren
5974ea6d8d Added documentation to vulkano_shader_derive (#909)
This isn't full documentation of everything that the crate generates,
but it at least covers how to use it. I'm only working off my reading
of the source code, so it's entirely possible I got things wrong, but
crappy documentation is better than no documentation. I think.

Note that this has to add vulkano itself as a dev-dependency in order
for the doctest to compile, but that's also going to help with writing
tests if that ever happens.

An improvement over this would be to detail what the proc macro itself
generates and the functions, structs, etc you get from it. The details
on that are in vulkan-shaders, and are a bit harder to decipher.
2018-01-08 13:51:01 +01:00
Pierre Krieger
4f5d479118
Add gitter badge in README (#901) 2017-12-28 15:06:53 +01:00
Benjamin Saunders
52fedcf77f Simplify constructing pipelines that use dynamic buffers (#894)
* Simplify constructing pipelines that use dynamic buffers

* Simplify PipelineLayoutDescTweaks API
2017-12-14 10:26:02 +01:00
Benjamin Saunders
70013d2678 Add object name setters (#895) 2017-12-13 09:50:08 +01:00
thelearnerofcode
80e1ed6dc3 Updated Dependencies. (#876)
* Updated Dependencies

* Complied with changes mentioned in pull request.
2017-12-11 10:23:40 +01:00
cbbowen
bc01c79992 Expose vkCmdCopyImage (#888)
* Expose vkCmdCopyImage.

* Add copy_image to changelog
2017-11-29 22:10:43 +01:00
jansol
0ae08dceec Fix linking against MoltenVK (#880)
Starting from version 0.19.0 MoltenVK depends on IOSurface.framework
2017-11-17 12:41:02 +01:00
tomaka
c16e4d81b2
Fix triangle example panicking on wayland (#873) 2017-11-11 11:23:53 +01:00
Branan Riley
a3a4e89778 Do not try to hardlink glslangValidator (#870)
Previously, it was possible for the hardlinked glslangValidator
to become truncated when the glsl-to-spirv crate was rebuilt. The
file would be successfully hardlinked the first time, but on
subsequent builds the hardlink attempt would fail becasue the target
already exists. This would cause the build script to fall back to
a copy, which truncates when source and dest are the same file.

This removes the hardlinking entirely, meaning that we always just
copy our built glslangValidator to where we want it. While it would
be possible to try to make the hardlinking/copying logic idempotent,
the complexity (and potential fragility to similar bugs in the
future) doesn't seem worth it to avoid one copy.

This fixes #95
2017-10-24 07:51:50 +02:00
AustinJ235
36d74eab9f Clear value validation for AutoCommandBufferBuilder::begin_render_pass() (#869)
* Clear value validation for AutoCommandBufferBuilder::begin_render_pass()

* Add changelog entry and TODO comment

* Add changelog entry
2017-10-18 19:22:23 +02:00
AustinJ235
c7d77e5d8c Allow depth/stencil images to be used with AutoCommandBufferBuilder::copy_image_to_buffer() (#868)
* Allow depth/stencil images to be used with AutoCommandBufferBuilder::copy_image_to_buffer()

* Corrected the copy_image_to_buffer() change
2017-10-16 08:20:02 +02:00
tomaka
c60265c67b Changed ShaderInterfaceMismatchError to be more verbose (#862)
* Changed `ShaderInterfaceMismatchError` to be more verbose

* Add entry to changelog
2017-10-11 19:43:25 +02:00