Hajime Hoshi
3b040e5f22
Fix test failures
2020-09-08 03:10:59 +09:00
Hajime Hoshi
1786be55f7
shader: Refactoring
2020-09-08 02:43:41 +09:00
Hajime Hoshi
0a0401e217
shader: Refactoring: Simplify calculation of LocalVarIndexOffset
2020-09-08 02:42:43 +09:00
Hajime Hoshi
f61a916e4a
shaderir/glsl: Bug fix: Calculate local variable indices correctly
...
Fixes #1339
2020-09-08 00:19:07 +09:00
Hajime Hoshi
29c7b7687f
shaderir: Add Program.UniformNames
...
Updates #1324
2020-09-06 03:41:17 +09:00
Hajime Hoshi
f5829b2cf3
shader: Check at least one variable on left side of :=
...
Updates #1330
2020-09-03 01:15:41 +09:00
Hajime Hoshi
06ed4f5444
shader: Implement len function
...
Fixes #1279
2020-08-16 02:07:39 +09:00
Hajime Hoshi
f6c3e0579f
shaderir: Adopt the precision 10 for float literals
...
Adopted the same precision of (*math/big.Float).String().
2020-08-13 00:01:16 +09:00
Hajime Hoshi
f71346da6c
shaderir: Add bool/int/float conversion
...
Updates #1289
2020-08-11 23:04:55 +09:00
Hajime Hoshi
5d2606b6a5
shader: Bug fix: Wrong local variable indices in blocks
2020-08-10 01:09:02 +09:00
Hajime Hoshi
dee8690502
shaderir/glsl: Bug fix: Copying an array did not work on GLSL
...
Fixes #1286
2020-08-09 22:18:58 +09:00
Hajime Hoshi
646518f2e8
shaderir: Fix the test side: local variables for 'for' stmts must be reserved
2020-08-09 22:12:35 +09:00
Hajime Hoshi
b73fecae79
shaderir: Add tests for different counter types
2020-08-09 21:44:06 +09:00
Hajime Hoshi
2707915376
shaderir/glsl, shaderir/metal: Bug fix: Wrong local variables with multiple 'for' statements
2020-08-09 20:12:56 +09:00
Hajime Hoshi
80361443cc
shaderir/glsl, shaderir/metal: Bug fix: Wrong local variables in for
2020-08-09 20:06:13 +09:00
Hajime Hoshi
ee9257e626
shaderir: Use pointers for Block
2020-08-09 18:00:55 +09:00
Hajime Hoshi
07514a37c8
shaderir/glsl: Bug fix: Initialize an array
...
Updates #1285
2020-08-09 04:59:29 +09:00
Hajime Hoshi
febdc46ad5
shaderir/metal: Better array initialization
...
Updates #1285
2020-08-09 04:40:15 +09:00
Hajime Hoshi
a536b3ee25
shaderir/metal: Bug fix: Array initialization
...
Updates #1285
2020-08-09 04:22:12 +09:00
Hajime Hoshi
a45e241da1
shaderir/metal: Implement the shader IR compiler for Metal
...
Fixes #1165
2020-08-08 19:14:57 +09:00
Hajime Hoshi
18b3859e20
shaderir: Export IsValidSwizzling
...
This is a preparation for compiling the IR to Metal.
Updates #1165
2020-08-08 19:08:10 +09:00
Hajime Hoshi
00ccc8ad85
shaderir/glsl: Refactoring
2020-08-07 01:53:22 +09:00
Hajime Hoshi
6576a1da76
shaderir/glsl: Refactoring
2020-08-06 17:53:28 +09:00
Hajime Hoshi
6003d85f75
shaderir: Remove some builtin functions
...
'degrees' and 'radians' are not defined in Metal.
2020-08-05 02:06:28 +09:00
Hajime Hoshi
ffee5eb6b8
shaderir/glsl: Fix the panic messages
2020-08-05 01:50:41 +09:00
Hajime Hoshi
c22ec580bc
shaderir: Remove bultin functions for bvec
2020-08-05 01:41:06 +09:00
Hajime Hoshi
8bac08cbd9
Add internal/shaderir/glsl
2020-08-03 23:27:27 +09:00
Hajime Hoshi
79e252c158
shaderir: Refactoring
2020-08-02 00:09:12 +09:00
Hajime Hoshi
fa60e31997
shaderir: Bug fix: Pass tests
2020-08-01 21:22:47 +09:00
Hajime Hoshi
4bd01fd038
graphicsdriver/opengl: Implement shaders for browsers
...
Fixes #1166
2020-08-01 20:27:46 +09:00
Hajime Hoshi
bab05874cd
shaderir: Remove unnecessary empty lines
2020-08-01 19:04:10 +09:00
Hajime Hoshi
a4334c5464
shader: Use arrays at uniform variables
...
Fixes #1274
2020-08-01 17:22:10 +09:00
Hajime Hoshi
da5642cd0e
graphicsdriver/opengl: Add type checks of uniform variables
2020-08-01 02:01:51 +09:00
Hajime Hoshi
004b279e4f
shader: Add array initialization
...
Updates #1235
2020-07-29 22:43:51 +09:00
Hajime Hoshi
d9c54bc0d0
shader: Implement an array variable
...
Updates #1235
2020-07-29 02:27:05 +09:00
Hajime Hoshi
a43efb66b2
shaderir: Bug fix: Function prototypes were required for GLSL
...
Fixes #1267
2020-07-28 00:04:03 +09:00
Hajime Hoshi
c8fa937a0a
shaderir: Format
2020-07-20 02:12:31 +09:00
Hajime Hoshi
385ff8efdf
shader: Bug fix: Wrong local variable names at for-loop
...
Fixes #1245
2020-07-13 22:49:15 +09:00
Hajime Hoshi
2ca551cdc6
shader: Implement 'for' statement
...
Fixes #1230
2020-07-13 01:44:05 +09:00
Hajime Hoshi
f95ca46c99
shaderir: Add Stmt.ForVarType and use constant.Value
...
Updates #1230
2020-07-12 22:31:12 +09:00
Hajime Hoshi
291d69500b
shaderir: Add Stmt.ForVarIndex
...
Updates #1230
2020-07-12 21:55:07 +09:00
Hajime Hoshi
202bb34bac
shaderir: Add builtin funcs dfdx, dfdy, fwidth
...
Fixes #1242
2020-07-11 21:50:10 +09:00
Hajime Hoshi
aecd29325e
shaderir: Bug fix: Wrong function names for some bulitin funcs
2020-07-11 21:46:21 +09:00
Hajime Hoshi
776de77744
shaderir: Remove and rename some builtin functions
...
Apparently matrixCompMult and outerProduct are not portable.
We adopted the naming rule foobar instead of fooBar.
2020-07-11 21:43:24 +09:00
Hajime Hoshi
4021c24534
shader: Separate uniform variables and texture variabls
...
Textures cannot be treated as a regular variable, then they should
be treated differently from other uniform variables.
Add a new function texture0At replacing texture2D.
Updates #1239
2020-07-08 01:12:07 +09:00
Hajime Hoshi
98ae0826c7
shaderir: Bug fix: Early-returns in the entry points didn't work
...
Fixes #1238
2020-07-05 17:57:57 +09:00
Hajime Hoshi
380b7382ac
shader: Add 'if'
...
Updates #1230
2020-07-05 02:33:49 +09:00
Hajime Hoshi
912135d1e7
shaderir: Use constant.Value for number literals
...
Updates #1190
2020-06-21 01:30:23 +09:00
Hajime Hoshi
4b5de9f445
shaderir: Refactoring: Add OpFromToken
2020-06-20 23:27:54 +09:00
Hajime Hoshi
28948a9976
shaderir: Add (*Type).serialize again
2020-06-20 21:08:08 +09:00