Commit Graph

1163 Commits

Author SHA1 Message Date
João Capucho
56ce439ff5 [glsl-in] Implement layouting for composite types 2021-07-31 23:25:22 -04:00
João Capucho
e0e840b22c [glsl-in] Implement std140 and std430 layouts
Structs are not yet implemented
2021-07-31 23:25:22 -04:00
Arnaud Golfouse
e0efe34402 Fix typo in error message (#1150) 2021-07-29 22:57:27 -04:00
Jakob Hellermann
fa05f0d0d9 [glsl-out] split reflection_names into a map for types and another for globals (#1144)
* split reflection_names into a map for types and another for globals

* reflection_names_structs -> reflection_names_uniforms
2021-07-29 00:17:01 -04:00
pyrotechnick
2f516c0932 [wgsl] Storage buffer/texture access (#1142)
* Resurrect texture_storage_* tests
* Test parsing of `var<storage,write>`
* Default storage textures to READ
* Restore default features
* Fix glsl/hlsl/msl/spv front and back ends
* Add missing test outputs
* All-around fixes for the storage access

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-07-28 01:47:18 -04:00
João Capucho
6303af225f [glsl-in] Add implicit conversion for initializer 2021-07-27 20:16:05 -04:00
João Capucho
677e040462 [glsl-in] Long form matrix support 2021-07-27 11:35:47 -04:00
Dzmitry Malyshau
a7ac13a61d hlsl: special constants for base vertex/index 2021-07-27 01:49:03 -04:00
Gordon-F
d3243bd774 [glsl-out] Enable access snapshot testing 2021-07-26 13:53:48 -04:00
Dzmitry Malyshau
46d2d6819e Fix matrix size computation 2021-07-26 10:40:47 -04:00
Dzmitry Malyshau
e97c8f9441 hlsl: fix storage offset, continuing statement 2021-07-26 01:29:42 -04:00
Dzmitry Malyshau
a5c2cef9ab hlsl: transpose storage matrices 2021-07-26 01:29:42 -04:00
Dzmitry Malyshau
e7502d0a9b hlsl: factor storage logic into a separate module 2021-07-26 01:29:42 -04:00
Dzmitry Malyshau
284cfcce47 hlsl: storage writes 2021-07-26 01:29:42 -04:00
Dzmitry Malyshau
4b6846d5da hlsl: storage reads support, array length 2021-07-26 01:29:42 -04:00
Gordon-F
526a29e2b8 [glsl-out] Fix array type writing and zero initialization for local variables 2021-07-24 17:53:24 -04:00
Gordon-F
9bd0abb987 [hlsl-out] Fix local variable writing with array type 2021-07-24 17:53:24 -04:00
Gordon-F
7dd9e14a3d Add note about sint array size in comment 2021-07-24 17:53:24 -04:00
Gordon-F
7bb28201dd Allow to translate from bool to another type in validator 2021-07-24 17:53:24 -04:00
Gordon-F
3000232844 [hlsl-out] Write sint array size 2021-07-24 17:53:24 -04:00
Igor Shaposhnik
ff14f04734 [glsl-out] Fix bitcast operation for the same types 2021-07-23 11:47:46 -04:00
Dzmitry Malyshau
bbfa9a0f9e hlsl: remove the boolean casts for unary operators 2021-07-23 10:41:36 -04:00
Dzmitry Malyshau
cc91c77f7a hlsl: fix vector multiplication 2021-07-23 02:11:32 -04:00
Dzmitry Malyshau
c526383cf8 hlsl-out: write StructuredBuffer 2021-07-22 15:44:26 -04:00
Dzmitry Malyshau
20c4d2c3d1 Add MSAA depth texture type 2021-07-22 10:39:24 -04:00
Zicklag
12f25c8ce4 Prune Unused, Unsized Types From GLSL Output 2021-07-21 18:26:20 -04:00
Zicklag
bdcab53231 Skip Early Depth Test When Unsupported in GLSL 2021-07-21 18:25:04 -04:00
Gordon-F
82b2fe4410 [glsl-out] Fix zero initialization 2021-07-20 16:28:44 -04:00
Gordon-F
e017cb402e [glsl-out] Add stage postfix for block structs 2021-07-20 16:28:44 -04:00
Zicklag
140a9bfa8f Fix Regression With CLI Not Working for Validation
Allows output file to be left empty to perform validation only.
2021-07-20 16:13:16 -04:00
Zicklag
80bdc74770 Gate GLSL Dynamic Array Size to Supported Versions
Will fail with an error when trying to generate a GLSL shader that has
dynamically sized arrays in a version of GLSL that does not support
dynamically sized arrays.
2021-07-20 16:00:39 -04:00
Zicklag
a0e50e3eac Improve CLI Argument Doc and Error Handling
- Use argh for parsing commandline arguments and generating help message
- Remove almost all panics and handle errors by printing them and
exiting 1
2021-07-20 13:54:30 -04:00
Zicklag
c6c7996480 Fix Documentation Typo 2021-07-20 13:53:43 -04:00
Zicklag
34b486f74b Add Explicit Int Precision for GLSL ES Backend 2021-07-20 10:16:33 -04:00
Dzmitry Malyshau
7b9b56a6ab hlsl-out: use * for vector by vector multiplication 2021-07-20 09:57:59 -04:00
Dzmitry Malyshau
37d094ca07 hlsl-out: omit globals that aren't accessible 2021-07-20 02:16:31 -04:00
Gordon-F
3c98cc5ae1 [hlsl-out] Validate all entry points in Makefile 2021-07-20 01:03:58 -04:00
Jim Blandy
f3c7537609 Add tests for sampling mipmapped and multisampled images.
Prior to this change, nothing in the test suite exercised the SPIR-V backend
code for generating LOD or Sample arguments to OpImageFetch instructions.
2021-07-20 01:01:55 -04:00
Dzmitry Malyshau
feee1a2edb hlsl-out: switch register to u32 2021-07-18 11:33:46 -04:00
Dzmitry Malyshau
39eaa57a77 hlsl-out: implement constant buffer support 2021-07-18 02:21:01 -04:00
Dzmitry Malyshau
16206f2eb2 hlsl-out: unlock globals.wgsl test, override skybox bindings 2021-07-18 02:21:01 -04:00
Dzmitry Malyshau
0d94b76d1e hlsl-out: rewrite texture coordinate construction 2021-07-18 02:21:01 -04:00
Dzmitry Malyshau
51fb9bb77a hlsl-out: remap bindings 2021-07-18 02:21:01 -04:00
Dzmitry Malyshau
2a253ab838 hlsl-out: derive register based on storage class 2021-07-18 02:21:01 -04:00
Jasper St. Pierre
c7dd717b4c wgsl: Don't output interpolate(flat) for non-float arguments (#1103) 2021-07-17 01:19:11 -04:00
Dzmitry Malyshau
8f71a368ef Validate the exact MSL version (#1101) 2021-07-16 23:56:15 -04:00
Jim Blandy
337e40a2be Enable logging in WGSL and SPIR-V tests. (#1098)
Use env_logger::try_init to avoid complaints about repeated initialization. This
function is thread-safe.
2021-07-16 23:09:48 -04:00
Dzmitry Malyshau
e76824aba3 glsl-out: fix emission of location/binding attributes (#1100) 2021-07-16 23:04:55 -04:00
initial-algebra
602368d9f0 Support builtin(primitive_index) (#1097)
* Hack in support for PrimitiveID on Vulkan

* Rename to PrimitiveIndex and add preliminary support for GLSL, HLSL and MSL

* Implement as an extra WGSL built-in

* Update extra.wgsl outputs

* Run rustfmt; fix WGSL writer

* Add rustfmt changes I forgot

* Update extra.wgsl test output for WGSL fix

* Bump macOS version to 10.15 in validate-msl to support primitive_index
2021-07-16 22:18:20 -04:00
Dzmitry Malyshau
8eef784416 WGSL: Flip true/false arguments of select() 2021-07-16 11:42:12 -04:00