Commit Graph

2526 Commits

Author SHA1 Message Date
Lucas Kent
4633c72bab
Add push constants example (#1072) 2018-10-11 11:42:56 +11:00
Jonathan Steyfkens
37de51eeef Remove the layout prefix of descriptions related to render pass creation (#1069) 2018-10-07 22:06:13 +11:00
Lucas Kent
d8fbef1a20
Add remaining fields to QueueFamily (#1067) 2018-10-07 12:25:32 +11:00
Lucas Kent
50920f868b
Export features and device extensions from the device module instead of the instance module (#1015) 2018-10-06 17:11:57 +10:00
Lucas Kent
d779829cbd
vulkano-shaders cleanup (#1058)
Use syn to construct ast instead of raw strings
Move spirv searching methods from lib.rs into its own module
Improve formatting
2018-10-05 17:00:02 +10:00
Lucas Kent
b6c4d84e61
Removed mir support (#1060) 2018-10-03 07:44:48 +10:00
Lucas Kent
080779c2e9
Document AutoCommandBufferBuilder::draw* methods (#1057) 2018-09-30 20:54:41 +10:00
Tristam MacDonald
34f8ffd511 implement missing draw_indexed_indirect call (#1056) 2018-09-30 15:32:17 +10:00
Lucas Kent
a42800e0ed
remove build_glsl_shaders (#1047) 2018-09-29 15:08:17 +10:00
Eric Culp
7fea44b4da Reject spirv arrays that have incorrect stride in rust (#1050)
SPIR-V allows the array stride and size of a type to differ, but rust defines them to be the same. Thus
certain types when represented in rust will have the wrong layout. E.g. an array of vec3 can have an array
stride of 16 in SPIR-V, but an array of [f32;3] in rust would have a stride of 12. Thus using one for the
other would cause corruption.

This suggests a workaround by using a wrapping struct or upgrading the size of the type to one where the size
is the array stride.

I considered generating the wrapping struct for the user, but that seems very confusing for the user. We could
generate wrapping structs for all vec and mat types in arrays, but that would be a large API change.

See #298.
2018-09-29 14:43:09 +10:00
Lucas Kent
448bc1d1ad
Update dependencies (#1048) 2018-09-23 22:10:37 +10:00
Lucas Kent
abadc72aa2
Further document new setup steps (#1046) 2018-09-21 11:22:26 +10:00
Jakub Hlusička
d931bfdad0 Made AttributeInfo derive Copy, Clone and Debug (#1043) 2018-09-21 00:25:12 +10:00
Nicholas Lordello
b507034df7 Use shaderc instead of glsl-to-spirv for shader compilation (#947)
* Use shaderc instead of glsl-to-spirv for shader compilation
* added some setup notes
2018-09-21 00:24:24 +10:00
Jakub Hlusička
e3bfe4270c Add a reinterpret function to BufferSlice (#1038)
Add a `reinterpret` function to `BufferSlice`
2018-09-17 07:44:36 +10:00
Lucas Kent
d8bcc6b126
Deprecate glsl-to-spirv (#1040) 2018-09-16 15:58:28 +10:00
Lucas Kent
f4f91f7ee1
Run LANG=en_us aspell --mode ccpp check $filename on every rust file (#1034) 2018-09-02 14:18:22 +10:00
franckv
686c02440c Fix instance_count when using draw_index with instance buffers (#1033) 2018-09-02 00:57:03 +10:00
Lucas Kent
e5d501fb5e
Copy examples from example repo (#1023)
*   Update PR template
*   Rename queue to queue_family
*   Add examples readme
*   Use the same image output filename
*   Move existing examples with multiple files into their own folder
*   Improve error message when running runtime-shader in the wrong directory
2018-08-30 11:37:51 +10:00
Josh Catt
97dbbdc848 Adding details about installing the SDK for macOS (#1026) 2018-08-27 21:42:28 +10:00
Dave Gilbert
40e0bbf77e PersistentDescriptorSetError: Expand missing usage errors (#1021)
Expand MissingUsage into MissingBufferUsage and MissingImageUsage
each with an enum so that the usage that is missing is obvious
in the error, e.g.:

thread 'main' panicked at 'add curimage: MissingImageUsage(Storage)'

Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
2018-08-27 07:10:36 +10:00
Lucas Kent
c720da66cd
Implement tessellation example (#1025) 2018-08-25 02:32:39 +10:00
Lucas Kent
7dc5de217b
Add trivial tessellation example and fix building a pipeline that uses tessellation shaders (#1024) 2018-08-24 20:01:00 +10:00
Lucas Kent
1d6503553a
Fix releases (#1017) 2018-08-12 20:26:57 +10:00
Lucas Kent
e21bd19bad
Publish 0.10.0 (#1013) 2018-08-12 18:42:17 +10:00
Lucas Kent
ef8bbecc5e
Fix warning when running cargo doc (#1016) 2018-08-11 20:50:31 +10:00
Gabriel Majeri
d80d5a6791 Fix Instance example (#872) 2018-08-11 16:48:03 +10:00
Cory Sherman
6b8938fe26 Document method to query supported extensions (#973) 2018-08-11 13:45:00 +10:00
Lucas Kent
a15d3b3f59
Add PR template and compile examples in CI (#1014) 2018-08-11 11:10:17 +10:00
Jim Blandy
01aaa2e524 Doc fixes (#1007)
* Use 'greater than' instead of 'superior to'.

Using 'X is superior to Y' to mean 'X > Y' is not standard mathematical usage. I
think I've seen 'superior to' used in lattice theory, but that's not relevant to
these cases.

* trait RenderPassDesc: Correctly describe when `None` is returned.

This seems to be an off-by-one error in the documentation. Looking at the
implementations generated in `src/framebuffer/macros.rs`, for example,
the various elements of each sequence are numbered from 0 to n-1.

* Typo: 'anistropic' -> 'anisotropic'.

* sampler::MipmapMode::Linear: Clarify description.

The docs seem to suggest that if the dimensions match a given level D, then
`Linear` would use levels D-1 and D+1, which is senseless. The new wording is
meant to be closer to the calculation described in Vulkan 1.1.82 §15.6.7.

* Typo: 'transitionned' -> 'transitioned', and similar.

* Doc fix: 'more optimal' -> 'more efficient'

Rationale for the curious:

'Optimal' is an absolute; once something is optimal, it cannot be made more so.
Absolutes can be weakened, as in 'almost optimal', but not strengthened, as in
'more optimal' or 'very optimal'. 'Efficient' is not an absolute: one thing
might be 'more efficient' than another.

* Minor doc fixes.

* Doc fix: 'performances' -> 'performance' throughout.
2018-08-10 14:51:26 +02:00
Lucas Kent
44e8207a27 Upgrade dependencies (#1012) 2018-08-10 14:50:38 +02:00
Lucas Kent
ab59ca7461 ensure CpuBufferPoolChunk::conflict_key is unique (#995) 2018-08-07 17:18:26 +02:00
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