Commit Graph

248 Commits

Author SHA1 Message Date
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
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
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
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
f211a3af2a
Anonymous specialization constants support (#1338) 2020-05-09 05:59:10 -05:00
James
044366a24c Propagate newlines correctly on error messages (#1172)
Co-authored-by: Austin Johnson <me@austinj.me>
2020-01-26 06:35:49 -06:00
nickwilcox
b0fb255c02 Fix descriptor set codegen for SSBO after spirv update (#1275) 2019-11-17 11:20:07 -06:00
nickwilcox
0320e75f97 fix invalid markdown in shader docs (#1271) 2019-11-09 01:24:07 -06:00
Austin Johnson
212c5f6622
upgrade to vulkan 1.1 (#1258) 2019-10-27 17:27:08 -05:00
nickwilcox
1b9233d0e7 add support for shader macro predefines (#1257) 2019-10-27 01:05:45 -05:00
pablode
6c789e392c Add support for VK_KHR_16bit_storage and VK_KHR_storage_buffer_storage_class (#1160)
* Implement support for VK_KHR_16bit_storage and VK_KHR_storage_buffer_storage_class.

This change also allows SPIR-V instructions to require device extensions.

* Remove SPIR-V capabilities with duplicate values (StorageBuffer16BitAccess and UniformAndStorageBuffer16BitAccess).

* move changelog entry to current version
2019-10-24 01:20:36 -07:00
nickwilcox
901993b390 update shader include resolution to fix issues with windows (#1248) 2019-10-23 01:04:49 -07:00
Lucas Kent
f61193293f
rustc is now making use of the fact that derefencing a null pointer is UB. Remove all null dereferences (#1209) 2019-07-02 07:02:48 +10:00
mitchmindtree
d3888242ff Fix compiler error in code generated for GLSL struct (#1166) 2019-02-07 13:55:24 +11:00
Lucas Kent
9a08414054
Upgrade vulkano-win and vulkano-shaders to rust 2018 (#1134)
* Upgrade vulkano-shaders to rust 2018
* Upgrade vulkano-win to rust 2018
2018-12-11 18:26:04 +11:00
Lucas Kent
f997e9322f
Replace try macro with '?' (#1130) 2018-12-07 11:52:52 +11:00
Lucas Kent
84d6f1b33a
handle spirv group decorations (#1126) 2018-12-04 19:10:47 +11:00
Jakub Hlusička
a9704caea9 Feature shader include (#1116)
Implement support for the include directive in shader source files
2018-11-30 13:09:13 +11:00
Lucas Kent
64d67b5d0d
Fix and enforce line endings + stray whitespace (#1099) 2018-11-01 14:45:30 +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
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
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
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
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
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
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
Casey Rodarmor
54fd1500e1 Remove pritnln from parse::test::test (#941) 2018-04-06 08:26:33 +02:00
tomaka
9662f8b092 Run rustfmt on the code (#807)
* Run rustfmt on the code

* Fix compilation
2017-09-06 21:35:06 +02:00
tomaka
883d0cb94e Allow non-snake-case for specialization constants (#799) 2017-09-04 13:16:17 +02:00
tomaka
9f3f2dc000 Allow non_snake_case for auto-generated structs (#796) 2017-09-02 20:04:07 +02:00
tomaka
6c81d8081a Make the Layout generated by vulkano-shaders entirely public (#787) 2017-08-28 11:39:40 +02:00
tomaka
2cbdb288d4 Make specialization constants work (#780)
* Add new template parameters for GraphicsPipelineBuilder

* Add support for the specialization constants in build()

* Fix SpecializationConstants fields being private

* Fix lifetime problem in SpecializationConstants::descriptors()

* Run rustfmt on builder.rs
2017-08-27 10:04:18 +02:00
tomaka
5207f8a703 Reflect specialization constants in vulkano-shaders (#774) 2017-08-26 11:34:00 +02:00
tomaka
1640220ebf More fixes in limits_check (#773) 2017-08-25 11:48:13 +02:00
tomaka
0f05fc8d57 Fix number of sets in vulkano-shaders (#764) 2017-08-23 18:07:54 +02:00
tomaka
8273fb5530 Fix #772 (#724) 2017-08-05 14:06:08 +02:00
tomaka
6abeba4f3d Remove PipelineLayoutDescNames (#712) 2017-08-03 12:01:25 +02:00
tomaka
bf82214ec1 Rework shader entry points (#708) 2017-08-02 10:42:30 +02:00
tomaka
be298f470c Remove DescriptorBufferContentDesc (#630)
* Remove DescriptorBufferContentDesc

* Update vulkano-shaders

* Fix tests
2017-07-28 07:19:22 +02:00
Bartłomiej Grzesik
52f57c2e97 Remove fallback value in execution mode 2017-07-07 14:48:10 +02:00
Bartłomiej Grzesik
b909682401 Fix compilation of geometry shaders 2017-07-07 13:21:51 +02:00
tomaka
d293c6cbcf Pass the device by value when loading a shader 2017-07-03 16:53:44 +02:00
David AOL
b0faf2db95 dst/dest inconsistency #51 2017-07-02 08:09:50 -05:00
Pierre Krieger
ef466eac85 Run rustfmt on the code 2017-06-27 08:47:16 +02:00
tomaka
ff0ca53204 Merge pull request #517 from Ralith/shader-error-fixes
Shader error handling fixes
2017-06-11 20:44:27 +02:00
Benjamin Saunders
0058cc4864 Fix unreliable shader recompilation 2017-06-11 11:21:58 -07:00
Pierre Krieger
e0553ea2ab Fix size of push constants in vulkano-shaders 2017-06-09 21:34:16 +02:00
Pierre Krieger
4818f365e9 Add prototype support for descriptor arrays of images 2017-04-01 12:11:53 +02:00
Pierre Krieger
4e9a0a6d38 Derive copy on generated structs when possible 2017-03-02 12:53:16 +01:00
Pierre Krieger
dd4ac2219a Basic push constants reporting in vulkano_shaders 2017-02-23 07:40:37 +01:00
Pierre Krieger
c8abb70104 Use a dummy DescriptorBufferContentDesc 2017-02-22 17:31:54 +01:00
Pierre Krieger
1808356a81 Merge branch 'master' into incoming 2017-02-08 19:46:56 +01:00
Pierre Krieger
f039fb9123 Remove the debugging println in vulkano-shader 2017-01-31 09:50:19 +01:00
Pierre Krieger
1216461211 Merge branch 'custom-derives' into incoming 2017-01-21 16:35:58 +01:00
Wouter
9cda522d13 Disabled broken Clone impl for unsized buffers 2016-12-08 16:17:51 +01:00
Wouter
2528c11e3f Moved write_structs function back to top of file 2016-12-07 21:03:22 +01:00
Wouter
cedb13a39c Implemented Copy without using derive for structs in vulkano-shaders, fixes #253 2016-12-07 20:08:38 +01:00
Pierre Krieger
c5c14e5a4d Fix vulkano_shaders with push constants descs 2016-11-10 11:21:51 +01:00
Pierre Krieger
1ca3ef8231 Merge branch 'master' into incoming 2016-11-09 13:21:15 +01:00
Pierre Krieger
479a60fe8b Various fixes 2016-10-16 20:37:32 +02:00
Pierre Krieger
b9f4f8f2cf Remove pipeline layout parameter from pipeline creation 2016-10-16 20:31:49 +02:00
Pierre Krieger
b7eaf06874 Some fixed to generated code 2016-10-16 17:00:00 +02:00
Pierre Krieger
199295afd3 Remove binding from DescriptorDesc 2016-10-16 16:56:51 +02:00
Pierre Krieger
5aec152fb5 Implement PipelineLayoutDescNames for the generated layouts 2016-10-16 16:28:59 +02:00
Pierre Krieger
32ebcaca1e Update vulkano-shaders and fix triangle example 2016-10-16 15:59:16 +02:00
Alexander Dmitriev
0cb7e3e300 Print formatted GLSL compile error messages 2016-10-04 19:52:16 +02:00
Pierre Krieger
3affecc702 Make ShaderModule modulable over the device pointer 2016-07-26 18:36:43 +02:00
Pierre Krieger
f1ee8c02c7 Add more allow(unsafe) on unsafe code from macros 2016-07-25 16:04:22 +02:00
Pierre Krieger
cf9b4f76b8 Make sampled parameter of texel buffers less confusing 2016-07-15 13:26:33 +02:00
Pierre Krieger
a023aaa078 Fix warnings 2016-06-16 14:04:18 +02:00
tomaka
d241551d47 Merge pull request #142 from tomaka/ints-floats-width
Fix width of integers and floating-points reflected from SPIR-V
2016-06-16 13:38:36 +02:00
Pierre Krieger
fdab501746 Fix unused imports in vulkano-shaders 2016-06-16 09:36:27 +02:00
Pierre Krieger
231ea5c531 Fix width of integers and floating-points reflected from SPIR-V 2016-06-16 09:20:33 +02:00
tomaka
150fe7474f Merge pull request #129 from tomaka/tess-geom-fix
Fix shader interfaces for tessellation and geometry shaders
2016-06-06 16:21:09 +02:00
Pierre Krieger
3a4c1022f5 Improve builtin variable detection 2016-06-06 15:20:02 +02:00
Pierre Krieger
f220519e05 Fix shader interfaces for tessellation and geometry shaders 2016-06-06 15:08:49 +02:00
Pierre Krieger
3d4bd4767a Add a better diagnostic when attrib locations overlap 2016-06-06 09:25:17 +02:00
Pierre Krieger
c246a92a7e Pass correct shader stages for the descriptors 2016-05-12 14:37:43 +02:00
Pierre Krieger
c95d456926 Properly generate infos about descriptors in vulkano-shaders 2016-05-12 13:39:31 +02:00
Pierre Krieger
3b04d46dbb Replace DescriptorType with DescriptorDescTy 2016-05-12 13:11:03 +02:00
Pierre Krieger
fe8706aae8 Put all inputs and outputs in entry point structs 2016-05-04 09:30:16 +02:00
Pierre Krieger
e2fc113711 Generate attributes description struct for all shader stages 2016-05-04 09:06:53 +02:00
Pierre Krieger
ad27205f7b Extract entry point generation to own module 2016-05-04 08:18:07 +02:00
Pierre Krieger
3f4b9e126b Rework vertex attributes system 2016-04-30 10:09:00 +02:00
Pierre Krieger
18348cd301 Correctly set the readonly attribute of descriptor layouts descriptions 2016-04-22 15:15:07 +02:00
Pierre Krieger
9cc58b7771 Handle multiple dummy values 2016-04-16 14:33:52 +02:00
Pierre Krieger
9755ad5412 Fix final struct padding 2016-04-16 14:26:17 +02:00
Pierre Krieger
8e3c191cd1 Print the array stride for debugging purposes as well 2016-04-16 13:22:54 +02:00
Pierre Krieger
9f7e9107fd Print struct members offset for debugging purposes 2016-04-16 11:50:12 +02:00
Pierre Krieger
c4e3711156 Fix error about capability not supported 2016-04-10 15:23:19 +02:00
Pierre Krieger
0aedde53f1 Add readonly member to DescriptorDesc 2016-04-08 18:24:03 +02:00
Pierre Krieger
c038deec7e Ignore local structs that don't have Offset decorations 2016-04-07 11:10:20 +02:00
Pierre Krieger
2cb409fbcd Restore specialization constants 2016-04-05 11:18:15 +02:00
Pierre Krieger
74fc2ffb94 Rename descriptor_set to descriptor 2016-04-04 09:50:02 +02:00
Pierre Krieger
f01d1fde37 Make teapot example compile (but not work) 2016-04-03 20:31:24 +02:00
Pierre Krieger
5bace4e64c Move "shader" module within "pipeline" 2016-04-01 20:45:13 +02:00
Pierre Krieger
0143111858 Add support for SSBOs in shader analyzer 2016-03-29 14:11:11 +02:00
Pierre Krieger
17339231ce Don't derive traits for structs that have an unsized member 2016-03-29 10:17:33 +02:00
Pierre Krieger
106664c156 Make compute shaders work 2016-03-29 10:11:51 +02:00
Pierre Krieger
cc3b1d672b Fixed using unchecked_uniform_buffer 2016-03-28 11:43:32 +02:00
Pierre Krieger
5f81147eff Stronger typing for descriptor sets and draft for proper barriers handling 2016-03-28 11:11:59 +02:00
Pierre Krieger
50b19b4fec Automatically determine the image layouts in descriptor sets 2016-03-28 09:49:03 +02:00
Pierre Krieger
3d6a29241c Add license everywhere 2016-03-26 10:17:37 +01:00
Pierre Krieger
8ee4d6c301 Switch to new design for images 2016-03-24 09:14:26 +01:00
Pierre Krieger
6cf7b5ace4 Fix remaining bits to make teapot example compile 2016-03-24 09:14:22 +01:00
Pierre Krieger
090a04f6cd Define descriptor set layouts for all pipeline stages 2016-03-12 09:01:40 +01:00
Pierre Krieger
f8022f6ab8 Fix wrong descriptor write being generated by ther shader parser 2016-03-11 15:57:20 +01:00
Pierre Krieger
c376f3bd10 Rework the set binding code in the shader parser 2016-03-11 15:33:57 +01:00
Pierre Krieger
b300f70dda Minor fix in shaders analyser 2016-03-11 10:35:41 +01:00
Pierre Krieger
4ae0c4541a Fix using gl_VertexIndex and gl_InstanceIndex producing errors 2016-03-09 13:06:13 +01:00
Pierre Krieger
d0738e20e8 Print the uniform variable that's missing a binding point 2016-03-09 11:48:31 +01:00
Pierre Krieger
4c8ed56783 No longer produce errors with input attachments 2016-03-06 21:11:08 +01:00
Pierre Krieger
38f083fa4c Slightly better error message in descriptor set gen 2016-03-06 21:00:28 +01:00
Pierre Krieger
1d40c8edc3 Parsed structs are now part of a ty submodule 2016-03-05 13:31:44 +01:00
Pierre Krieger
cfca5c962c Some work on better descriptor set API 2016-03-01 21:10:59 +01:00
Pierre Krieger
f341552825 Check pipeline layout of shaders 2016-03-01 14:50:30 +01:00
Pierre Krieger
a5b21125ed Rename PipelineLayoutDesc to Layout 2016-03-01 13:52:50 +01:00
Pierre Krieger
ca4c99ec92 Use the generated struct in the teapot example 2016-02-29 16:52:07 +01:00
Pierre Krieger
d82726eedd Extract descriptor sets code in own module 2016-02-29 16:10:38 +01:00
Pierre Krieger
e53a7e7bcc Handle struct members alignments in generated code 2016-02-29 16:03:48 +01:00
Pierre Krieger
85ded76ead Write structure definitions in the shader analyser 2016-02-29 15:17:25 +01:00
Pierre Krieger
c0152c1a04 Extract Init and Write from SetLayout 2016-02-29 14:15:57 +01:00
Pierre Krieger
e392bfaed3 Rename DescriptorSetDesc to SetLayout 2016-02-29 13:53:10 +01:00
Pierre Krieger
dd34895d46 Fix path creation in build script 2016-02-25 10:19:53 +01:00
Pierre Krieger
ddcb8cf402 Add easier shaders compilation path 2016-02-25 08:52:22 +01:00
Pierre Krieger
be083d2af8 Allow specifying buffer offsets in descriptor set binding 2016-02-24 08:58:03 +01:00
Pierre Krieger
a6b166c7b6 Rename ImageResource and BufferResource to AbstractImage and AbstractBuffer 2016-02-23 21:25:03 +01:00
Pierre Krieger
e12c3015e7 Some work on SPIR-V analyser 2016-02-20 18:26:51 +01:00
Pierre Krieger
28f7d88197 Handle descriptor sets for both vertex and fragment stages 2016-02-20 17:42:55 +01:00
Pierre Krieger
89265c05cb Auto-generate pipeline layouts 2016-02-20 17:10:45 +01:00
Pierre Krieger
9ef4dcaab5 Better docs for descriptor sets 2016-02-20 15:10:49 +01:00
Pierre Krieger
3ebaaca45d Descriptor sets are working 2016-02-20 14:40:50 +01:00
Pierre Krieger
0fe6c0f23d More draft for descriptor sets 2016-02-20 13:05:44 +01:00
Pierre Krieger
f7696b9f60 Draft for descriptor sets 2016-02-19 13:43:28 +01:00
Pierre Krieger
84bf96f23e No longer hardcode vertex attributes 2016-02-19 10:58:35 +01:00
Pierre Krieger
41847a1b99 Correctly propagate errors when creating shader module 2016-02-18 21:23:26 +01:00
Pierre Krieger
1b657be785 Adjust feature names again 2016-02-17 19:16:07 +01:00
Pierre Krieger
4e48017de9 Fix empty input and output 2016-02-17 17:10:55 +01:00
Pierre Krieger
87191bbb97 Adjust capability checks in vulkano-shaders 2016-02-17 16:05:59 +01:00
Pierre Krieger
3f18306a1a Add small helpful comment in the generated code 2016-02-06 21:45:29 +01:00
Pierre Krieger
0e62886ed3 Add some #[allow(dead_code)] 2016-02-06 12:35:50 +01:00
Pierre Krieger
df322b8ce6 Generated structs public again (oops) 2016-02-06 12:16:06 +01:00
Pierre Krieger
5b3c5e58c6 Generated structs are now private 2016-02-06 12:05:24 +01:00
Pierre Krieger
1ae8fea0e0 Minor adjustements to the current library draft 2016-02-06 12:01:10 +01:00
Pierre Krieger
6153e1fcde Rename shader-parser to vulkano-shaders 2016-02-06 11:45:09 +01:00