298 Commits

Author SHA1 Message Date
Robert Plummer
2c9bd8d6e1 fix: Test GPU.createKernelMap 2019-04-22 17:15:01 -04:00
Robert Plummer
8cf91f4fed fix: Add deprecated method setOutputToTexture, and test 2019-04-22 17:12:05 -04:00
Robert Plummer
d51da85371 fix: turn off debug in test 2019-04-21 12:03:04 -04:00
Robert Plummer
b60e571646 fix: 8 and 16 bit packing when using single precision float
fix: 2,3,4 array output render strategies
fix: Add deprecation handling
fix: Add addArgument and addConstant tests for webgl2
fix: remove floatTextures as a property
2019-04-21 12:02:34 -04:00
Robert Plummer
00ee2ba982 feat: Refactor dimensional values and expose the bitRatio all the way to the function node
fix: Added test suite for arrays and inputs for webgl and webgl2
fix: Rename "floatOutput" feature to "precision".  Values can be "unsigned" or "single"
fix: Add input and Input to typings
fix: Use Int32Array for input.size
2019-04-20 09:59:49 -04:00
Robert Plummer
1c5a73e63d fix: Ensure can handle plain IntegerLiteral return type from function 2019-04-16 20:43:35 -04:00
Robert Plummer
e778dc1519 fix: Eliminate need for using decode inside fragment shader
fix: Auto float handling
fix: this.texSize from early setting in validateSettings
fix: Add compiledFragmentShader and compiledVertexShader as props in kernel
feat: Add setOptimizeFloatMemory in kernel.js
fix: Add some typings
fix: Simplify how dimToTexSize gets dimensions
fix: Simplify createKernelMap tests
fix: Add utils tests
fix: Simplify issue 267 tests
fix: Alter issue 279 tests, and add TODO

1 Broken test left
2019-04-16 08:37:57 -04:00
Robert Plummer
d068ba211d fix: Add 'Input' handling to astCallExpression and astBinaryExpression
fix: Add unit tests for above
2019-04-14 11:59:59 -04:00
Robert Plummer
58d77be9a7 fix: Remove erroneous channel and index division in getImage2D of webgl1
fix: Remove some debugging code
fix: Build and beautify everything (was off whilst doing some mad debugging earlier)
2019-04-12 14:09:05 -04:00
Robert Plummer
ee7baf70ba fix: Array handling (2,3,4) for webgl2 & webgl1 (headlessgl next)
fix: Float handling
feat: added `optimizeFloatMemory` to better exemplify what it does and replace `floatTextures` and its voodoo in webgl2
feat: end to end strong type detection
Note: added a bunch of TODO's this is just a good resting point.
2019-04-11 19:41:58 -04:00
Robert Plummer
1e60084020 feat: Full type inference (this is a HUGE feature)
feat: Add mandelbulb.html example
fix: Bump and build
2019-03-19 19:51:03 -04:00
Robert Plummer
9540340751 fix: Fix floatTextures support test
fix: Rename `WebGLKernel._formatArrayTransfer()` to `WebGLKernel.formatArrayTransfer()` because it is used in more than just this class
fix: Add `HeadlessGL.features.isTextureFloat`
fix: Add `HeadlessGL.getIsTextureFloat()`
fix: Add operation to delete `HeadlessGLKernel.extensions.WEBGL_draw_buffers`
fix: Remove `assert.throws` from Issue #91 test
fix: Add "features/float-output-textures.js" back to all.html test
fix: Bump version number and build
2019-03-19 08:43:58 -04:00
Robert Plummer
4aa08ca393 fix: Casting for all non-float arguments used with Math.fn()
fix: Greater than, less than evaluation when comparing an integer with a literal that is a float, try not to cast left, but rather cast left to right
fix: Constants that do not have a type defined should fail
fix: Don't prevent "random" as a native function name
fix: Allow Texture constructor to inherit instance of GPU for easy .toArray()
fix: Texture constructor as settings object for easier understanding of order input
fix: Typescript corrections for Texture
fix: Bump headless-gl version to that of Multiple Render Targets
2019-03-17 22:12:09 -04:00
Robert Plummer
6050e6a8a6 fix: When literals are returned from kernel, freeze their type
feat: Parse GLSL and get return type and argument types
feat: Properly look up native function return types and cast if needed
feat: Properly look up native function argument types and cast if needed
fix: Move this.chooseKernel() to beginning of GPU instantiation

