Commit Graph

2542 Commits

Author SHA1 Message Date
Lucas Kent
64d67b5d0d
Fix and enforce line endings + stray whitespace (#1099) 2018-11-01 14:45:30 +11:00
Jonathan Steyfkens
7189c7fa84 Impl DescriptorSetCollection for vec (#1094) 2018-10-28 18:47:20 +11:00
Lucas Kent
3fe7fc4495
Move shaders back that were supposed to be defined in the middle of main() { } (#1097)
They were initially moved because rust currently doesnt support
function-like proc macros in a function, but now they are wrapped in a
mod anyway.
2018-10-28 18:29:41 +11:00
Lucas Kent
9d46e08cc7
Cleanup examples (#1096)
*   replaced `.expect()` that provided no useful information with `.unwrap()`
*   used `use` consistently (all types are `use`d all functions have the parent module `use`d)
*   other formatting consistencies
2018-10-28 14:02:29 +11:00
Lucas Kent
c57289f536
refine shaders proc macro api (#1091)
macro renamed from `vulkano_shader!` to `shader!`
leave it up to the user to put it in a module
2018-10-28 10:10:29 +11:00
Lucas Kent
2153177210
Fix wayland resize issue (#1089)
Some drivers dont enforce a swapchain extent, so you need to check for
resize events from the os and then recreate the swapchain.
I took this opportunity to refactor the examples a bunch.
I want to do some more refactoring to make things consistent but I'll
leave that for a follow up PR.
2018-10-28 08:16:30 +11:00
Mateusz Krawiec
753ee299d8 Remove superfluous "need" from the documentation of buffer module (#1093) 2018-10-27 23:51:51 +11:00
Lucas Kent
d8d5b58c43
Reenable per swapchain check in SubmitPresentBuilder::submit (#1088)
There was a comment complaining that an AMD driver (which one? there are
three) was not setting the pResults.
I made this a non issue by replacing mem::uninitilized() with 0.
2018-10-27 00:20:42 +11:00
Lucas Kent
869c486053
Add documentation for GraphicsPipelineAbstract (#1083) 2018-10-26 23:53:11 +11:00
Lucas Kent
23709fb011
Remove vulkano-shader-derive (#1085) 2018-10-26 13:49:36 +11:00
Lucas Kent
494a0c30c8
vulkano-shaders - proc macros 2.0 (#1062)
* vulkano_shaders_derive exposes a proc_macro instead of a proc_macro_derive
* move vulkano_shader out of vulkano_shaders_derive and deprecate vulkano_shaders_derive
* Update documentation
* Move vulkano_shader! to root of mod, so it works with rust 1.30
2018-10-26 11:15:33 +11:00
Michael Morgan
7a11120350 Add logo to HTML documentation in other crates (#1081) 2018-10-20 10:34:32 +11:00
Lucas Kent
9ea527fa67
Silently ignore new present modes (#1079) 2018-10-18 07:39:38 +11:00
Aron Granberg
e3c6c3b191 Update readme with workarounds for MoltenVK (#1077) 2018-10-17 07:13:54 +11:00
Michael Morgan
26ade9c7a6 Add logo image to HTML documentation (#1076) 2018-10-16 07:38:35 +11:00
Lucas Kent
24f93feffd
Fix window resize on deferred example (#1074) 2018-10-12 19:41:19 +11:00
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