Commit Graph

15 Commits

Author SHA1 Message Date
John Kessenich
8c21e0a250 Fix #2132: constant matrix constructor from single non-scalar argument 2020-03-18 10:27:59 -06:00
otakuto
d03da06ac1 Remove execute permissions 2018-08-07 03:16:20 +09:00
John Kessenich
513cc4cf87 Merge branch 'HaydnTrigg-patch-1' 2018-07-02 16:13:29 -06:00
John Kessenich
d8509b3367 Front-end: Implement compile-time constant folding for any() and all(). 2016-07-12 01:27:48 -06:00
John Kessenich
9df51caba9 Fix front-end bug: Constant folding of array-of-struct index op.
If a constant object was both an array and a structure, and was
indexed with a constant, the arrayness was ignored and the wrong
subconstant selected.  This fixes that.
2016-02-01 11:57:33 -07:00
John Kessenich
61c47a951b Constant folding: Correct result type of non-square matrix folding.
This also made the function easier to read by identifying
left and right operands more clearly.
2015-12-16 15:50:25 -07:00
John Kessenich
d3c123a034 Fix bug where non-constant test in ?: on a constant results thought the result was const, when it is really a temporary.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27291 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-07-10 23:49:21 +00:00
John Kessenich
67c9f3a720 Misc semantics fixes:
- don't allow pre-array object versions to return a struct containing an array 
 - special case -2147483648 / -1
 - include "~" in the full integer functionality checks
 - handle multiple function parameters having the same name



git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24010 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-12 01:02:51 +00:00
John Kessenich
0876a58203 Misc. constant-folding fixes: Check % for 0, mat(mat) constructor, index range checking (within constant objects). Also, rationalize addConst*() methods.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23973 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-08 21:47:56 +00:00
John Kessenich
807b8e3b82 Remove TIntermediate's dependency on infoSink, simplify folding of constant aggregates, and infoSink use in constant folding.
Added a few deep aggregate constant folding testing cases.


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22912 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-09-03 22:14:59 +00:00
John Kessenich
8700e9e6d1 Add more constant folding cases for min, max, step, smoothstep, mix, clamp, atan, and pow.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22903 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-30 00:45:57 +00:00
John Kessenich
1b42f2a33d Add parse-time constant folding for isinf() and isnan().
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22621 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-06 20:22:51 +00:00
John Kessenich
a5cecfc6b6 Add constant folding for the exp*(), log*(), *sqrt(), round*(), floor(), fract(), ceil(), abs(), and sign() built in functions.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21927 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-11 00:09:48 +00:00
John Kessenich
50a8cabbbb Add constant folding for length(), normalize(), fwidth(), dFdx(), and dFdy().
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21918 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-06-10 07:37:49 +00:00
John Kessenich
53fb465729 Change infrastructure to support constant folding across built-in functions, as required by 1.2 semantics. Partially fleshed out with min/max and some trig functions. Still have to complete all operations.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20806 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-03-07 19:22:07 +00:00