As well as test all the above
2019-03-13 12:36:19 -04:00
Robert Plummer
5f59354219 fix: this.thread, and this.output type handling, and block statements 2019-02-18 10:55:30 -05:00
Robert Plummer
0cce0a0a82 fix: Clone GPU for loop into CPU
Add unit tests to browser all.html
fix a typo in file and in desc
Add a few missing items to index.d.ts
Move debug console.log to match GPU counterpart
Build files
All unit tests pass or skip (when appropriate) for Chrome, Firefox, Safari, and Node
This marks v1 rc1.
2019-02-10 22:58:18 -05:00
Robert Plummer
22046269b6 feat: Added "dev" mode, so we can easily debug
refactored webgl for statements, to be more performant
added unit tests for "for" statements
will do the same for cpu for statements next
fixed some issues in typings file
exposed FunctionNode from standard importer
2019-02-10 12:17:31 -05:00
Robert Plummer
cf5a358422 fix: Got 100% unit tests in chrome, ff, safari, and node. 2019-02-07 19:08:19 -05:00
Robert Plummer
a586c0d96d fix: constants image early throw for webgl 2019-02-06 09:18:09 -05:00
Robert Plummer
2b6802e292 fix: astBinaryExpression unit tests
Simplify internal/kernel.js tests
2019-02-05 22:13:44 -05:00
Robert Plummer
f48409cc56 fix: Web side tests
Also cleanup moving methods around for reuse and so code can be more concise.
Removed some older references, where now we use `this.thread.x` or `this.output.x`.
Removed some older methods we no longer use (astFunctionPrototype).
Removed some overloaded functions from webgl1 and webgl2 glsl.  We no longer need them.
Removed some references to `=== null` in favor of truthy.  `if (undefined === null)` is true, and can lead to unexpected results, where we really wanted truthy, and is simpler to write.
2019-02-05 21:17:20 -05:00
Robert Plummer
630bd94ead feat: Completely new type checking system, and refined state management 2019-02-04 19:46:55 -05:00
Robert Plummer
82e4966551 feat: v2.0.0rc1
Cleanup and add random support (seeded by... Math.random()!)
I went through api and cleaned it up considerably
2019-01-31 18:24:25 -05:00
Robert Plummer
abdb7a66f9 feat: Finally add the missing json with gpu-core feature!
And add unit tests
2019-01-29 23:41:05 -05:00
Robert Plummer
8bf362ad9a feat: No failing tests locally, only skipping and passing
Also:
feat: Typescript typings
feat: api cleanup and exports
feat: removal of building for node, only browser
2019-01-29 21:41:21 -05:00
Robert Plummer
920aaf67d9 feat: Massive simplification and refactor for v2 2019-01-26 21:47:26 -05:00
Robert Plummer
bafac7831e feat: Huge rewrite for v2 2019-01-24 22:18:22 -05:00
Robert Plummer
8173ed7f62 fix: Migrating tests and ensuring they act same on all backends 2019-01-19 08:46:42 -05:00
Robert Plummer
3005828b86 fix: Migrating tests, and build
This was a good resting point.
Delete unneeded files.
2019-01-18 08:32:10 -05:00
Robert Plummer
c234e37942 fix: cpu canvas check 2019-01-17 15:24:37 -05:00
Robert Plummer
8e8ca00123 fix: Add integer handling in loops, and related
Remove debug log, move `module.exports` so classes resolve in ide
2019-01-13 12:15:25 -05:00
Robert Plummer
87e2be5fba feat: Migrating to use gl, bump version number
Not ready yet, but close.  Need build scripts from headless-gl upstream.
2019-01-04 10:29:45 -05:00
Arjun Mehta
b398e4fc73 Increase size of kernels 2018-12-01 19:27:58 -08:00
Arjun Mehta
d464c92d84 Fix benchmarks 2018-12-01 19:03:09 -08:00
Arjun Mehta
bcb731257b Update benchmark examples 2018-12-01 18:48:09 -08:00
Arjun Mehta
8fd007d376 Add benchmark test 2018-12-01 18:11:13 -08:00
Arjun Mehta
3543b20c78 Add headless gl to test in node 2018-12-01 17:27:43 -08:00
Robert Plummer
cb4d4f1d4a fix: cpu canvas check 2018-11-18 15:50:35 -05:00
Robert Plummer
e3d80ea3e4 fix: double definitions for arrays when they are integers
fixes #399
2018-11-18 14:08:59 -05:00
Robert Plummer
b577c1a193 fix: CPU transpilation issue for type management
Refactored tests to test webgl, webgl2, and cpu individually and more generically.

Fixes #392
2018-11-01 14:17:08 -04:00
Robert Plummer
87ccce51df fix: thread & output variabel assignment
Fixes #390
2018-11-01 10:03:18 -04:00
Robert Plummer
d765de4cd0 fix: Upgrade remaining non-javascript like types
To be referenced in same way.
Simplify FunctionNode.
Update documentation to be more straightforward.
Remove code no longer needed from WebGL2 FunctionNode.
2018-10-30 08:14:01 -06:00
Robert Plummer
2599966e7c fix: Better defining internal lookups of types and documentation 2018-10-28 14:05:44 -04:00
Robert Plummer
d561fcf228 feat: Migrate to use type strings for arguments and returnType 2018-10-27 14:46:42 -04:00
Robert Plummer
37c9a04bd5 fix: Lookup types from function nodes and use those when transpiling 2018-10-26 19:47:03 -04:00
Robert Plummer
4f26639a59 feat: Lay groundwork for deep type detection from functions
This first pass starts with static values and gives us the mvp of type setting/detection from other functions.
2018-10-26 19:16:50 -04:00
Robert Plummer
3a55872c4f fix: Constant being set weirdly and conflicting with user variables
add unit test
2018-10-24 14:58:06 -04:00
Robert Plummer
0e4c04917a feat: Update for offscreen canvas and retool for cleaner CPU kernel backend
fix toString for kernels as well
Added documentation
Updated release year
2018-10-24 14:12:12 -04:00
Sandeep Mistry
aad86a86ab Add test for Worker + Offscreen canvas 2018-09-30 11:04:54 -04:00
Robert Plummer
625001732b Merge branch 'develop' into 359-addfunction-params-wrong 2018-09-21 06:53:25 -04:00