Commit Graph

222 Commits

Author SHA1 Message Date
Jérôme Leclercq
b6e4a9470e Shader/Ast: Treat repeated swizzle as rvalue (cannot be assigned) 2022-01-02 22:02:46 +01:00
Jérôme Leclercq
4fe44339c5 Shader: Add support for for-each statements and improve arrays 2022-01-02 22:02:11 +01:00
Jérôme Leclercq
1f15328fdd Shader: Add initial support for arrays 2022-01-01 23:01:31 +01:00
SirLynix
89c7bbf197 Update copyright date 2022-01-01 15:30:09 +01:00
Jérôme Leclercq
d878036bfc Shader/AstOptimizer: Reduce template complexition 2021-12-28 23:37:35 +01:00
Jérôme Leclercq
60a7cec099 Fix compilation 2021-12-28 22:15:13 +01:00
Jérôme Leclercq
101a3d70da Shader/AstOptimizer: Add swizzle optimization 2021-12-28 20:09:04 +01:00
Jérôme Leclercq
343eac6616 Shader/Parser: Allow external and struct declarations to be conditional 2021-12-28 13:35:53 +01:00
Jérôme Leclercq
4e5def1095 Shader/AstOptimizer: Fix Vector4 cast propagation optimization 2021-12-28 11:49:41 +01:00
Jérôme Leclercq
a0f66d9e88 Shader/SPIRV: Fix multiple branch handling (by splitting) 2021-12-28 11:48:19 +01:00
Jérôme Leclercq
e21b45946f Shader/SPIRV: Fix double termination of blocks when branching
Which could happen when using OpKill (discard) for example
2021-12-26 22:00:44 +01:00
Jérôme Leclercq
b98fd65a01 Fix a lot of small bugs/warnings 2021-12-25 20:07:53 +01:00
Jérôme Leclercq
1080823c4d Shader/SpirvPrinter: Handle LiteralInteger as value 2021-12-25 19:13:48 +01:00
Jérôme Leclercq
f98ea6b0ca Shader: Add full support for scalar swizzle 2021-12-25 19:13:08 +01:00
Jérôme Leclercq
157e74b016 Shader/GlslWriter: Reorder function implementations 2021-12-25 14:02:22 +01:00
Jérôme Leclercq
d4dfe97006 Minor fixes 2021-12-23 17:39:37 +01:00
Jérôme Leclercq
a5cc915948 Shader/SPIRV: Fix structs being always decorated as block
They are now only decorated as blocks when used as uniform buffers, which fixes structure nesting
2021-12-23 17:36:40 +01:00
Jérôme Leclercq
e2882f6595 Shader: Rename Parse function to ParseFromFile
to avoid ambiguous calls when passing const char*
2021-12-23 17:18:30 +01:00
Jérôme Leclercq
837b72f68e Shader: Rework Swizzle and add support for swizzle store in SPIRV 2021-12-21 14:30:47 +01:00
Jérôme Leclercq
e43a638112 Shader/SpirvData: Regenerate SPIRV data (update to 1.6.1) 2021-12-20 22:37:34 +01:00
Lynix
9bd411e53c Shader/SPIRV: Add support for swizzling with one component 2021-12-18 15:51:20 +01:00
Jérôme Leclercq
a8fefeb833 Some fixes 2021-12-16 23:11:48 +01:00
Jérôme Leclercq
0f9060c45b Shader: Add support for while loops 2021-12-16 23:10:58 +01:00
Jérôme Leclercq
3185e73941 Shader: Fix handling of if/else construct 2021-12-12 23:04:37 +01:00
Jérôme Leclercq
0aec863300 Shader: Add support for exp intrinsic 2021-12-05 17:02:46 +01:00
Jérôme Leclercq
d040cc6767 Shader/GlslWriter: Fix gl_Position.z remapping 2021-11-21 19:04:09 +01:00
Lynix
57d39f7eeb Shader/GlslWriter: Rename scaleZPosition to remapZPosition 2021-11-21 16:15:56 +01:00
Jérôme Leclercq
c85263c9e7 Shader/GlslWriter: Add depth fix (from [0;1] to [-1;1] 2021-11-14 13:00:15 +01:00
Jérôme Leclercq
a02b1952c0 Apply header order fix 2021-10-28 09:53:56 +02:00
Jérôme Leclercq
f491ee1e38 Apply inclusion fix 2021-10-27 18:09:19 +02:00
Jérôme Leclercq
93ec196dc4 Apply header guard check 2021-10-26 15:52:46 +02:00
Jérôme Leclercq
ed7ab31933 Apply copyright fix to all files 2021-10-26 14:31:35 +02:00
Jérôme Leclercq
8d5276ddac XMake: update SPIRV and Unicode data parsers 2021-10-26 11:14:20 +02:00
Jérôme Leclercq
cb716e5da5 Fix OpenGL version check 2021-10-24 15:25:17 +02:00
Jérôme Leclercq
68708c54f7 Minor stuff 2021-10-04 09:24:42 +02:00
Jérôme Leclercq
0442db1c53 Shader: Add support for compound operators 2021-09-24 15:39:03 +02:00
Jérôme Leclercq
ea49f56530 Shader/LangParser: OCD fix 2021-09-23 17:49:36 +02:00
Jérôme Leclercq
3af1cd80ee Shader/ShaderLangParser: Fix > and >= parsing 2021-09-05 15:49:05 +02:00
Jérôme Leclercq
02a12d9328 Handle shader options of any type 2021-09-03 19:33:41 +02:00
Jérôme Leclercq
b31c56c642 Fix compilation with Clang 2021-08-21 15:27:32 +02:00
Jérôme Leclercq
8db8533300 Fixes a lot of warnings and move math enums to enum classes 2021-08-19 20:27:20 +02:00
Jérôme Leclercq
ac08afe9f1 Shader: Add missing ! and != parsing 2021-08-19 18:47:11 +02:00
Jérôme Leclercq
a5b71f33b9 Shader: Fix support of conditional functions 2021-08-19 18:47:11 +02:00
Jérôme Leclercq
863fb3ea7e Shader: Fix optimization issues
Moving the unique_ptrs but failing to optimize the expression could cause issues
Also the constant query callback defaulted to ConstantValue (without const ref), thanks auto.
2021-07-11 11:17:48 +02:00
Jérôme Leclercq
996b5ef85c Shader: Rename ConstantIndexExpression to ConstantExpression 2021-07-08 15:24:22 +02:00
Jérôme Leclercq
3a31c77524 Shader: Rename ConstantExpression to ConstantValueExpression 2021-07-08 15:22:08 +02:00
Jérôme Leclercq
a895e553d4 Graphics: rework ubershaders to prevent duplicate shaders modules
Also rename all remaining conditions to options
2021-07-08 14:52:39 +02:00
Jérôme Leclercq
d3e0d8a39f Shader: Replace select_opt by const_select 2021-07-08 10:53:11 +02:00
Jérôme Leclercq
838063c8b6 Shader: Fix nested blocks parsing 2021-07-08 10:52:29 +02:00
Jérôme Leclercq
309fd547e1 Fix compilation errors and warnings 2021-07-07 22:38:24 +02:00