From 82832902ccd6683d7821c3c952122b19f7436d4f Mon Sep 17 00:00:00 2001 From: Robert Plummer Date: Fri, 5 Jul 2019 11:03:25 -0400 Subject: [PATCH] fix: Move jellyfish images to actual files fix: added `warnVarUsage` and `Dealing With Transpilation` fix: Test dynamic arguments and provide some fixes for fix: Dynamic arguments for `CPUFunctionNode` fix: Dynamic arguments for `WebGLKernelValueDynamicHTMLImage`, `WebGLKernelValueDynamicNumberTexture`, `WebGLKernelValueDynamicSingleInput`, `WebGL2KernelValueDynamicHTMLImage`, `WebGL2KernelValueDynamicNumberTexture`, and `WebGL2KernelValueDynamicSingleInput` fix: `onRequestFallback` settings in `createKernel` and `createKernel` inclusion of `loopMaxIterations`, `dynamicOutput`, and `dynamicArgument` in settings for when switching kernels fix: `WebGL2Kernel` and `HeadlessGLKernel` typescript definition extensions --- README.md | 17 + dist/gpu-browser-core.js | 102 ++- dist/gpu-browser-core.min.js | 106 ++- dist/gpu-browser.js | 102 ++- dist/gpu-browser.min.js | 106 ++- package.json | 2 +- src/backend/cpu/function-node.js | 8 +- src/backend/function-builder.js | 8 +- src/backend/function-node.js | 2 + src/backend/kernel.js | 15 + src/backend/web-gl/function-node.js | 2 +- .../web-gl/kernel-value/dynamic-html-image.js | 4 +- .../kernel-value/dynamic-number-texture.js | 4 +- .../kernel-value/dynamic-single-input.js | 2 +- .../kernel-value/dynamic-html-image.js | 6 +- .../kernel-value/dynamic-single-array.js | 14 +- .../kernel-value/dynamic-single-input.js | 14 +- src/backend/web-gl2/kernel.js | 8 +- src/gpu.js | 24 +- src/index.d.ts | 6 +- test/all.html | 2 + test/features/constants-image-array.js | 2 +- test/features/constants-image.js | 2 +- test/features/dynamic-arguments.js | 602 ++++++++++++++++++ .../single/arguments/html-image-array.js | 8 +- .../precision/single/arguments/html-image.js | 2 +- .../single/constants/html-image-array.js | 8 +- .../precision/single/constants/html-image.js | 2 +- .../unsigned/arguments/html-image-array.js | 8 +- .../unsigned/arguments/html-image.js | 2 +- .../unsigned/constants/html-image-array.js | 8 +- .../unsigned/constants/html-image.js | 2 +- test/internal/backend/cpu/function-node.js | 28 +- .../backend/web-gl/function-node/index.js | 28 +- test/issues/487-dynamic-arguments.js | 59 ++ test/jellyfish-1.jpeg | Bin 0 -> 3004 bytes test/jellyfish-2.jpeg | Bin 0 -> 1857 bytes test/jellyfish-3.jpeg | Bin 0 -> 1700 bytes test/jellyfish-4.jpeg | Bin 0 -> 1688 bytes test/jellyfish.jpeg | Bin 0 -> 6996 bytes 40 files changed, 1148 insertions(+), 167 deletions(-) create mode 100644 test/features/dynamic-arguments.js create mode 100644 test/issues/487-dynamic-arguments.js create mode 100644 test/jellyfish-1.jpeg create mode 100644 test/jellyfish-2.jpeg create mode 100644 test/jellyfish-3.jpeg create mode 100644 test/jellyfish-4.jpeg create mode 100644 test/jellyfish.jpeg diff --git a/README.md b/README.md index 41fc0dad..a78e9d1e 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,7 @@ NOTE: documentation is slightly out of date for the upcoming release of v2. We * [Supported Math functions](#supported-math-functions) * [How to check what is supported](#how-to-check-what-is-supported) * [Typescript Typings](#typescript-typings) +* [Dealing With Transpilation](#dealing-with-transpilation) * [Full API reference](#full-api-reference) * [Automatically-built Documentation](#automatically-built-documentation) * [Contributors](#contributors) @@ -180,6 +181,7 @@ Settings are an object used to create a `kernel` or `kernelMap`. Example: `gpu. * `immutable` or `kernel.setImmutable(boolean)`: boolean, default = `false` * `strictIntegers` or `kernel.setStrictIntegers(boolean)`: boolean, default = `false` - allows undefined argumentTypes and function return values to use strict integer declarations. * `useLegacyEncoder` or `kernel.setUseLegacyEncoder(boolean)`: boolean, default `false` - more info [here](https://github.com/gpujs/gpu.js/wiki/Encoder-details). +* `warnVarUsage` or `kernel.setWarnVarUsage(boolean)`: turn off var usage warnings, they can be irritating, and in transpiled environments, there is nothing we can do about it. ## Creating and Running Functions @@ -858,6 +860,21 @@ To assist with mostly unit tests, but perhaps in scenarios outside of GPU.js, th ## Typescript Typings Typescript is supported! Typings can be found [here](src/index.d.ts)! +## Dealing With Transpilation +Transpilation doesn't do the best job of keeping code beautiful. To aid in this endeavor GPU.js can handle some scenarios to still aid you harnessing the GPU in less than ideal circumstances. +Here is a list of a few things that GPU.js does to fix transpilation: + +* When a transpiler such as [Babel](https://babeljs.io/) changes `myCall()` to `(0, _myCall.myCall)`, it is gracefully handled. +* Using `var` will have a lot of warnings by default, this can be irritating because sometimes there is nothing we can do about this in transpiled environment. + To aid in the irritation, there is an option to alleviate the irritation. + When `const` and `let` are converted to `var`, and you'r prefer not to see it, use the following: + ```js + const kernel = gpu.createKernel(myKernelFunction) + .setWarnVarUsage(false); + // or + const kernel = gpu.createKernel(myKernelFunction, { output: [1], warnVarUsage: false }); + ``` + ## Full API Reference You can find a [complete API reference here](https://doxdox.org/gpujs/gpu.js/). diff --git a/dist/gpu-browser-core.js b/dist/gpu-browser-core.js index 68169b21..ac0539c7 100644 --- a/dist/gpu-browser-core.js +++ b/dist/gpu-browser-core.js @@ -4,8 +4,8 @@ * * GPU Accelerated JavaScript * - * @version 2.0.0-rc.19 - * @date Tue Jul 02 2019 12:17:44 GMT-0400 (Eastern Daylight Time) + * @version 2.0.0-rc.20 + * @date Fri Jul 05 2019 11:02:54 GMT-0400 (Eastern Daylight Time) * * @license MIT * The MIT License @@ -717,7 +717,7 @@ class CPUFunctionNode extends FunctionNode { } astVariableDeclaration(varDecNode, retArr) { - if (varDecNode.kind === 'var') { + if (varDecNode.kind === 'var' && this.warnVarUsage) { this.varWarn(); } retArr.push(`${varDecNode.kind} `); @@ -900,9 +900,9 @@ class CPUFunctionNode extends FunctionNode { if (isInput) { retArr.push('[('); this.astGeneric(zProperty, retArr); - retArr.push(`*${ size[1] * size[0]})+(`); + retArr.push(`*${ this.dynamicArguments ? '(outputY * outputX)' : size[1] * size[0] })+(`); this.astGeneric(yProperty, retArr); - retArr.push(`*${ size[0] })+`); + retArr.push(`*${ this.dynamicArguments ? 'outputX' : size[0] })+`); this.astGeneric(xProperty, retArr); retArr.push(']'); } else { @@ -920,7 +920,7 @@ class CPUFunctionNode extends FunctionNode { if (isInput) { retArr.push('[('); this.astGeneric(yProperty, retArr); - retArr.push(`*${ size[0] })+`); + retArr.push(`*${ this.dynamicArguments ? 'outputX' : size[0] })+`); this.astGeneric(xProperty, retArr); retArr.push(']'); } else { @@ -1674,7 +1674,9 @@ class FunctionBuilder { functions, leadingReturnStatement, followingReturnStatement, + dynamicArguments, dynamicOutput, + warnVarUsage, } = kernel; const needsArgumentType = (functionName, index) => { @@ -1736,7 +1738,8 @@ class FunctionBuilder { triggerImplyArgumentType, triggerTrackArgumentSynonym, lookupArgumentSynonym, - onFunctionCall + onFunctionCall, + warnVarUsage, })); nestedFunction.traceFunctionAST(ast); functionBuilder.addFunctionNode(nestedFunction); @@ -1764,6 +1767,7 @@ class FunctionBuilder { loopMaxIterations, output, plugins, + dynamicArguments, dynamicOutput, }, extraNodeOptions || {}); @@ -2234,8 +2238,10 @@ class FunctionNode { this.leadingReturnStatement = null; this.followingReturnStatement = null; this.dynamicOutput = null; + this.dynamicArguments = null; this.strictTypingChecking = false; this.fixIntegerDivisionAccuracy = null; + this.warnVarUsage = true; if (settings) { for (const p in settings) { @@ -5465,6 +5471,7 @@ class Kernel { this.optimizeFloatMemory = null; this.strictIntegers = false; this.fixIntegerDivisionAccuracy = null; + this.warnVarUsage = true; } mergeSettings(settings) { @@ -5660,6 +5667,11 @@ class Kernel { return this; } + setWarnVarUsage(flag) { + this.warnVarUsage = flag; + return this; + } + getCanvas() { utils.warnDeprecated('method', 'getCanvas'); return this.canvas; @@ -6784,7 +6796,7 @@ class WebGLFunctionNode extends FunctionNode { } astVariableDeclaration(varDecNode, retArr) { - if (varDecNode.kind === 'var') { + if (varDecNode.kind === 'var' && this.warnVarUsage) { this.varWarn(); } const declarations = varDecNode.declarations; @@ -7569,7 +7581,7 @@ module.exports = { const { utils } = require('../../../utils'); const { WebGLKernelValueHTMLImage } = require('./html-image'); -class WebGLKernelValueDynamicInput extends WebGLKernelValueHTMLImage { +class WebGLKernelValueDynamicHTMLImage extends WebGLKernelValueHTMLImage { getSource() { return utils.linesToString([ `uniform sampler2D ${this.id}`, @@ -7589,7 +7601,7 @@ class WebGLKernelValueDynamicInput extends WebGLKernelValueHTMLImage { } module.exports = { - WebGLKernelValueDynamicInput + WebGLKernelValueDynamicHTMLImage }; },{"../../../utils":89,"./html-image":47}],40:[function(require,module,exports){ const { utils } = require('../../../utils'); @@ -7630,8 +7642,8 @@ class WebGLKernelValueDynamicNumberTexture extends WebGLKernelValueNumberTexture } updateValue(value) { - this.dimensions = inputTexture.dimensions; - this.textureSize = inputTexture.size; + this.dimensions = value.dimensions; + this.textureSize = value.size; this.kernel.setUniform3iv(this.dimensionsId, this.dimensions); this.kernel.setUniform2iv(this.sizeId, this.textureSize); super.updateValue(value); @@ -7684,7 +7696,7 @@ class WebGLKernelValueDynamicSingleInput extends WebGLKernelValueSingleInput { updateValue(value) { this.dimensions = value.size; this.textureSize = utils.getMemoryOptimizedFloatTextureSize(this.dimensions, this.bitRatio); - this.uploadArrayLength = this.textureSize[0] * this.textureSize[1] * (4 / this.bitRatio); + this.uploadArrayLength = this.textureSize[0] * this.textureSize[1] * this.bitRatio; this.uploadValue = new Float32Array(this.uploadArrayLength); this.kernel.setUniform3iv(this.dimensionsId, this.dimensions); this.kernel.setUniform2iv(this.sizeId, this.textureSize); @@ -9957,6 +9969,7 @@ void main(void) { module.exports = { fragmentShader }; + },{}],59:[function(require,module,exports){ const { WebGLFunctionNode } = require('../web-gl/function-node'); @@ -10148,9 +10161,9 @@ module.exports = { }; },{"./html-image-array":71}],63:[function(require,module,exports){ const { utils } = require('../../../utils'); -const { WebGLKernelValueDynamicInput } = require('../../web-gl/kernel-value/dynamic-html-image'); +const { WebGLKernelValueDynamicHTMLImage } = require('../../web-gl/kernel-value/dynamic-html-image'); -class WebGL2KernelValueDynamicInput extends WebGLKernelValueDynamicInput { +class WebGL2KernelValueDynamicHTMLImage extends WebGLKernelValueDynamicHTMLImage { getSource() { return utils.linesToString([ `uniform highp sampler2D ${this.id}`, @@ -10161,7 +10174,7 @@ class WebGL2KernelValueDynamicInput extends WebGLKernelValueDynamicInput { } module.exports = { - WebGL2KernelValueDynamicInput + WebGL2KernelValueDynamicHTMLImage }; },{"../../../utils":89,"../../web-gl/kernel-value/dynamic-html-image":39}],64:[function(require,module,exports){ const { utils } = require('../../../utils'); @@ -10199,9 +10212,9 @@ module.exports = { }; },{"../../../utils":89,"../../web-gl/kernel-value/dynamic-number-texture":41}],66:[function(require,module,exports){ const { utils } = require('../../../utils'); -const { WebGLKernelValueDynamicSingleArray } = require('../../web-gl/kernel-value/dynamic-single-array'); +const { WebGL2KernelValueSingleArray } = require('../../web-gl2/kernel-value/single-array'); -class WebGL2KernelValueDynamicSingleArray extends WebGLKernelValueDynamicSingleArray { +class WebGL2KernelValueDynamicSingleArray extends WebGL2KernelValueSingleArray { getSource() { return utils.linesToString([ `uniform highp sampler2D ${this.id}`, @@ -10209,16 +10222,26 @@ class WebGL2KernelValueDynamicSingleArray extends WebGLKernelValueDynamicSingleA `uniform highp ivec3 ${this.dimensionsId}`, ]); } + + updateValue(value) { + this.dimensions = utils.getDimensions(value, true); + this.textureSize = utils.getMemoryOptimizedFloatTextureSize(this.dimensions, this.bitRatio); + this.uploadArrayLength = this.textureSize[0] * this.textureSize[1] * this.bitRatio; + this.uploadValue = new Float32Array(this.uploadArrayLength); + this.kernel.setUniform3iv(this.dimensionsId, this.dimensions); + this.kernel.setUniform2iv(this.sizeId, this.textureSize); + super.updateValue(value); + } } module.exports = { WebGL2KernelValueDynamicSingleArray }; -},{"../../../utils":89,"../../web-gl/kernel-value/dynamic-single-array":42}],67:[function(require,module,exports){ +},{"../../../utils":89,"../../web-gl2/kernel-value/single-array":76}],67:[function(require,module,exports){ const { utils } = require('../../../utils'); -const { WebGLKernelValueDynamicSingleInput } = require('../../web-gl/kernel-value/dynamic-single-input'); +const { WebGL2KernelValueSingleInput } = require('../../web-gl2/kernel-value/single-input'); -class WebGL2KernelValueDynamicSingleInput extends WebGLKernelValueDynamicSingleInput { +class WebGL2KernelValueDynamicSingleInput extends WebGL2KernelValueSingleInput { getSource() { return utils.linesToString([ `uniform highp sampler2D ${this.id}`, @@ -10226,12 +10249,22 @@ class WebGL2KernelValueDynamicSingleInput extends WebGLKernelValueDynamicSingleI `uniform highp ivec3 ${this.dimensionsId}`, ]); } + + updateValue(value) { + this.dimensions = value.size; + this.textureSize = utils.getMemoryOptimizedFloatTextureSize(this.dimensions, this.bitRatio); + this.uploadArrayLength = this.textureSize[0] * this.textureSize[1] * this.bitRatio; + this.uploadValue = new Float32Array(this.uploadArrayLength); + this.kernel.setUniform3iv(this.dimensionsId, this.dimensions); + this.kernel.setUniform2iv(this.sizeId, this.textureSize); + super.updateValue(value); + } } module.exports = { WebGL2KernelValueDynamicSingleInput }; -},{"../../../utils":89,"../../web-gl/kernel-value/dynamic-single-input":43}],68:[function(require,module,exports){ +},{"../../../utils":89,"../../web-gl2/kernel-value/single-input":77}],68:[function(require,module,exports){ const { utils } = require('../../../utils'); const { WebGLKernelValueDynamicUnsignedArray } = require('../../web-gl/kernel-value/dynamic-unsigned-array'); @@ -10523,6 +10556,7 @@ let isSupported = null; let testCanvas = null; let testContext = null; let testExtensions = null; + let features = null; class WebGL2Kernel extends WebGLKernel { @@ -11338,7 +11372,25 @@ class GPU { gpu: this, validate, onRequestFallback: (args) => { - const fallbackKernel = new CPUKernel(source, mergedSettings); + const fallbackKernel = new CPUKernel(source, { + graphical: kernel.graphical, + loopMaxIterations: kernel.loopMaxIterations, + constants: kernel.constants, + dynamicOutput: kernel.dynamicOutput, + dynamicArgument: kernel.dynamicArguments, + output: kernel.output, + precision: kernel.precision, + pipeline: kernel.pipeline, + immutable: kernel.immutable, + optimizeFloatMemory: kernel.optimizeFloatMemory, + fixIntegerDivisionAccuracy: kernel.fixIntegerDivisionAccuracy, + functions: kernel.functions, + nativeFunctions: kernel.nativeFunctions, + subKernels: kernel.subKernels, + strictIntegers: kernel.strictIntegers, + debug: kernel.debug, + warnVarUsage: kernel.warnVarUsage, + }); fallbackKernel.build.apply(fallbackKernel, args); const result = fallbackKernel.run.apply(fallbackKernel, args); kernel.replaceKernel(fallbackKernel); @@ -11361,7 +11413,10 @@ class GPU { } const newKernel = switchableKernels[signature] = new this.Kernel(source, { graphical: kernel.graphical, + loopMaxIterations: kernel.loopMaxIterations, constants: kernel.constants, + dynamicOutput: kernel.dynamicOutput, + dynamicArgument: kernel.dynamicArguments, context: kernel.context, canvas: kernel.canvas, output: kernel.output, @@ -11377,6 +11432,7 @@ class GPU { debug: kernel.debug, gpu: this, validate, + warnVarUsage: kernel.warnVarUsage, }); newKernel.build.apply(newKernel, args); newKernel.run.apply(newKernel, args); diff --git a/dist/gpu-browser-core.min.js b/dist/gpu-browser-core.min.js index c47575fc..9d40381f 100644 --- a/dist/gpu-browser-core.min.js +++ b/dist/gpu-browser-core.min.js @@ -4,8 +4,8 @@ * * GPU Accelerated JavaScript * - * @version 2.0.0-rc.19 - * @date Tue Jul 02 2019 12:17:46 GMT-0400 (Eastern Daylight Time) + * @version 2.0.0-rc.20 + * @date Fri Jul 05 2019 11:02:56 GMT-0400 (Eastern Daylight Time) * * @license MIT * The MIT License @@ -17,8 +17,8 @@ * * GPU Accelerated JavaScript * - * @version 2.0.0-rc.19 - * @date Tue Jul 02 2019 12:17:44 GMT-0400 (Eastern Daylight Time) + * @version 2.0.0-rc.20 + * @date Fri Jul 05 2019 11:02:54 GMT-0400 (Eastern Daylight Time) * * @license MIT * The MIT License @@ -730,7 +730,7 @@ class CPUFunctionNode extends FunctionNode { } astVariableDeclaration(varDecNode, retArr) { - if (varDecNode.kind === 'var') { + if (varDecNode.kind === 'var' && this.warnVarUsage) { this.varWarn(); } retArr.push(`${varDecNode.kind} `); @@ -913,9 +913,9 @@ class CPUFunctionNode extends FunctionNode { if (isInput) { retArr.push('[('); this.astGeneric(zProperty, retArr); - retArr.push(`*${ size[1] * size[0]})+(`); + retArr.push(`*${ this.dynamicArguments ? '(outputY * outputX)' : size[1] * size[0] })+(`); this.astGeneric(yProperty, retArr); - retArr.push(`*${ size[0] })+`); + retArr.push(`*${ this.dynamicArguments ? 'outputX' : size[0] })+`); this.astGeneric(xProperty, retArr); retArr.push(']'); } else { @@ -933,7 +933,7 @@ class CPUFunctionNode extends FunctionNode { if (isInput) { retArr.push('[('); this.astGeneric(yProperty, retArr); - retArr.push(`*${ size[0] })+`); + retArr.push(`*${ this.dynamicArguments ? 'outputX' : size[0] })+`); this.astGeneric(xProperty, retArr); retArr.push(']'); } else { @@ -1687,7 +1687,9 @@ class FunctionBuilder { functions, leadingReturnStatement, followingReturnStatement, + dynamicArguments, dynamicOutput, + warnVarUsage, } = kernel; const needsArgumentType = (functionName, index) => { @@ -1749,7 +1751,8 @@ class FunctionBuilder { triggerImplyArgumentType, triggerTrackArgumentSynonym, lookupArgumentSynonym, - onFunctionCall + onFunctionCall, + warnVarUsage, })); nestedFunction.traceFunctionAST(ast); functionBuilder.addFunctionNode(nestedFunction); @@ -1777,6 +1780,7 @@ class FunctionBuilder { loopMaxIterations, output, plugins, + dynamicArguments, dynamicOutput, }, extraNodeOptions || {}); @@ -2247,8 +2251,10 @@ class FunctionNode { this.leadingReturnStatement = null; this.followingReturnStatement = null; this.dynamicOutput = null; + this.dynamicArguments = null; this.strictTypingChecking = false; this.fixIntegerDivisionAccuracy = null; + this.warnVarUsage = true; if (settings) { for (const p in settings) { @@ -5478,6 +5484,7 @@ class Kernel { this.optimizeFloatMemory = null; this.strictIntegers = false; this.fixIntegerDivisionAccuracy = null; + this.warnVarUsage = true; } mergeSettings(settings) { @@ -5673,6 +5680,11 @@ class Kernel { return this; } + setWarnVarUsage(flag) { + this.warnVarUsage = flag; + return this; + } + getCanvas() { utils.warnDeprecated('method', 'getCanvas'); return this.canvas; @@ -6797,7 +6809,7 @@ class WebGLFunctionNode extends FunctionNode { } astVariableDeclaration(varDecNode, retArr) { - if (varDecNode.kind === 'var') { + if (varDecNode.kind === 'var' && this.warnVarUsage) { this.varWarn(); } const declarations = varDecNode.declarations; @@ -7582,7 +7594,7 @@ module.exports = { const { utils } = require('../../../utils'); const { WebGLKernelValueHTMLImage } = require('./html-image'); -class WebGLKernelValueDynamicInput extends WebGLKernelValueHTMLImage { +class WebGLKernelValueDynamicHTMLImage extends WebGLKernelValueHTMLImage { getSource() { return utils.linesToString([ `uniform sampler2D ${this.id}`, @@ -7602,7 +7614,7 @@ class WebGLKernelValueDynamicInput extends WebGLKernelValueHTMLImage { } module.exports = { - WebGLKernelValueDynamicInput + WebGLKernelValueDynamicHTMLImage }; },{"../../../utils":89,"./html-image":47}],40:[function(require,module,exports){ const { utils } = require('../../../utils'); @@ -7643,8 +7655,8 @@ class WebGLKernelValueDynamicNumberTexture extends WebGLKernelValueNumberTexture } updateValue(value) { - this.dimensions = inputTexture.dimensions; - this.textureSize = inputTexture.size; + this.dimensions = value.dimensions; + this.textureSize = value.size; this.kernel.setUniform3iv(this.dimensionsId, this.dimensions); this.kernel.setUniform2iv(this.sizeId, this.textureSize); super.updateValue(value); @@ -7697,7 +7709,7 @@ class WebGLKernelValueDynamicSingleInput extends WebGLKernelValueSingleInput { updateValue(value) { this.dimensions = value.size; this.textureSize = utils.getMemoryOptimizedFloatTextureSize(this.dimensions, this.bitRatio); - this.uploadArrayLength = this.textureSize[0] * this.textureSize[1] * (4 / this.bitRatio); + this.uploadArrayLength = this.textureSize[0] * this.textureSize[1] * this.bitRatio; this.uploadValue = new Float32Array(this.uploadArrayLength); this.kernel.setUniform3iv(this.dimensionsId, this.dimensions); this.kernel.setUniform2iv(this.sizeId, this.textureSize); @@ -9970,6 +9982,7 @@ void main(void) { module.exports = { fragmentShader }; + },{}],59:[function(require,module,exports){ const { WebGLFunctionNode } = require('../web-gl/function-node'); @@ -10161,9 +10174,9 @@ module.exports = { }; },{"./html-image-array":71}],63:[function(require,module,exports){ const { utils } = require('../../../utils'); -const { WebGLKernelValueDynamicInput } = require('../../web-gl/kernel-value/dynamic-html-image'); +const { WebGLKernelValueDynamicHTMLImage } = require('../../web-gl/kernel-value/dynamic-html-image'); -class WebGL2KernelValueDynamicInput extends WebGLKernelValueDynamicInput { +class WebGL2KernelValueDynamicHTMLImage extends WebGLKernelValueDynamicHTMLImage { getSource() { return utils.linesToString([ `uniform highp sampler2D ${this.id}`, @@ -10174,7 +10187,7 @@ class WebGL2KernelValueDynamicInput extends WebGLKernelValueDynamicInput { } module.exports = { - WebGL2KernelValueDynamicInput + WebGL2KernelValueDynamicHTMLImage }; },{"../../../utils":89,"../../web-gl/kernel-value/dynamic-html-image":39}],64:[function(require,module,exports){ const { utils } = require('../../../utils'); @@ -10212,9 +10225,9 @@ module.exports = { }; },{"../../../utils":89,"../../web-gl/kernel-value/dynamic-number-texture":41}],66:[function(require,module,exports){ const { utils } = require('../../../utils'); -const { WebGLKernelValueDynamicSingleArray } = require('../../web-gl/kernel-value/dynamic-single-array'); +const { WebGL2KernelValueSingleArray } = require('../../web-gl2/kernel-value/single-array'); -class WebGL2KernelValueDynamicSingleArray extends WebGLKernelValueDynamicSingleArray { +class WebGL2KernelValueDynamicSingleArray extends WebGL2KernelValueSingleArray { getSource() { return utils.linesToString([ `uniform highp sampler2D ${this.id}`, @@ -10222,16 +10235,26 @@ class WebGL2KernelValueDynamicSingleArray extends WebGLKernelValueDynamicSingleA `uniform highp ivec3 ${this.dimensionsId}`, ]); } + + updateValue(value) { + this.dimensions = utils.getDimensions(value, true); + this.textureSize = utils.getMemoryOptimizedFloatTextureSize(this.dimensions, this.bitRatio); + this.uploadArrayLength = this.textureSize[0] * this.textureSize[1] * this.bitRatio; + this.uploadValue = new Float32Array(this.uploadArrayLength); + this.kernel.setUniform3iv(this.dimensionsId, this.dimensions); + this.kernel.setUniform2iv(this.sizeId, this.textureSize); + super.updateValue(value); + } } module.exports = { WebGL2KernelValueDynamicSingleArray }; -},{"../../../utils":89,"../../web-gl/kernel-value/dynamic-single-array":42}],67:[function(require,module,exports){ +},{"../../../utils":89,"../../web-gl2/kernel-value/single-array":76}],67:[function(require,module,exports){ const { utils } = require('../../../utils'); -const { WebGLKernelValueDynamicSingleInput } = require('../../web-gl/kernel-value/dynamic-single-input'); +const { WebGL2KernelValueSingleInput } = require('../../web-gl2/kernel-value/single-input'); -class WebGL2KernelValueDynamicSingleInput extends WebGLKernelValueDynamicSingleInput { +class WebGL2KernelValueDynamicSingleInput extends WebGL2KernelValueSingleInput { getSource() { return utils.linesToString([ `uniform highp sampler2D ${this.id}`, @@ -10239,12 +10262,22 @@ class WebGL2KernelValueDynamicSingleInput extends WebGLKernelValueDynamicSingleI `uniform highp ivec3 ${this.dimensionsId}`, ]); } + + updateValue(value) { + this.dimensions = value.size; + this.textureSize = utils.getMemoryOptimizedFloatTextureSize(this.dimensions, this.bitRatio); + this.uploadArrayLength = this.textureSize[0] * this.textureSize[1] * this.bitRatio; + this.uploadValue = new Float32Array(this.uploadArrayLength); + this.kernel.setUniform3iv(this.dimensionsId, this.dimensions); + this.kernel.setUniform2iv(this.sizeId, this.textureSize); + super.updateValue(value); + } } module.exports = { WebGL2KernelValueDynamicSingleInput }; -},{"../../../utils":89,"../../web-gl/kernel-value/dynamic-single-input":43}],68:[function(require,module,exports){ +},{"../../../utils":89,"../../web-gl2/kernel-value/single-input":77}],68:[function(require,module,exports){ const { utils } = require('../../../utils'); const { WebGLKernelValueDynamicUnsignedArray } = require('../../web-gl/kernel-value/dynamic-unsigned-array'); @@ -10536,6 +10569,7 @@ let isSupported = null; let testCanvas = null; let testContext = null; let testExtensions = null; + let features = null; class WebGL2Kernel extends WebGLKernel { @@ -11351,7 +11385,25 @@ class GPU { gpu: this, validate, onRequestFallback: (args) => { - const fallbackKernel = new CPUKernel(source, mergedSettings); + const fallbackKernel = new CPUKernel(source, { + graphical: kernel.graphical, + loopMaxIterations: kernel.loopMaxIterations, + constants: kernel.constants, + dynamicOutput: kernel.dynamicOutput, + dynamicArgument: kernel.dynamicArguments, + output: kernel.output, + precision: kernel.precision, + pipeline: kernel.pipeline, + immutable: kernel.immutable, + optimizeFloatMemory: kernel.optimizeFloatMemory, + fixIntegerDivisionAccuracy: kernel.fixIntegerDivisionAccuracy, + functions: kernel.functions, + nativeFunctions: kernel.nativeFunctions, + subKernels: kernel.subKernels, + strictIntegers: kernel.strictIntegers, + debug: kernel.debug, + warnVarUsage: kernel.warnVarUsage, + }); fallbackKernel.build.apply(fallbackKernel, args); const result = fallbackKernel.run.apply(fallbackKernel, args); kernel.replaceKernel(fallbackKernel); @@ -11374,7 +11426,10 @@ class GPU { } const newKernel = switchableKernels[signature] = new this.Kernel(source, { graphical: kernel.graphical, + loopMaxIterations: kernel.loopMaxIterations, constants: kernel.constants, + dynamicOutput: kernel.dynamicOutput, + dynamicArgument: kernel.dynamicArguments, context: kernel.context, canvas: kernel.canvas, output: kernel.output, @@ -11390,6 +11445,7 @@ class GPU { debug: kernel.debug, gpu: this, validate, + warnVarUsage: kernel.warnVarUsage, }); newKernel.build.apply(newKernel, args); newKernel.run.apply(newKernel, args); diff --git a/dist/gpu-browser.js b/dist/gpu-browser.js index bf890b6f..6e21a38d 100644 --- a/dist/gpu-browser.js +++ b/dist/gpu-browser.js @@ -4,8 +4,8 @@ * * GPU Accelerated JavaScript * - * @version 2.0.0-rc.19 - * @date Tue Jul 02 2019 12:17:44 GMT-0400 (Eastern Daylight Time) + * @version 2.0.0-rc.20 + * @date Fri Jul 05 2019 11:02:54 GMT-0400 (Eastern Daylight Time) * * @license MIT * The MIT License @@ -5481,7 +5481,7 @@ class CPUFunctionNode extends FunctionNode { } astVariableDeclaration(varDecNode, retArr) { - if (varDecNode.kind === 'var') { + if (varDecNode.kind === 'var' && this.warnVarUsage) { this.varWarn(); } retArr.push(`${varDecNode.kind} `); @@ -5664,9 +5664,9 @@ class CPUFunctionNode extends FunctionNode { if (isInput) { retArr.push('[('); this.astGeneric(zProperty, retArr); - retArr.push(`*${ size[1] * size[0]})+(`); + retArr.push(`*${ this.dynamicArguments ? '(outputY * outputX)' : size[1] * size[0] })+(`); this.astGeneric(yProperty, retArr); - retArr.push(`*${ size[0] })+`); + retArr.push(`*${ this.dynamicArguments ? 'outputX' : size[0] })+`); this.astGeneric(xProperty, retArr); retArr.push(']'); } else { @@ -5684,7 +5684,7 @@ class CPUFunctionNode extends FunctionNode { if (isInput) { retArr.push('[('); this.astGeneric(yProperty, retArr); - retArr.push(`*${ size[0] })+`); + retArr.push(`*${ this.dynamicArguments ? 'outputX' : size[0] })+`); this.astGeneric(xProperty, retArr); retArr.push(']'); } else { @@ -6438,7 +6438,9 @@ class FunctionBuilder { functions, leadingReturnStatement, followingReturnStatement, + dynamicArguments, dynamicOutput, + warnVarUsage, } = kernel; const needsArgumentType = (functionName, index) => { @@ -6500,7 +6502,8 @@ class FunctionBuilder { triggerImplyArgumentType, triggerTrackArgumentSynonym, lookupArgumentSynonym, - onFunctionCall + onFunctionCall, + warnVarUsage, })); nestedFunction.traceFunctionAST(ast); functionBuilder.addFunctionNode(nestedFunction); @@ -6528,6 +6531,7 @@ class FunctionBuilder { loopMaxIterations, output, plugins, + dynamicArguments, dynamicOutput, }, extraNodeOptions || {}); @@ -6998,8 +7002,10 @@ class FunctionNode { this.leadingReturnStatement = null; this.followingReturnStatement = null; this.dynamicOutput = null; + this.dynamicArguments = null; this.strictTypingChecking = false; this.fixIntegerDivisionAccuracy = null; + this.warnVarUsage = true; if (settings) { for (const p in settings) { @@ -10229,6 +10235,7 @@ class Kernel { this.optimizeFloatMemory = null; this.strictIntegers = false; this.fixIntegerDivisionAccuracy = null; + this.warnVarUsage = true; } mergeSettings(settings) { @@ -10424,6 +10431,11 @@ class Kernel { return this; } + setWarnVarUsage(flag) { + this.warnVarUsage = flag; + return this; + } + getCanvas() { utils.warnDeprecated('method', 'getCanvas'); return this.canvas; @@ -11548,7 +11560,7 @@ class WebGLFunctionNode extends FunctionNode { } astVariableDeclaration(varDecNode, retArr) { - if (varDecNode.kind === 'var') { + if (varDecNode.kind === 'var' && this.warnVarUsage) { this.varWarn(); } const declarations = varDecNode.declarations; @@ -12333,7 +12345,7 @@ module.exports = { const { utils } = require('../../../utils'); const { WebGLKernelValueHTMLImage } = require('./html-image'); -class WebGLKernelValueDynamicInput extends WebGLKernelValueHTMLImage { +class WebGLKernelValueDynamicHTMLImage extends WebGLKernelValueHTMLImage { getSource() { return utils.linesToString([ `uniform sampler2D ${this.id}`, @@ -12353,7 +12365,7 @@ class WebGLKernelValueDynamicInput extends WebGLKernelValueHTMLImage { } module.exports = { - WebGLKernelValueDynamicInput + WebGLKernelValueDynamicHTMLImage }; },{"../../../utils":90,"./html-image":48}],41:[function(require,module,exports){ const { utils } = require('../../../utils'); @@ -12394,8 +12406,8 @@ class WebGLKernelValueDynamicNumberTexture extends WebGLKernelValueNumberTexture } updateValue(value) { - this.dimensions = inputTexture.dimensions; - this.textureSize = inputTexture.size; + this.dimensions = value.dimensions; + this.textureSize = value.size; this.kernel.setUniform3iv(this.dimensionsId, this.dimensions); this.kernel.setUniform2iv(this.sizeId, this.textureSize); super.updateValue(value); @@ -12448,7 +12460,7 @@ class WebGLKernelValueDynamicSingleInput extends WebGLKernelValueSingleInput { updateValue(value) { this.dimensions = value.size; this.textureSize = utils.getMemoryOptimizedFloatTextureSize(this.dimensions, this.bitRatio); - this.uploadArrayLength = this.textureSize[0] * this.textureSize[1] * (4 / this.bitRatio); + this.uploadArrayLength = this.textureSize[0] * this.textureSize[1] * this.bitRatio; this.uploadValue = new Float32Array(this.uploadArrayLength); this.kernel.setUniform3iv(this.dimensionsId, this.dimensions); this.kernel.setUniform2iv(this.sizeId, this.textureSize); @@ -14721,6 +14733,7 @@ void main(void) { module.exports = { fragmentShader }; + },{}],60:[function(require,module,exports){ const { WebGLFunctionNode } = require('../web-gl/function-node'); @@ -14912,9 +14925,9 @@ module.exports = { }; },{"./html-image-array":72}],64:[function(require,module,exports){ const { utils } = require('../../../utils'); -const { WebGLKernelValueDynamicInput } = require('../../web-gl/kernel-value/dynamic-html-image'); +const { WebGLKernelValueDynamicHTMLImage } = require('../../web-gl/kernel-value/dynamic-html-image'); -class WebGL2KernelValueDynamicInput extends WebGLKernelValueDynamicInput { +class WebGL2KernelValueDynamicHTMLImage extends WebGLKernelValueDynamicHTMLImage { getSource() { return utils.linesToString([ `uniform highp sampler2D ${this.id}`, @@ -14925,7 +14938,7 @@ class WebGL2KernelValueDynamicInput extends WebGLKernelValueDynamicInput { } module.exports = { - WebGL2KernelValueDynamicInput + WebGL2KernelValueDynamicHTMLImage }; },{"../../../utils":90,"../../web-gl/kernel-value/dynamic-html-image":40}],65:[function(require,module,exports){ const { utils } = require('../../../utils'); @@ -14963,9 +14976,9 @@ module.exports = { }; },{"../../../utils":90,"../../web-gl/kernel-value/dynamic-number-texture":42}],67:[function(require,module,exports){ const { utils } = require('../../../utils'); -const { WebGLKernelValueDynamicSingleArray } = require('../../web-gl/kernel-value/dynamic-single-array'); +const { WebGL2KernelValueSingleArray } = require('../../web-gl2/kernel-value/single-array'); -class WebGL2KernelValueDynamicSingleArray extends WebGLKernelValueDynamicSingleArray { +class WebGL2KernelValueDynamicSingleArray extends WebGL2KernelValueSingleArray { getSource() { return utils.linesToString([ `uniform highp sampler2D ${this.id}`, @@ -14973,16 +14986,26 @@ class WebGL2KernelValueDynamicSingleArray extends WebGLKernelValueDynamicSingleA `uniform highp ivec3 ${this.dimensionsId}`, ]); } + + updateValue(value) { + this.dimensions = utils.getDimensions(value, true); + this.textureSize = utils.getMemoryOptimizedFloatTextureSize(this.dimensions, this.bitRatio); + this.uploadArrayLength = this.textureSize[0] * this.textureSize[1] * this.bitRatio; + this.uploadValue = new Float32Array(this.uploadArrayLength); + this.kernel.setUniform3iv(this.dimensionsId, this.dimensions); + this.kernel.setUniform2iv(this.sizeId, this.textureSize); + super.updateValue(value); + } } module.exports = { WebGL2KernelValueDynamicSingleArray }; -},{"../../../utils":90,"../../web-gl/kernel-value/dynamic-single-array":43}],68:[function(require,module,exports){ +},{"../../../utils":90,"../../web-gl2/kernel-value/single-array":77}],68:[function(require,module,exports){ const { utils } = require('../../../utils'); -const { WebGLKernelValueDynamicSingleInput } = require('../../web-gl/kernel-value/dynamic-single-input'); +const { WebGL2KernelValueSingleInput } = require('../../web-gl2/kernel-value/single-input'); -class WebGL2KernelValueDynamicSingleInput extends WebGLKernelValueDynamicSingleInput { +class WebGL2KernelValueDynamicSingleInput extends WebGL2KernelValueSingleInput { getSource() { return utils.linesToString([ `uniform highp sampler2D ${this.id}`, @@ -14990,12 +15013,22 @@ class WebGL2KernelValueDynamicSingleInput extends WebGLKernelValueDynamicSingleI `uniform highp ivec3 ${this.dimensionsId}`, ]); } + + updateValue(value) { + this.dimensions = value.size; + this.textureSize = utils.getMemoryOptimizedFloatTextureSize(this.dimensions, this.bitRatio); + this.uploadArrayLength = this.textureSize[0] * this.textureSize[1] * this.bitRatio; + this.uploadValue = new Float32Array(this.uploadArrayLength); + this.kernel.setUniform3iv(this.dimensionsId, this.dimensions); + this.kernel.setUniform2iv(this.sizeId, this.textureSize); + super.updateValue(value); + } } module.exports = { WebGL2KernelValueDynamicSingleInput }; -},{"../../../utils":90,"../../web-gl/kernel-value/dynamic-single-input":44}],69:[function(require,module,exports){ +},{"../../../utils":90,"../../web-gl2/kernel-value/single-input":78}],69:[function(require,module,exports){ const { utils } = require('../../../utils'); const { WebGLKernelValueDynamicUnsignedArray } = require('../../web-gl/kernel-value/dynamic-unsigned-array'); @@ -15287,6 +15320,7 @@ let isSupported = null; let testCanvas = null; let testContext = null; let testExtensions = null; + let features = null; class WebGL2Kernel extends WebGLKernel { @@ -16102,7 +16136,25 @@ class GPU { gpu: this, validate, onRequestFallback: (args) => { - const fallbackKernel = new CPUKernel(source, mergedSettings); + const fallbackKernel = new CPUKernel(source, { + graphical: kernel.graphical, + loopMaxIterations: kernel.loopMaxIterations, + constants: kernel.constants, + dynamicOutput: kernel.dynamicOutput, + dynamicArgument: kernel.dynamicArguments, + output: kernel.output, + precision: kernel.precision, + pipeline: kernel.pipeline, + immutable: kernel.immutable, + optimizeFloatMemory: kernel.optimizeFloatMemory, + fixIntegerDivisionAccuracy: kernel.fixIntegerDivisionAccuracy, + functions: kernel.functions, + nativeFunctions: kernel.nativeFunctions, + subKernels: kernel.subKernels, + strictIntegers: kernel.strictIntegers, + debug: kernel.debug, + warnVarUsage: kernel.warnVarUsage, + }); fallbackKernel.build.apply(fallbackKernel, args); const result = fallbackKernel.run.apply(fallbackKernel, args); kernel.replaceKernel(fallbackKernel); @@ -16125,7 +16177,10 @@ class GPU { } const newKernel = switchableKernels[signature] = new this.Kernel(source, { graphical: kernel.graphical, + loopMaxIterations: kernel.loopMaxIterations, constants: kernel.constants, + dynamicOutput: kernel.dynamicOutput, + dynamicArgument: kernel.dynamicArguments, context: kernel.context, canvas: kernel.canvas, output: kernel.output, @@ -16141,6 +16196,7 @@ class GPU { debug: kernel.debug, gpu: this, validate, + warnVarUsage: kernel.warnVarUsage, }); newKernel.build.apply(newKernel, args); newKernel.run.apply(newKernel, args); diff --git a/dist/gpu-browser.min.js b/dist/gpu-browser.min.js index 0ecb60ba..d7f9e6a9 100644 --- a/dist/gpu-browser.min.js +++ b/dist/gpu-browser.min.js @@ -4,8 +4,8 @@ * * GPU Accelerated JavaScript * - * @version 2.0.0-rc.19 - * @date Tue Jul 02 2019 12:17:46 GMT-0400 (Eastern Daylight Time) + * @version 2.0.0-rc.20 + * @date Fri Jul 05 2019 11:02:56 GMT-0400 (Eastern Daylight Time) * * @license MIT * The MIT License @@ -17,8 +17,8 @@ * * GPU Accelerated JavaScript * - * @version 2.0.0-rc.19 - * @date Tue Jul 02 2019 12:17:44 GMT-0400 (Eastern Daylight Time) + * @version 2.0.0-rc.20 + * @date Fri Jul 05 2019 11:02:54 GMT-0400 (Eastern Daylight Time) * * @license MIT * The MIT License @@ -5494,7 +5494,7 @@ class CPUFunctionNode extends FunctionNode { } astVariableDeclaration(varDecNode, retArr) { - if (varDecNode.kind === 'var') { + if (varDecNode.kind === 'var' && this.warnVarUsage) { this.varWarn(); } retArr.push(`${varDecNode.kind} `); @@ -5677,9 +5677,9 @@ class CPUFunctionNode extends FunctionNode { if (isInput) { retArr.push('[('); this.astGeneric(zProperty, retArr); - retArr.push(`*${ size[1] * size[0]})+(`); + retArr.push(`*${ this.dynamicArguments ? '(outputY * outputX)' : size[1] * size[0] })+(`); this.astGeneric(yProperty, retArr); - retArr.push(`*${ size[0] })+`); + retArr.push(`*${ this.dynamicArguments ? 'outputX' : size[0] })+`); this.astGeneric(xProperty, retArr); retArr.push(']'); } else { @@ -5697,7 +5697,7 @@ class CPUFunctionNode extends FunctionNode { if (isInput) { retArr.push('[('); this.astGeneric(yProperty, retArr); - retArr.push(`*${ size[0] })+`); + retArr.push(`*${ this.dynamicArguments ? 'outputX' : size[0] })+`); this.astGeneric(xProperty, retArr); retArr.push(']'); } else { @@ -6451,7 +6451,9 @@ class FunctionBuilder { functions, leadingReturnStatement, followingReturnStatement, + dynamicArguments, dynamicOutput, + warnVarUsage, } = kernel; const needsArgumentType = (functionName, index) => { @@ -6513,7 +6515,8 @@ class FunctionBuilder { triggerImplyArgumentType, triggerTrackArgumentSynonym, lookupArgumentSynonym, - onFunctionCall + onFunctionCall, + warnVarUsage, })); nestedFunction.traceFunctionAST(ast); functionBuilder.addFunctionNode(nestedFunction); @@ -6541,6 +6544,7 @@ class FunctionBuilder { loopMaxIterations, output, plugins, + dynamicArguments, dynamicOutput, }, extraNodeOptions || {}); @@ -7011,8 +7015,10 @@ class FunctionNode { this.leadingReturnStatement = null; this.followingReturnStatement = null; this.dynamicOutput = null; + this.dynamicArguments = null; this.strictTypingChecking = false; this.fixIntegerDivisionAccuracy = null; + this.warnVarUsage = true; if (settings) { for (const p in settings) { @@ -10242,6 +10248,7 @@ class Kernel { this.optimizeFloatMemory = null; this.strictIntegers = false; this.fixIntegerDivisionAccuracy = null; + this.warnVarUsage = true; } mergeSettings(settings) { @@ -10437,6 +10444,11 @@ class Kernel { return this; } + setWarnVarUsage(flag) { + this.warnVarUsage = flag; + return this; + } + getCanvas() { utils.warnDeprecated('method', 'getCanvas'); return this.canvas; @@ -11561,7 +11573,7 @@ class WebGLFunctionNode extends FunctionNode { } astVariableDeclaration(varDecNode, retArr) { - if (varDecNode.kind === 'var') { + if (varDecNode.kind === 'var' && this.warnVarUsage) { this.varWarn(); } const declarations = varDecNode.declarations; @@ -12346,7 +12358,7 @@ module.exports = { const { utils } = require('../../../utils'); const { WebGLKernelValueHTMLImage } = require('./html-image'); -class WebGLKernelValueDynamicInput extends WebGLKernelValueHTMLImage { +class WebGLKernelValueDynamicHTMLImage extends WebGLKernelValueHTMLImage { getSource() { return utils.linesToString([ `uniform sampler2D ${this.id}`, @@ -12366,7 +12378,7 @@ class WebGLKernelValueDynamicInput extends WebGLKernelValueHTMLImage { } module.exports = { - WebGLKernelValueDynamicInput + WebGLKernelValueDynamicHTMLImage }; },{"../../../utils":90,"./html-image":48}],41:[function(require,module,exports){ const { utils } = require('../../../utils'); @@ -12407,8 +12419,8 @@ class WebGLKernelValueDynamicNumberTexture extends WebGLKernelValueNumberTexture } updateValue(value) { - this.dimensions = inputTexture.dimensions; - this.textureSize = inputTexture.size; + this.dimensions = value.dimensions; + this.textureSize = value.size; this.kernel.setUniform3iv(this.dimensionsId, this.dimensions); this.kernel.setUniform2iv(this.sizeId, this.textureSize); super.updateValue(value); @@ -12461,7 +12473,7 @@ class WebGLKernelValueDynamicSingleInput extends WebGLKernelValueSingleInput { updateValue(value) { this.dimensions = value.size; this.textureSize = utils.getMemoryOptimizedFloatTextureSize(this.dimensions, this.bitRatio); - this.uploadArrayLength = this.textureSize[0] * this.textureSize[1] * (4 / this.bitRatio); + this.uploadArrayLength = this.textureSize[0] * this.textureSize[1] * this.bitRatio; this.uploadValue = new Float32Array(this.uploadArrayLength); this.kernel.setUniform3iv(this.dimensionsId, this.dimensions); this.kernel.setUniform2iv(this.sizeId, this.textureSize); @@ -14734,6 +14746,7 @@ void main(void) { module.exports = { fragmentShader }; + },{}],60:[function(require,module,exports){ const { WebGLFunctionNode } = require('../web-gl/function-node'); @@ -14925,9 +14938,9 @@ module.exports = { }; },{"./html-image-array":72}],64:[function(require,module,exports){ const { utils } = require('../../../utils'); -const { WebGLKernelValueDynamicInput } = require('../../web-gl/kernel-value/dynamic-html-image'); +const { WebGLKernelValueDynamicHTMLImage } = require('../../web-gl/kernel-value/dynamic-html-image'); -class WebGL2KernelValueDynamicInput extends WebGLKernelValueDynamicInput { +class WebGL2KernelValueDynamicHTMLImage extends WebGLKernelValueDynamicHTMLImage { getSource() { return utils.linesToString([ `uniform highp sampler2D ${this.id}`, @@ -14938,7 +14951,7 @@ class WebGL2KernelValueDynamicInput extends WebGLKernelValueDynamicInput { } module.exports = { - WebGL2KernelValueDynamicInput + WebGL2KernelValueDynamicHTMLImage }; },{"../../../utils":90,"../../web-gl/kernel-value/dynamic-html-image":40}],65:[function(require,module,exports){ const { utils } = require('../../../utils'); @@ -14976,9 +14989,9 @@ module.exports = { }; },{"../../../utils":90,"../../web-gl/kernel-value/dynamic-number-texture":42}],67:[function(require,module,exports){ const { utils } = require('../../../utils'); -const { WebGLKernelValueDynamicSingleArray } = require('../../web-gl/kernel-value/dynamic-single-array'); +const { WebGL2KernelValueSingleArray } = require('../../web-gl2/kernel-value/single-array'); -class WebGL2KernelValueDynamicSingleArray extends WebGLKernelValueDynamicSingleArray { +class WebGL2KernelValueDynamicSingleArray extends WebGL2KernelValueSingleArray { getSource() { return utils.linesToString([ `uniform highp sampler2D ${this.id}`, @@ -14986,16 +14999,26 @@ class WebGL2KernelValueDynamicSingleArray extends WebGLKernelValueDynamicSingleA `uniform highp ivec3 ${this.dimensionsId}`, ]); } + + updateValue(value) { + this.dimensions = utils.getDimensions(value, true); + this.textureSize = utils.getMemoryOptimizedFloatTextureSize(this.dimensions, this.bitRatio); + this.uploadArrayLength = this.textureSize[0] * this.textureSize[1] * this.bitRatio; + this.uploadValue = new Float32Array(this.uploadArrayLength); + this.kernel.setUniform3iv(this.dimensionsId, this.dimensions); + this.kernel.setUniform2iv(this.sizeId, this.textureSize); + super.updateValue(value); + } } module.exports = { WebGL2KernelValueDynamicSingleArray }; -},{"../../../utils":90,"../../web-gl/kernel-value/dynamic-single-array":43}],68:[function(require,module,exports){ +},{"../../../utils":90,"../../web-gl2/kernel-value/single-array":77}],68:[function(require,module,exports){ const { utils } = require('../../../utils'); -const { WebGLKernelValueDynamicSingleInput } = require('../../web-gl/kernel-value/dynamic-single-input'); +const { WebGL2KernelValueSingleInput } = require('../../web-gl2/kernel-value/single-input'); -class WebGL2KernelValueDynamicSingleInput extends WebGLKernelValueDynamicSingleInput { +class WebGL2KernelValueDynamicSingleInput extends WebGL2KernelValueSingleInput { getSource() { return utils.linesToString([ `uniform highp sampler2D ${this.id}`, @@ -15003,12 +15026,22 @@ class WebGL2KernelValueDynamicSingleInput extends WebGLKernelValueDynamicSingleI `uniform highp ivec3 ${this.dimensionsId}`, ]); } + + updateValue(value) { + this.dimensions = value.size; + this.textureSize = utils.getMemoryOptimizedFloatTextureSize(this.dimensions, this.bitRatio); + this.uploadArrayLength = this.textureSize[0] * this.textureSize[1] * this.bitRatio; + this.uploadValue = new Float32Array(this.uploadArrayLength); + this.kernel.setUniform3iv(this.dimensionsId, this.dimensions); + this.kernel.setUniform2iv(this.sizeId, this.textureSize); + super.updateValue(value); + } } module.exports = { WebGL2KernelValueDynamicSingleInput }; -},{"../../../utils":90,"../../web-gl/kernel-value/dynamic-single-input":44}],69:[function(require,module,exports){ +},{"../../../utils":90,"../../web-gl2/kernel-value/single-input":78}],69:[function(require,module,exports){ const { utils } = require('../../../utils'); const { WebGLKernelValueDynamicUnsignedArray } = require('../../web-gl/kernel-value/dynamic-unsigned-array'); @@ -15300,6 +15333,7 @@ let isSupported = null; let testCanvas = null; let testContext = null; let testExtensions = null; + let features = null; class WebGL2Kernel extends WebGLKernel { @@ -16115,7 +16149,25 @@ class GPU { gpu: this, validate, onRequestFallback: (args) => { - const fallbackKernel = new CPUKernel(source, mergedSettings); + const fallbackKernel = new CPUKernel(source, { + graphical: kernel.graphical, + loopMaxIterations: kernel.loopMaxIterations, + constants: kernel.constants, + dynamicOutput: kernel.dynamicOutput, + dynamicArgument: kernel.dynamicArguments, + output: kernel.output, + precision: kernel.precision, + pipeline: kernel.pipeline, + immutable: kernel.immutable, + optimizeFloatMemory: kernel.optimizeFloatMemory, + fixIntegerDivisionAccuracy: kernel.fixIntegerDivisionAccuracy, + functions: kernel.functions, + nativeFunctions: kernel.nativeFunctions, + subKernels: kernel.subKernels, + strictIntegers: kernel.strictIntegers, + debug: kernel.debug, + warnVarUsage: kernel.warnVarUsage, + }); fallbackKernel.build.apply(fallbackKernel, args); const result = fallbackKernel.run.apply(fallbackKernel, args); kernel.replaceKernel(fallbackKernel); @@ -16138,7 +16190,10 @@ class GPU { } const newKernel = switchableKernels[signature] = new this.Kernel(source, { graphical: kernel.graphical, + loopMaxIterations: kernel.loopMaxIterations, constants: kernel.constants, + dynamicOutput: kernel.dynamicOutput, + dynamicArgument: kernel.dynamicArguments, context: kernel.context, canvas: kernel.canvas, output: kernel.output, @@ -16154,6 +16209,7 @@ class GPU { debug: kernel.debug, gpu: this, validate, + warnVarUsage: kernel.warnVarUsage, }); newKernel.build.apply(newKernel, args); newKernel.run.apply(newKernel, args); diff --git a/package.json b/package.json index 882866dc..fd4d20e8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gpu.js", - "version": "2.0.0-rc.19", + "version": "2.0.0-rc.20", "description": "GPU Accelerated JavaScript", "engines": { "node": ">=10.0.0" diff --git a/src/backend/cpu/function-node.js b/src/backend/cpu/function-node.js index 72db578d..0f3c8acb 100644 --- a/src/backend/cpu/function-node.js +++ b/src/backend/cpu/function-node.js @@ -325,7 +325,7 @@ class CPUFunctionNode extends FunctionNode { * @returns {Array} the append retArr */ astVariableDeclaration(varDecNode, retArr) { - if (varDecNode.kind === 'var') { + if (varDecNode.kind === 'var' && this.warnVarUsage) { this.varWarn(); } retArr.push(`${varDecNode.kind} `); @@ -529,9 +529,9 @@ class CPUFunctionNode extends FunctionNode { if (isInput) { retArr.push('[('); this.astGeneric(zProperty, retArr); - retArr.push(`*${ size[1] * size[0]})+(`); + retArr.push(`*${ this.dynamicArguments ? '(outputY * outputX)' : size[1] * size[0] })+(`); this.astGeneric(yProperty, retArr); - retArr.push(`*${ size[0] })+`); + retArr.push(`*${ this.dynamicArguments ? 'outputX' : size[0] })+`); this.astGeneric(xProperty, retArr); retArr.push(']'); } else { @@ -549,7 +549,7 @@ class CPUFunctionNode extends FunctionNode { if (isInput) { retArr.push('[('); this.astGeneric(yProperty, retArr); - retArr.push(`*${ size[0] })+`); + retArr.push(`*${ this.dynamicArguments ? 'outputX' : size[0] })+`); this.astGeneric(xProperty, retArr); retArr.push(']'); } else { diff --git a/src/backend/function-builder.js b/src/backend/function-builder.js index 088cd04d..598f6916 100644 --- a/src/backend/function-builder.js +++ b/src/backend/function-builder.js @@ -6,7 +6,7 @@ class FunctionBuilder { /** * - * @param {typeof Kernel} kernel + * @param {Kernel} kernel * @param {FunctionNode} FunctionNode * @param {object} [extraNodeOptions] * @returns {FunctionBuilder} @@ -34,7 +34,9 @@ class FunctionBuilder { functions, leadingReturnStatement, followingReturnStatement, + dynamicArguments, dynamicOutput, + warnVarUsage, } = kernel; const needsArgumentType = (functionName, index) => { @@ -96,7 +98,8 @@ class FunctionBuilder { triggerImplyArgumentType, triggerTrackArgumentSynonym, lookupArgumentSynonym, - onFunctionCall + onFunctionCall, + warnVarUsage, })); nestedFunction.traceFunctionAST(ast); functionBuilder.addFunctionNode(nestedFunction); @@ -124,6 +127,7 @@ class FunctionBuilder { loopMaxIterations, output, plugins, + dynamicArguments, dynamicOutput, }, extraNodeOptions || {}); diff --git a/src/backend/function-node.js b/src/backend/function-node.js index c800b39e..a9816366 100644 --- a/src/backend/function-node.js +++ b/src/backend/function-node.js @@ -59,8 +59,10 @@ class FunctionNode { this.leadingReturnStatement = null; this.followingReturnStatement = null; this.dynamicOutput = null; + this.dynamicArguments = null; this.strictTypingChecking = false; this.fixIntegerDivisionAccuracy = null; + this.warnVarUsage = true; if (settings) { for (const p in settings) { diff --git a/src/backend/kernel.js b/src/backend/kernel.js index 3a218217..094529e5 100644 --- a/src/backend/kernel.js +++ b/src/backend/kernel.js @@ -16,6 +16,10 @@ class Kernel { throw new Error(`"isContextMatch" not implemented on ${ this.name }`); } + /** + * @type {IKernelFeatures} + * Used internally to populate the kernel.feature, which is a getter for the output of this value + */ static getFeatures() { throw new Error(`"getFeatures" not implemented on ${ this.name }`); } @@ -181,6 +185,7 @@ class Kernel { this.optimizeFloatMemory = null; this.strictIntegers = false; this.fixIntegerDivisionAccuracy = null; + this.warnVarUsage = true; } mergeSettings(settings) { @@ -486,6 +491,16 @@ class Kernel { return this; } + /** + * + * @param {Boolean} flag + * @return {Kernel} + */ + setWarnVarUsage(flag) { + this.warnVarUsage = flag; + return this; + } + /** * @deprecated * @returns {Object} diff --git a/src/backend/web-gl/function-node.js b/src/backend/web-gl/function-node.js index 44105ba8..4551076d 100644 --- a/src/backend/web-gl/function-node.js +++ b/src/backend/web-gl/function-node.js @@ -767,7 +767,7 @@ class WebGLFunctionNode extends FunctionNode { * @returns {Array} the append retArr */ astVariableDeclaration(varDecNode, retArr) { - if (varDecNode.kind === 'var') { + if (varDecNode.kind === 'var' && this.warnVarUsage) { this.varWarn(); } const declarations = varDecNode.declarations; diff --git a/src/backend/web-gl/kernel-value/dynamic-html-image.js b/src/backend/web-gl/kernel-value/dynamic-html-image.js index 34f7925e..e5653205 100644 --- a/src/backend/web-gl/kernel-value/dynamic-html-image.js +++ b/src/backend/web-gl/kernel-value/dynamic-html-image.js @@ -1,7 +1,7 @@ const { utils } = require('../../../utils'); const { WebGLKernelValueHTMLImage } = require('./html-image'); -class WebGLKernelValueDynamicInput extends WebGLKernelValueHTMLImage { +class WebGLKernelValueDynamicHTMLImage extends WebGLKernelValueHTMLImage { getSource() { return utils.linesToString([ `uniform sampler2D ${this.id}`, @@ -21,5 +21,5 @@ class WebGLKernelValueDynamicInput extends WebGLKernelValueHTMLImage { } module.exports = { - WebGLKernelValueDynamicInput + WebGLKernelValueDynamicHTMLImage }; \ No newline at end of file diff --git a/src/backend/web-gl/kernel-value/dynamic-number-texture.js b/src/backend/web-gl/kernel-value/dynamic-number-texture.js index a2d33556..246c47cc 100644 --- a/src/backend/web-gl/kernel-value/dynamic-number-texture.js +++ b/src/backend/web-gl/kernel-value/dynamic-number-texture.js @@ -11,8 +11,8 @@ class WebGLKernelValueDynamicNumberTexture extends WebGLKernelValueNumberTexture } updateValue(value) { - this.dimensions = inputTexture.dimensions; - this.textureSize = inputTexture.size; + this.dimensions = value.dimensions; + this.textureSize = value.size; this.kernel.setUniform3iv(this.dimensionsId, this.dimensions); this.kernel.setUniform2iv(this.sizeId, this.textureSize); super.updateValue(value); diff --git a/src/backend/web-gl/kernel-value/dynamic-single-input.js b/src/backend/web-gl/kernel-value/dynamic-single-input.js index fefcd7c7..1db18f17 100644 --- a/src/backend/web-gl/kernel-value/dynamic-single-input.js +++ b/src/backend/web-gl/kernel-value/dynamic-single-input.js @@ -13,7 +13,7 @@ class WebGLKernelValueDynamicSingleInput extends WebGLKernelValueSingleInput { updateValue(value) { this.dimensions = value.size; this.textureSize = utils.getMemoryOptimizedFloatTextureSize(this.dimensions, this.bitRatio); - this.uploadArrayLength = this.textureSize[0] * this.textureSize[1] * (4 / this.bitRatio); + this.uploadArrayLength = this.textureSize[0] * this.textureSize[1] * this.bitRatio; this.uploadValue = new Float32Array(this.uploadArrayLength); this.kernel.setUniform3iv(this.dimensionsId, this.dimensions); this.kernel.setUniform2iv(this.sizeId, this.textureSize); diff --git a/src/backend/web-gl2/kernel-value/dynamic-html-image.js b/src/backend/web-gl2/kernel-value/dynamic-html-image.js index dbcceaac..da5e6eed 100644 --- a/src/backend/web-gl2/kernel-value/dynamic-html-image.js +++ b/src/backend/web-gl2/kernel-value/dynamic-html-image.js @@ -1,7 +1,7 @@ const { utils } = require('../../../utils'); -const { WebGLKernelValueDynamicInput } = require('../../web-gl/kernel-value/dynamic-html-image'); +const { WebGLKernelValueDynamicHTMLImage } = require('../../web-gl/kernel-value/dynamic-html-image'); -class WebGL2KernelValueDynamicInput extends WebGLKernelValueDynamicInput { +class WebGL2KernelValueDynamicHTMLImage extends WebGLKernelValueDynamicHTMLImage { getSource() { return utils.linesToString([ `uniform highp sampler2D ${this.id}`, @@ -12,5 +12,5 @@ class WebGL2KernelValueDynamicInput extends WebGLKernelValueDynamicInput { } module.exports = { - WebGL2KernelValueDynamicInput + WebGL2KernelValueDynamicHTMLImage }; \ No newline at end of file diff --git a/src/backend/web-gl2/kernel-value/dynamic-single-array.js b/src/backend/web-gl2/kernel-value/dynamic-single-array.js index a5d25b78..30ef8afe 100644 --- a/src/backend/web-gl2/kernel-value/dynamic-single-array.js +++ b/src/backend/web-gl2/kernel-value/dynamic-single-array.js @@ -1,7 +1,7 @@ const { utils } = require('../../../utils'); -const { WebGLKernelValueDynamicSingleArray } = require('../../web-gl/kernel-value/dynamic-single-array'); +const { WebGL2KernelValueSingleArray } = require('../../web-gl2/kernel-value/single-array'); -class WebGL2KernelValueDynamicSingleArray extends WebGLKernelValueDynamicSingleArray { +class WebGL2KernelValueDynamicSingleArray extends WebGL2KernelValueSingleArray { getSource() { return utils.linesToString([ `uniform highp sampler2D ${this.id}`, @@ -9,6 +9,16 @@ class WebGL2KernelValueDynamicSingleArray extends WebGLKernelValueDynamicSingleA `uniform highp ivec3 ${this.dimensionsId}`, ]); } + + updateValue(value) { + this.dimensions = utils.getDimensions(value, true); + this.textureSize = utils.getMemoryOptimizedFloatTextureSize(this.dimensions, this.bitRatio); + this.uploadArrayLength = this.textureSize[0] * this.textureSize[1] * this.bitRatio; + this.uploadValue = new Float32Array(this.uploadArrayLength); + this.kernel.setUniform3iv(this.dimensionsId, this.dimensions); + this.kernel.setUniform2iv(this.sizeId, this.textureSize); + super.updateValue(value); + } } module.exports = { diff --git a/src/backend/web-gl2/kernel-value/dynamic-single-input.js b/src/backend/web-gl2/kernel-value/dynamic-single-input.js index 9c6d616e..5826d04d 100644 --- a/src/backend/web-gl2/kernel-value/dynamic-single-input.js +++ b/src/backend/web-gl2/kernel-value/dynamic-single-input.js @@ -1,7 +1,7 @@ const { utils } = require('../../../utils'); -const { WebGLKernelValueDynamicSingleInput } = require('../../web-gl/kernel-value/dynamic-single-input'); +const { WebGL2KernelValueSingleInput } = require('../../web-gl2/kernel-value/single-input'); -class WebGL2KernelValueDynamicSingleInput extends WebGLKernelValueDynamicSingleInput { +class WebGL2KernelValueDynamicSingleInput extends WebGL2KernelValueSingleInput { getSource() { return utils.linesToString([ `uniform highp sampler2D ${this.id}`, @@ -9,6 +9,16 @@ class WebGL2KernelValueDynamicSingleInput extends WebGLKernelValueDynamicSingleI `uniform highp ivec3 ${this.dimensionsId}`, ]); } + + updateValue(value) { + this.dimensions = value.size; + this.textureSize = utils.getMemoryOptimizedFloatTextureSize(this.dimensions, this.bitRatio); + this.uploadArrayLength = this.textureSize[0] * this.textureSize[1] * this.bitRatio; + this.uploadValue = new Float32Array(this.uploadArrayLength); + this.kernel.setUniform3iv(this.dimensionsId, this.dimensions); + this.kernel.setUniform2iv(this.sizeId, this.textureSize); + super.updateValue(value); + } } module.exports = { diff --git a/src/backend/web-gl2/kernel.js b/src/backend/web-gl2/kernel.js index c9419c3f..cd466994 100644 --- a/src/backend/web-gl2/kernel.js +++ b/src/backend/web-gl2/kernel.js @@ -10,14 +10,10 @@ let isSupported = null; let testCanvas = null; let testContext = null; let testExtensions = null; + /** * - * @type {{ - * isFloatRead: Boolean, - * isIntegerDivisionAccurate: Boolean, - * kernelMap: Boolean, - * isTextureFloat: Boolean, - * }|null} + * @type {IKernelFeatures} */ let features = null; diff --git a/src/gpu.js b/src/gpu.js index 3bf4aab7..f9150a09 100644 --- a/src/gpu.js +++ b/src/gpu.js @@ -223,7 +223,25 @@ class GPU { gpu: this, validate, onRequestFallback: (args) => { - const fallbackKernel = new CPUKernel(source, mergedSettings); + const fallbackKernel = new CPUKernel(source, { + graphical: kernel.graphical, + loopMaxIterations: kernel.loopMaxIterations, + constants: kernel.constants, + dynamicOutput: kernel.dynamicOutput, + dynamicArgument: kernel.dynamicArguments, + output: kernel.output, + precision: kernel.precision, + pipeline: kernel.pipeline, + immutable: kernel.immutable, + optimizeFloatMemory: kernel.optimizeFloatMemory, + fixIntegerDivisionAccuracy: kernel.fixIntegerDivisionAccuracy, + functions: kernel.functions, + nativeFunctions: kernel.nativeFunctions, + subKernels: kernel.subKernels, + strictIntegers: kernel.strictIntegers, + debug: kernel.debug, + warnVarUsage: kernel.warnVarUsage, + }); fallbackKernel.build.apply(fallbackKernel, args); const result = fallbackKernel.run.apply(fallbackKernel, args); kernel.replaceKernel(fallbackKernel); @@ -246,7 +264,10 @@ class GPU { } const newKernel = switchableKernels[signature] = new this.Kernel(source, { graphical: kernel.graphical, + loopMaxIterations: kernel.loopMaxIterations, constants: kernel.constants, + dynamicOutput: kernel.dynamicOutput, + dynamicArgument: kernel.dynamicArguments, context: kernel.context, canvas: kernel.canvas, output: kernel.output, @@ -262,6 +283,7 @@ class GPU { debug: kernel.debug, gpu: this, validate, + warnVarUsage: kernel.warnVarUsage, }); newKernel.build.apply(newKernel, args); newKernel.run.apply(newKernel, args); diff --git a/src/index.d.ts b/src/index.d.ts index 61bd43b7..ef62b30f 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -83,6 +83,7 @@ export abstract class Kernel { static nativeFunctionReturnType(source: string): string; static destroyContext(context: any): void; static features: IKernelFeatures; + static getFeatures(): IKernelFeatures; source: string | object; Kernel: Kernel; output: number[]; @@ -169,6 +170,7 @@ export abstract class Kernel { ): string; toJSON(): object; setOutput(flag: number[]): this; + setWarnVarUsage(flag: boolean): this; setOptimizeFloatMemory(flag: boolean): this; setArgumentTypes(flag: any): this; setDebug(flag: boolean): this; @@ -197,10 +199,10 @@ export class GLKernel extends Kernel { export class WebGLKernel extends GLKernel { } -export class WebGL2Kernel extends GLKernel { +export class WebGL2Kernel extends WebGLKernel { } -export class HeadlessGLKernel extends GLKernel { +export class HeadlessGLKernel extends WebGLKernel { } diff --git a/test/all.html b/test/all.html index f0505aab..55f4c454 100644 --- a/test/all.html +++ b/test/all.html @@ -159,6 +159,7 @@ + @@ -273,5 +274,6 @@ + diff --git a/test/features/constants-image-array.js b/test/features/constants-image-array.js index efd533cc..f286916b 100644 --- a/test/features/constants-image-array.js +++ b/test/features/constants-image-array.js @@ -34,7 +34,7 @@ function feature(mode, done) { gpu.createKernel(fn, settings)(); } - image.src = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABbAIoDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqK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f2pSm4pS6m0G9Gt+p//2Q=='; + image.src = 'jellyfish-1.jpeg'; image.onload = () => { settings[0] = image.width; settings[1] = image.height; diff --git a/test/features/constants-image.js b/test/features/constants-image.js index f270bbbb..ae70389c 100644 --- a/test/features/constants-image.js +++ b/test/features/constants-image.js @@ -5,7 +5,7 @@ describe('features: constants image'); function imageConstantTest(mode, done) { const gpu = new GPU({ mode }); const image = new Image(); - image.src = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABbAIoDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRA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XzCrBeylhzjOBVU1Byvs+na5rh40nJuTs7adrmgkuiW/7mPy1+bDxqpYkHvjB74psWtLFO26KSW328MyZdPw5LD9frVhYrN7RGWw2pt3Iy4baRzkHr9akNnBLI+37/de49x6/wA/rUc0Nea7MZNdE/mWSIru0intLhZEZhsZW3D069vQj3NaCSRuit5mMgHBcAj8O1chPb32j3bzWn325kj/AIJhjrjs3vV3+3NGk+eS3cSNyw9+9TPDSaThqvIajfWJqbqN1V91Lupcpxk2+mFqZmkJppAPzS7qizRmnYRIdr/K1AC+XtX5VqPNKDRYdxQv7xFX+4fvc9SP8DTsyp/DuT9R9PWmj/WbvoPyz/jUgNJjuPR9/wAy0/G/71Q7f4l+V/5/WpFl/hb5W/Q/Q1D8hj1h2f6v/vlun/1qrta7N7W/7p2Uh7duEf6H+E+4/EVcBp/3/lao5mjSLsc9pVxPdR3vk/K0bMGsmwAO3GehOCeuOfrWnDLFcbJFVliZTjdwUx1Xg5GPQ+/pWbqGns2oytC7xy7VeOTqVIHIyTypGePUdQcUmm3Uj3UsckTLKu57iPkkdBuHqcncD1IK9xW00pJzidkoKcXKHT8P815/f3NO5gk8t9v71dvCt1UnsD3z1H/165d7iNXZcKMHGGBz+NdbA2/zVb+HCv8ATkg/1+lYE5fz5N1pEzbjklevNVh52umRSV2y+Gpd1QrThWnKeeS5pM0ykNTYCTdSbqjpafKBJmlBqOlFKwEwNOBqEVIKmwEympAN/wArVCtSCs2UhwLRf7UX5lf8RVlTUK0ltwJVHRTwPTgGoaNER3yr5luzfKrN5b+2eVP/AH0B+dZ0nlJrtr527zZEeEMvthlP5bgfcVpX6hrJlIyPMTj/AIEKxNTZm1OzBJI+XjPq65rSlHm09TqoPX1Vvv2/EtCT+ytZSOT5re4XyQ3XZjkZz2+bH+cVbksJGldlkwCxIFV9SUSW8e4Z4iP6mr8Mj+TH87fdHf2pSm4pS6m0G9Gt+p//2Q=='; + image.src = 'jellyfish-1.jpeg'; image.onload = function() { const width = image.width; const height = image.height; diff --git a/test/features/dynamic-arguments.js b/test/features/dynamic-arguments.js new file mode 100644 index 00000000..afe1555f --- /dev/null +++ b/test/features/dynamic-arguments.js @@ -0,0 +1,602 @@ +const { assert, skip, test, module: describe, only } = require('qunit'); +const { GPU, input } = require('../../src'); + +describe('features: dynamic arguments'); + +function testHTMLImage(done, mode) { + const image1 = new Image(); + const image2 = new Image(); + image1.src = 'jellyfish.jpeg'; + image2.src = 'jellyfish-1.jpeg'; + let loadedCount = 0; + image1.onload = image2.onload = () => { + loadedCount++; + if (loadedCount === 2) loaded(); + }; + + function loaded() { + const gpu = new GPU({ mode }); + const kernel = gpu.createKernel(function(image) { + const pixel = image[this.thread.y][this.thread.x]; + return (pixel[0] + pixel[1] + pixel[2]) / 3; + }) + .setDynamicArguments(true) + .setDynamicOutput(true) + .setOutput([276, 183]); + + const pixels1 = kernel(image1); + kernel.setOutput([138, 91]); + const pixels2 = kernel(image2); + + assert.ok(pixels1[0][0] > .43); + assert.ok(pixels1[0][0] < .45); + assert.equal(pixels1.length, image1.height); + assert.equal(pixels1[0].length, image1.width); + assert.ok(pixels2[0][0] > .82); + assert.ok(pixels2[0][0] < .83); + assert.equal(pixels2.length, image2.height); + assert.equal(pixels2[0].length, image2.width); + + gpu.destroy(); + done(); + } +} + +(typeof Image !== 'undefined' ? test : skip)('HTML Image auto', t => { + testHTMLImage(t.async()); +}); + +(typeof Image !== 'undefined' && GPU.isWebGLSupported ? test : skip)('HTML Image webgl', t => { + testHTMLImage(t.async(), 'webgl'); +}); + +(typeof Image !== 'undefined' && GPU.isWebGL2Supported ? test : skip)('HTML Image webgl2', t => { + testHTMLImage(t.async(), 'webgl2'); +}); + +(typeof Image !== 'undefined' ? test : skip)('HTML Image cpu', t => { + testHTMLImage(t.async(), 'cpu'); +}); + +function testMemoryOptimizedNumberTexture(mode) { + const gpu = new GPU({ mode }); + const matrix4X4 = [ + [1,2,3,4], + [5,6,7,8], + [9,10,11,12], + [13,14,15,16], + ]; + const texture4X4 = ( + gpu.createKernel(function(value) { + return value[this.thread.y][this.thread.x]; + }) + .setOutput([4, 4]) + .setPrecision('single') + .setOptimizeFloatMemory(true) + .setPipeline(true) + )(matrix4X4); + + const matrix3X3 = [ + [1,2,3], + [4,5,6], + [7,8,9] + ]; + const texture3X3 = ( + gpu.createKernel(function(value) { + return value[this.thread.y][this.thread.x]; + }) + .setOutput([3, 3]) + .setPrecision('single') + .setOptimizeFloatMemory(true) + .setPipeline(true) + )(matrix3X3); + + const matrix2X2 = [ + [1,2], + [3,4] + ]; + const texture2X2 = ( + gpu.createKernel(function(value) { + return value[this.thread.y][this.thread.x]; + }) + .setOutput([2, 2]) + .setPrecision('single') + .setOptimizeFloatMemory(true) + .setPipeline(true) + )(matrix2X2); + + const kernel = gpu.createKernel(function(texture) { + return texture[this.thread.y][this.thread.x]; + }) + .setDynamicArguments(true) + .setDynamicOutput(true) + .setOutput([4,4]); + + assert.deepEqual(kernel(texture4X4), [ + new Float32Array([1,2,3,4]), + new Float32Array([5,6,7,8]), + new Float32Array([9,10,11,12]), + new Float32Array([13,14,15,16]), + ]); + + kernel.setOutput([3, 3]); + assert.deepEqual(kernel(texture3X3), [ + new Float32Array([1,2,3]), + new Float32Array([4,5,6]), + new Float32Array([7,8,9]), + ]); + + kernel.setOutput([2, 2]); + assert.deepEqual(kernel(texture2X2), [ + new Float32Array([1,2]), + new Float32Array([3,4]), + ]); + + assert.ok(kernel.kernelArguments[0].constructor.name.match('DynamicMemoryOptimizedNumberTexture')); + + gpu.destroy(); +} + +(GPU.isSinglePrecisionSupported ? test : skip)('MemoryOptimizedNumberTexture (GPU only) auto', () => { + testMemoryOptimizedNumberTexture(); +}); + +(GPU.isSinglePrecisionSupported ? test : skip)('MemoryOptimizedNumberTexture (GPU only) gpu', () => { + testMemoryOptimizedNumberTexture('gpu'); +}); + +(GPU.isSinglePrecisionSupported && GPU.isWebGLSupported ? test : skip)('MemoryOptimizedNumberTexture (GPU only) webgl', () => { + testMemoryOptimizedNumberTexture('webgl'); +}); + +(GPU.isSinglePrecisionSupported && GPU.isWebGL2Supported ? test : skip)('MemoryOptimizedNumberTexture (GPU only) webgl2', () => { + testMemoryOptimizedNumberTexture('webgl2'); +}); + +(GPU.isSinglePrecisionSupported && GPU.isHeadlessGLSupported ? test : skip)('MemoryOptimizedNumberTexture (GPU only) headlessgl', () => { + testMemoryOptimizedNumberTexture('headlessgl'); +}); + +function testNumberTexture(mode) { + const gpu = new GPU({ mode }); + const matrix4X4 = [ + [1,2,3,4], + [5,6,7,8], + [9,10,11,12], + [13,14,15,16], + ]; + const texture4X4 = ( + gpu.createKernel(function(value) { + return value[this.thread.y][this.thread.x]; + }) + .setOutput([4, 4]) + .setPrecision('single') + .setOptimizeFloatMemory(true) + .setPipeline(true) + )(matrix4X4); + + const matrix3X3 = [ + [1,2,3], + [4,5,6], + [7,8,9] + ]; + const texture3X3 = ( + gpu.createKernel(function(value) { + return value[this.thread.y][this.thread.x]; + }) + .setOutput([3, 3]) + .setPrecision('single') + .setOptimizeFloatMemory(true) + .setPipeline(true) + )(matrix3X3); + + const matrix2X2 = [ + [1,2], + [3,4] + ]; + const texture2X2 = ( + gpu.createKernel(function(value) { + return value[this.thread.y][this.thread.x]; + }) + .setOutput([2, 2]) + .setPrecision('single') + .setPipeline(true) + )(matrix2X2); + + const kernel = gpu.createKernel(function(texture) { + return texture[this.thread.y][this.thread.x]; + }) + .setDynamicArguments(true) + .setDynamicOutput(true) + .setOutput([4,4]); + + assert.deepEqual(kernel(texture4X4), [ + new Float32Array([1,2,3,4]), + new Float32Array([5,6,7,8]), + new Float32Array([9,10,11,12]), + new Float32Array([13,14,15,16]), + ]); + + kernel.setOutput([3, 3]); + assert.deepEqual(kernel(texture3X3), [ + new Float32Array([1,2,3]), + new Float32Array([4,5,6]), + new Float32Array([7,8,9]), + ]); + + kernel.setOutput([2, 2]); + assert.deepEqual(kernel(texture2X2), [ + new Float32Array([1,2]), + new Float32Array([3,4]), + ]); + + assert.ok(kernel.kernelArguments[0].constructor.name.match('NumberTexture')); + + gpu.destroy(); +} + +(GPU.isSinglePrecisionSupported ? test : skip)('NumberTexture (GPU only) auto', () => { + testNumberTexture(); +}); + +(GPU.isSinglePrecisionSupported ? test : skip)('NumberTexture (GPU only) gpu', () => { + testNumberTexture('gpu'); +}); + +(GPU.isSinglePrecisionSupported && GPU.isWebGLSupported ? test : skip)('NumberTexture (GPU only) webgl', () => { + testNumberTexture('webgl'); +}); + +(GPU.isSinglePrecisionSupported && GPU.isWebGL2Supported ? test : skip)('NumberTexture (GPU only) webgl2', () => { + testNumberTexture('webgl2'); +}); + +(GPU.isSinglePrecisionSupported && GPU.isHeadlessGLSupported ? test : skip)('NumberTexture (GPU only) headlessgl', () => { + testNumberTexture('headlessgl'); +}); + +function testUnsignedPrecisionArray(mode) { + const gpu = new GPU({ mode }); + const kernel = gpu.createKernel(function(input) { + return input[this.thread.x]; + }) + .setPrecision('unsigned') + .setDynamicArguments(true) + .setDynamicOutput(true) + .setOutput([5]); + + assert.deepEqual(kernel([1,2,3,4,5]), new Float32Array([1,2,3,4,5])); + kernel.setOutput([4]); + assert.deepEqual(kernel([1,2,3,4]), new Float32Array([1,2,3,4])); + kernel.setOutput([3]); + assert.deepEqual(kernel([1,2,3]), new Float32Array([1,2,3])); + kernel.setOutput([2]); + assert.deepEqual(kernel([1,2]), new Float32Array([1,2])); + gpu.destroy(); +} + +test('unsigned precision Array auto', () => { + testUnsignedPrecisionArray(); +}); + +test('unsigned precision Array gpu', () => { + testUnsignedPrecisionArray('gpu'); +}); + +(GPU.isWebGLSupported ? test : skip)('unsigned precision Array webgl', () => { + testUnsignedPrecisionArray('webgl'); +}); + +(GPU.isWebGL2Supported ? test : skip)('unsigned precision Array webgl2', () => { + testUnsignedPrecisionArray('webgl2'); +}); + +(GPU.isHeadlessGLSupported ? test : skip)('unsigned precision Array headlessgl', () => { + testUnsignedPrecisionArray('headlessgl'); +}); + +test('unsigned precision Array cpu', () => { + testUnsignedPrecisionArray('cpu'); +}); + +function testSinglePrecisionArray(mode) { + const gpu = new GPU({ mode }); + const kernel = gpu.createKernel(function(input) { + return input[this.thread.x]; + }) + .setPrecision('single') + .setDynamicArguments(true) + .setDynamicOutput(true) + .setOutput([5]); + + assert.deepEqual(kernel([1,2,3,4,5]), new Float32Array([1,2,3,4,5])); + kernel.setOutput([4]); + assert.deepEqual(kernel([1,2,3,4]), new Float32Array([1,2,3,4])); + kernel.setOutput([3]); + assert.deepEqual(kernel([1,2,3]), new Float32Array([1,2,3])); + kernel.setOutput([2]); + assert.deepEqual(kernel([1,2]), new Float32Array([1,2])); + gpu.destroy(); +} + +(GPU.isSinglePrecisionSupported ? test : skip)('single precision Array auto', () => { + testSinglePrecisionArray(); +}); + +(GPU.isSinglePrecisionSupported ? test : skip)('single precision Array gpu', () => { + testSinglePrecisionArray('gpu'); +}); + +(GPU.isSinglePrecisionSupported && GPU.isWebGLSupported ? test : skip)('single precision Array webgl', () => { + testSinglePrecisionArray('webgl'); +}); + +(GPU.isSinglePrecisionSupported && GPU.isWebGL2Supported ? test : skip)('single precision Array webgl2', () => { + testSinglePrecisionArray('webgl2'); +}); + +(GPU.isSinglePrecisionSupported && GPU.isHeadlessGLSupported ? test : skip)('single precision Array headlessgl', () => { + testSinglePrecisionArray('headlessgl'); +}); + +test('single precision Array cpu', () => { + testSinglePrecisionArray('cpu'); +}); + +function testUnsignedPrecisionMatrix(mode) { + const gpu = new GPU({ mode }); + const kernel = gpu.createKernel(function(input) { + return input[this.thread.y][this.thread.x]; + }) + .setPrecision('unsigned') + .setDynamicArguments(true) + .setDynamicOutput(true) + .setOutput([4,4]); + + let matrix = [ + [1,2,3,4], + [5,6,7,8], + [9,10,11,12], + [13,14,15,16] + ]; + assert.deepEqual(kernel(matrix), matrix.map(row => new Float32Array(row))); + + kernel.setOutput([3,3]); + matrix = [ + [1,2,3], + [4,5,6], + [7,8,9] + ]; + assert.deepEqual(kernel(matrix), matrix.map(row => new Float32Array(row))); + + kernel.setOutput([2,2]); + matrix = [ + [1,2], + [3,4] + ]; + assert.deepEqual(kernel(matrix), matrix.map(row => new Float32Array(row))); + gpu.destroy(); +} + +test('unsigned precision Matrix auto', () => { + testUnsignedPrecisionMatrix(); +}); + +test('unsigned precision Matrix gpu', () => { + testUnsignedPrecisionMatrix('gpu'); +}); + +(GPU.isWebGLSupported ? test : skip)('unsigned precision Matrix webgl', () => { + testUnsignedPrecisionMatrix('webgl'); +}); + +(GPU.isWebGL2Supported ? test : skip)('unsigned precision Matrix webgl2', () => { + testUnsignedPrecisionMatrix('webgl2'); +}); + +(GPU.isHeadlessGLSupported ? test : skip)('unsigned precision Matrix headlessgl', () => { + testUnsignedPrecisionMatrix('headlessgl'); +}); + +test('unsigned precision Matrix cpu', () => { + testUnsignedPrecisionMatrix('cpu'); +}); + +function testSinglePrecisionMatrix(mode) { + const gpu = new GPU({ mode }); + const kernel = gpu.createKernel(function(input) { + return input[this.thread.y][this.thread.x]; + }) + .setDynamicArguments(true) + .setDynamicOutput(true) + .setOutput([4,4]); + + let matrix = [ + [1,2,3,4], + [5,6,7,8], + [9,10,11,12], + [13,14,15,16] + ]; + assert.deepEqual(kernel(matrix), matrix.map(row => new Float32Array(row))); + + kernel.setOutput([3,3]); + matrix = [ + [1,2,3], + [4,5,6], + [7,8,9] + ]; + assert.deepEqual(kernel(matrix), matrix.map(row => new Float32Array(row))); + + kernel.setOutput([2,2]); + matrix = [ + [1,2], + [3,4] + ]; + assert.deepEqual(kernel(matrix), matrix.map(row => new Float32Array(row))); + gpu.destroy(); +} + +(GPU.isSinglePrecisionSupported ? test : skip)('single precision Matrix auto', () => { + testSinglePrecisionMatrix(); +}); + +(GPU.isSinglePrecisionSupported ? test : skip)('single precision Matrix gpu', () => { + testSinglePrecisionMatrix('gpu'); +}); + +(GPU.isSinglePrecisionSupported && GPU.isWebGLSupported ? test : skip)('single precision Matrix webgl', () => { + testSinglePrecisionMatrix('webgl'); +}); + +(GPU.isSinglePrecisionSupported && GPU.isWebGL2Supported ? test : skip)('single precision Matrix webgl2', () => { + testSinglePrecisionMatrix('webgl2'); +}); + +(GPU.isSinglePrecisionSupported && GPU.isHeadlessGLSupported ? test : skip)('single precision Matrix headlessgl', () => { + testSinglePrecisionMatrix('headlessgl'); +}); + +test('single precision Matrix cpu', () => { + testSinglePrecisionMatrix('cpu'); +}); + +function testUnsignedPrecisionInputMatrix(mode) { + const gpu = new GPU({ mode }); + const kernel = gpu.createKernel(function(input) { + return input[this.thread.y][this.thread.x]; + }) + .setPrecision('unsigned') + .setDynamicArguments(true) + .setDynamicOutput(true) + .setOutput([4,4]); + + let matrix = input([ + 1,2,3,4, + 5,6,7,8, + 9,10,11,12, + 13,14,15,16 + ], [4, 4]); + assert.deepEqual(kernel(matrix), [ + new Float32Array([1,2,3,4]), + new Float32Array([5,6,7,8]), + new Float32Array([9,10,11,12]), + new Float32Array([13,14,15,16]), + ]); + + kernel.setOutput([3,3]); + matrix = input([ + 1,2,3, + 4,5,6, + 7,8,9 + ], [3,3]); + assert.deepEqual(kernel(matrix), [ + new Float32Array([1,2,3]), + new Float32Array([4,5,6]), + new Float32Array([7,8,9]) + ]); + + kernel.setOutput([2,2]); + matrix = input([ + 1,2, + 3,4 + ], [2,2]); + assert.deepEqual(kernel(matrix), [ + new Float32Array([1,2]), + new Float32Array([3,4]) + ]); + gpu.destroy(); +} + +test('unsigned precision Input Matrix auto', () => { + testUnsignedPrecisionInputMatrix(); +}); + +test('unsigned precision Input Matrix gpu', () => { + testUnsignedPrecisionInputMatrix('gpu'); +}); + +(GPU.isWebGLSupported ? test : skip)('unsigned precision Input Matrix webgl', () => { + testUnsignedPrecisionInputMatrix('webgl'); +}); + +(GPU.isWebGL2Supported ? test : skip)('unsigned precision Input Matrix webgl2', () => { + testUnsignedPrecisionInputMatrix('webgl2'); +}); + +(GPU.isHeadlessGLSupported ? test : skip)('unsigned precision Input Matrix headlessgl', () => { + testUnsignedPrecisionInputMatrix('headlessgl'); +}); + +test('unsigned precision Input Matrix cpu', () => { + testUnsignedPrecisionInputMatrix('cpu'); +}); + +function testSinglePrecisionInputMatrix(mode) { + const gpu = new GPU({ mode }); + const kernel = gpu.createKernel(function(input) { + return input[this.thread.y][this.thread.x]; + }) + .setDynamicArguments(true) + .setDynamicOutput(true) + .setOutput([4,4]); + + let matrix = input([ + 1,2,3,4, + 5,6,7,8, + 9,10,11,12, + 13,14,15,16 + ], [4, 4]); + assert.deepEqual(kernel(matrix), [ + new Float32Array([1,2,3,4]), + new Float32Array([5,6,7,8]), + new Float32Array([9,10,11,12]), + new Float32Array([13,14,15,16]) + ]); + + kernel.setOutput([3,3]); + matrix = input([ + 1,2,3, + 4,5,6, + 7,8,9 + ], [3, 3]); + assert.deepEqual(kernel(matrix), [ + new Float32Array([1,2,3]), + new Float32Array([4,5,6]), + new Float32Array([7,8,9]) + ]); + + kernel.setOutput([2,2]); + matrix = input([ + 1,2, + 3,4 + ], [2,2]); + assert.deepEqual(kernel(matrix), [ + new Float32Array([1,2]), + new Float32Array([3,4]) + ]); + gpu.destroy(); +} + +(GPU.isSinglePrecisionSupported ? test : skip)('single precision Input Matrix auto', () => { + testSinglePrecisionInputMatrix(); +}); + +(GPU.isSinglePrecisionSupported ? test : skip)('single precision Input Matrix gpu', () => { + testSinglePrecisionInputMatrix('gpu'); +}); + +(GPU.isSinglePrecisionSupported && GPU.isWebGLSupported ? test : skip)('single precision Input Matrix webgl', () => { + testSinglePrecisionInputMatrix('webgl'); +}); + +(GPU.isSinglePrecisionSupported && GPU.isWebGL2Supported ? test : skip)('single precision Input Matrix webgl2', () => { + testSinglePrecisionInputMatrix('webgl2'); +}); + +(GPU.isSinglePrecisionSupported && GPU.isHeadlessGLSupported ? test : skip)('single precision Input Matrix headlessgl', () => { + testSinglePrecisionInputMatrix('headlessgl'); +}); + +test('single precision Input Matrix cpu', () => { + testSinglePrecisionInputMatrix('cpu'); +}); diff --git a/test/features/to-string/precision/single/arguments/html-image-array.js b/test/features/to-string/precision/single/arguments/html-image-array.js index eb042da3..29197d9b 100644 --- a/test/features/to-string/precision/single/arguments/html-image-array.js +++ b/test/features/to-string/precision/single/arguments/html-image-array.js @@ -5,10 +5,10 @@ describe('feature: to-string single precision arguments HTMLImageArray'); function testArgument(mode, done) { const imageSources = [ - 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABbAIoDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDtjB/vL/wHP8qUBk//AGv8anjEr/7L/wC1z/hUhib+Lb/wHj+dfQOfc893WjK/+8u3/a6f5/OkU7Plb7nZun4Yqx5TJ93/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mcUnmUuQZZ8yk8yq++ml+aagBYL0nmVWaSm+YapQIuavmUhkqt5lMMtZchsWjJ70wye9VjJTTJVqAiwZPeo2k96rmSmGSqUBMnZ6jL1C0nFMMlaKBLZMXpu+oC9NL8VagS2WfMo8yqvmUoejkFct+ZRvqrvo8yjkKuWt9NL1X300yUKAXJzJTfMqu0nNM8z3q1AycjTMlNMnvVfJ9aTJ9ajlRvcn8zmkMlV8nPWkJPrT5RNkxkphlqBic9aYSfWrUCHImMlMMlQkn1qNic9atRRm5k5k96aZarkn1ppJ9atQM3ULHm0ol96pkn1pyk+tHIJVC4JPel82quTjrRk0uVFqZZMtMMtQEn1qMk+tNQIlUJ2lpnmmoCTnrTc1ooHPKo2z/9k=' + 'jellyfish-1.jpeg', + 'jellyfish-2.jpeg', + 'jellyfish-3.jpeg', + 'jellyfish-4.jpeg', ]; let loaded = 0; const images = imageSources.map(imageSource => { diff --git a/test/features/to-string/precision/single/arguments/html-image.js b/test/features/to-string/precision/single/arguments/html-image.js index e6801a0f..07d77c65 100644 --- a/test/features/to-string/precision/single/arguments/html-image.js +++ b/test/features/to-string/precision/single/arguments/html-image.js @@ -5,7 +5,7 @@ describe('feature: to-string single precision arguments HTMLImage'); function testArgument(mode, done) { const image = new Image(); - image.src = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxAQEhUPDxIVFRUVFRAPEBUVFRUPFRAVFRUWFhUVFRUYHSggGBolHRUVITEhJSkrLi4uFx8zODMtNygtLisBCgoKDg0OFxAQGi0lHSUtLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0vLf/AABEIALcBFAMBEQACEQEDEQH/xAAbAAADAQEBAQEAAAAAAAAAAAABAgMABAUGB//EADgQAAIBAgMGBAQFAwUBAQAAAAECAAMREiExBBNBUWFxBSKBkTKhsdEGQsHh8FJikhQjM3LxwhX/xAAbAQEBAQEBAQEBAAAAAAAAAAABAAI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swqSokw7yFDYccqGzbyVE2KakaByEapFIw5EzVmtJyctzzw09NHnGxwobGDw0jqGFSZ0mtQ4qzOk0sg+8hRvUMKkKNKTHFSGk1qGFSGk0mMKkKGxhUhQ2MHhQ2OHmaGxhUlpGwipCiDvIUVh3ktI2HeS0kDeSorFNSNFYDUlQWI1Sa0g2IakdJlsQ1JqjLkI1SNGHIQ1I0ZchTUmtJlzFNSWkNZhVlpHWOKkKN6jbyVEpGNSWknMQ1I6Tm5iNUmlE5ynYhea0mLP/Z'; + image.src = 'jellyfish.jpeg'; image.onload = () => { const gpu = new GPU({mode}); const originalKernel = gpu.createKernel(function (a) { diff --git a/test/features/to-string/precision/single/constants/html-image-array.js b/test/features/to-string/precision/single/constants/html-image-array.js index 58ce938f..706acd90 100644 --- a/test/features/to-string/precision/single/constants/html-image-array.js +++ b/test/features/to-string/precision/single/constants/html-image-array.js @@ -5,10 +5,10 @@ describe('feature: to-string single precision constants HTMLImageArray'); function testArgument(mode, done) { const imageSources = [ - 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABbAIoDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6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q6tZ6/gvJE7SVA8tRNL71A8laRpnK2Pkkquz80xpOetQu9dEYENkxems/FV95z1prSVooE3J99OD1TMlKH96fIFy5vpN9VvMo3+9HIO5OXpPMquZKb5lNQFctb6TeKreZRv8AenyBc6EyZxxjHpSGQVR873pDL71yezNLlxpKheWq5l96ieWrjTE2TtL71C0tQNLULS1tGmS2TtJUTSe9QNLURkraMCWyw0mKYZarmSmb6tQFcsmSgSVVL+9AkquQLlvzKXzKqiSl8z3pcg7lgyc0hkqsXpN9CgJss+ZR5nvVUyUnmGq5BGuZuOtJ5x9ap+ZSebWKpl3LZlPrTGl96rGT3phk96pQAnaWojJzUReomf3rRQE2TNJUZkqJpKiaStFAlk5kppfiq5kpDJV8gix5lAeq2+jzKfIBbD8UGSq3mcUnmUuQZZ8yk8yq++ml+aagBYL0nmVWaSm+YapQIuavmUhkqt5lMMtZchsWjJ70wye9VjJTTJVqAiwZPeo2k96rmSmGSqUBMnZ6jL1C0nFMMlaKBLZMXpu+oC9NL8VagS2WfMo8yqvmUoejkFct+ZRvqrvo8yjkKuWt9NL1X300yUKAXJzJTfMqu0nNM8z3q1AycjTMlNMnvVfJ9aTJ9ajlRvcn8zmkMlV8nPWkJPrT5RNkxkphlqBic9aYSfWrUCHImMlMMlQkn1qNic9atRRm5k5k96aZarkn1ppJ9atQM3ULHm0ol96pkn1pyk+tHIJVC4JPel82quTjrRk0uVFqZZMtMMtQEn1qMk+tNQIlUJ2lpnmmoCTnrTc1ooHPKo2z/9k=' + 'jellyfish-1.jpeg', + 'jellyfish-2.jpeg', + 'jellyfish-3.jpeg', + 'jellyfish-4.jpeg', ]; let loaded = 0; const images = imageSources.map(imageSource => { diff --git a/test/features/to-string/precision/single/constants/html-image.js b/test/features/to-string/precision/single/constants/html-image.js index 5d1f9384..8c14334b 100644 --- a/test/features/to-string/precision/single/constants/html-image.js +++ b/test/features/to-string/precision/single/constants/html-image.js @@ -5,7 +5,7 @@ describe('feature: to-string single precision constants HTMLImage'); function testArgument(m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WkgF40QDUlpIU1JqgENSOkhDUjpAm1SaSImXmkgELzVALjjRGxyorNjlRBDwoTY5URscqIBeNEKXjRliF40ZPPV56GjnY4eFGrGxwobCHhRWUDwo0MKkzQ2MHhRWMHhQ2OHhQhxwohhUhpIYVIUI6vCiKCpM0I28hpIO8lpIOOFEbHKiAakqEU1JqgFNSNEIakaIQ1IpAxC81QCF5qgELxoBccaCwY5URscqKw45UIccKE2OVFYC8aARnikZbELzVGbPNWrPS4nmUygqTNG9QwqQoVIYVJmjVlA8KN2EVIUVjCpCjSY4qQoUxhUhpGxscKKwipChsYPCiscVIUI4qTNCMKkNI2NvJaSMKkKIO8lpKxTUjpIU1I6SAXjRWIXjRkUvGiENSKRmyZeaSBsU1JqgsXeSozYN5GiswqSokw7yFDYccqGzbyVE2KakaByEapFIw5EzVmtJyctzzw09NHnGxwobGDw0jqGFSZ0mtQ4qzOk0sg+8hRvUMKkKNKTHFSGk1qGFSGk0mMKkKGxhUhQ2MHhQ2OHmaGxhUlpGwipCiDvIUVh3ktI2HeS0kDeSorFNSNFYDUlQWI1Sa0g2IakdJlsQ1JqjLkI1SNGHIQ1I0ZchTUmtJlzFNSWkNZhVlpHWOKkKN6jbyVEpGNSWknMQ1I6Tm5iNUmlE5ynYhea0mLP/Z'; + image.src = 'jellyfish.jpeg'; image.onload = () => { const gpu = new GPU({mode}); const originalKernel = gpu.createKernel(function (a) { diff --git a/test/features/to-string/precision/unsigned/arguments/html-image-array.js b/test/features/to-string/precision/unsigned/arguments/html-image-array.js index 4d2cc398..8085a695 100644 --- a/test/features/to-string/precision/unsigned/arguments/html-image-array.js +++ b/test/features/to-string/precision/unsigned/arguments/html-image-array.js @@ -5,10 +5,10 @@ describe('feature: to-string unsigned precision arguments HTMLImageArray'); function testArgument(mode, done) { const imageSources = [ - 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICI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8nPWkJPrT5RNkxkphlqBic9aYSfWrUCHImMlMMlQkn1qNic9atRRm5k5k96aZarkn1ppJ9atQM3ULHm0ol96pkn1pyk+tHIJVC4JPel82quTjrRk0uVFqZZMtMMtQEn1qMk+tNQIlUJ2lpnmmoCTnrTc1ooHPKo2z/9k=' + 'jellyfish-1.jpeg', + 'jellyfish-2.jpeg', + 'jellyfish-3.jpeg', + 'jellyfish-4.jpeg', ]; let loaded = 0; const images = imageSources.map(imageSource => { diff --git a/test/features/to-string/precision/unsigned/arguments/html-image.js b/test/features/to-string/precision/unsigned/arguments/html-image.js index 8a486482..649df0da 100644 --- a/test/features/to-string/precision/unsigned/arguments/html-image.js +++ b/test/features/to-string/precision/unsigned/arguments/html-image.js @@ -5,7 +5,7 @@ describe('feature: to-string unsigned precision arguments HTMLImage'); function testArgument(mode, done) { const image = new Image(); - image.src = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxAQEhUPDxIVFRUVFRAPEBUVFRUPFRAVFRUWFhUVFRUYHSggGBolHRUVITEhJSkrLi4uFx8zODMtNygtLisBCgoKDg0OFxAQGi0lHSUtLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0vLf/AABEIALcBFAMBEQACEQEDEQH/xAAbAAADAQEBAQEAAAAAAAAAAAABAgMABAUGB//EADgQAAIBAgMGBAQFAwUBAQAAAAECAAMREiExBBNBUWFxBSKBkTKhsdEGQsHh8FJikhQjM3LxwhX/xAAbAQEBAQEBAQEBAAAAAAAAAAABAAIDBAUGB//EADMRAAICAQIDBQgCAgIDAAAAAAABAhEDEiEEMUETUWFx8AUiMoGRobHB0eFS8RSSI0Jy/9oADAMBAAIRAxEAPwD7A0e49L/SfoNR4VIIBH/v3hsWw/cW66fz3gVdwFNsjpwOnpaXMXG9yuGZs5gKxshSsbABFo2Iva8hoPofr9JBQUscvlofaDJpo66NK85SlQFTs8xrEi9O02pWQVWTY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zFNSWkNZhVlpHWOKkKN6jbyVEpGNSWknMQ1I6Tm5iNUmlE5ynYhea0mLP/Z'; + image.src = 'jellyfish.jpeg'; image.onload = () => { const gpu = new GPU({mode}); const originalKernel = gpu.createKernel(function (a) { diff --git a/test/features/to-string/precision/unsigned/constants/html-image-array.js b/test/features/to-string/precision/unsigned/constants/html-image-array.js index 086d9fc2..db8a7309 100644 --- a/test/features/to-string/precision/unsigned/constants/html-image-array.js +++ b/test/features/to-string/precision/unsigned/constants/html-image-array.js @@ -5,10 +5,10 @@ describe('feature: to-string unsigned precision constants HTMLImageArray'); function testArgument(mode, done) { const imageSources = [ - 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABbAIoDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dX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9QNLURkraMCWyw0mKYZarmSmb6tQFcsmSgSVVL+9AkquQLlvzKXzKqiSl8z3pcg7lgyc0hkqsXpN9CgJss+ZR5nvVUyUnmGq5BGuZuOtJ5x9ap+ZSebWKpl3LZlPrTGl96rGT3phk96pQAnaWojJzUReomf3rRQE2TNJUZkqJpKiaStFAlk5kppfiq5kpDJV8gix5lAeq2+jzKfIBbD8UGSq3mcUnmUuQZZ8yk8yq++ml+aagBYL0nmVWaSm+YapQIuavmUhkqt5lMMtZchsWjJ70wye9VjJTTJVqAiwZPeo2k96rmSmGSqUBMnZ6jL1C0nFMMlaKBLZMXpu+oC9NL8VagS2WfMo8yqvmUoejkFct+ZRvqrvo8yjkKuWt9NL1X300yUKAXJzJTfMqu0nNM8z3q1AycjTMlNMnvVfJ9aTJ9ajlRvcn8zmkMlV8nPWkJPrT5RNkxkphlqBic9aYSfWrUCHImMlMMlQkn1qNic9atRRm5k5k96aZarkn1ppJ9atQM3ULHm0ol96pkn1pyk+tHIJVC4JPel82quTjrRk0uVFqZZMtMMtQEn1qMk+tNQIlUJ2lpnmmoCTnrTc1ooHPKo2z/9k=' + 'jellyfish-1.jpeg', + 'jellyfish-2.jpeg', + 'jellyfish-3.jpeg', + 'jellyfish-4.jpeg', ]; let loaded = 0; const images = imageSources.map(imageSource => { diff --git a/test/features/to-string/precision/unsigned/constants/html-image.js b/test/features/to-string/precision/unsigned/constants/html-image.js index a6f9b776..536117ef 100644 --- a/test/features/to-string/precision/unsigned/constants/html-image.js +++ b/test/features/to-string/precision/unsigned/constants/html-image.js @@ -5,7 +5,7 @@ describe('feature: to-string unsigned precision constants HTMLImage'); function testArgument(mode, done) { const image = new Image(); - image.src = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxAQEhUPDxIVFRUVFRAPEBUVFRUPFRAVFRUWFhUVFRUYHSggGBolHRUVITEhJSkrLi4uFx8zODMtNygtLisBCgoKDg0OFxAQGi0lHSUtLS0tLS0tLS0r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SNEIakaIQ1IpAxC81QCF5qgELxoBccaCwY5URscqKw45UIccKE2OVFYC8aARnikZbELzVGbPNWrPS4nmUygqTNG9QwqQoVIYVJmjVlA8KN2EVIUVjCpCjSY4qQoUxhUhpGxscKKwipChsYPCiscVIUI4qTNCMKkNI2NvJaSMKkKIO8lpKxTUjpIU1I6SAXjRWIXjRkUvGiENSKRmyZeaSBsU1JqgsXeSozYN5GiswqSokw7yFDYccqGzbyVE2KakaByEapFIw5EzVmtJyctzzw09NHnGxwobGDw0jqGFSZ0mtQ4qzOk0sg+8hRvUMKkKNKTHFSGk1qGFSGk0mMKkKGxhUhQ2MHhQ2OHmaGxhUlpGwipCiDvIUVh3ktI2HeS0kDeSorFNSNFYDUlQWI1Sa0g2IakdJlsQ1JqjLkI1SNGHIQ1I0ZchTUmtJlzFNSWkNZhVlpHWOKkKN6jbyVEpGNSWknMQ1I6Tm5iNUmlE5ynYhea0mLP/Z'; + image.src = 'jellyfish.jpeg'; image.onload = () => { const gpu = new GPU({mode}); const originalKernel = gpu.createKernel(function (a) { diff --git a/test/internal/backend/cpu/function-node.js b/test/internal/backend/cpu/function-node.js index 55b3a75f..5fe47d99 100644 --- a/test/internal/backend/cpu/function-node.js +++ b/test/internal/backend/cpu/function-node.js @@ -1,4 +1,5 @@ const { assert, skip, test, module: describe, only } = require('qunit'); +const sinon = require('sinon'); const { CPUFunctionNode } = require('../../../../src'); describe('internal: CPUFunctionNode'); @@ -10,12 +11,22 @@ test('should call warn when using var is used in source', () => { argumentTypes: [], name: 'kernel', }); - let called = false; - node.varWarn = () => { - called = true; - }; + node.varWarn = sinon.spy(); node.toString(); - assert.ok(called); + assert.equal(node.varWarn.callCount, 1); +}); + +test('should not call warn when using var is used in source and warnVarUsage is false', () => { + const node = new CPUFunctionNode(`function() { var v = 1; return v; }`, { + output: [1], + precision: 'unsigned', + argumentTypes: [], + name: 'kernel', + warnVarUsage: false, + }); + node.varWarn = sinon.spy(); + node.toString(); + assert.equal(node.varWarn.callCount, 0); }); test('should not call warn when using const or let is used in source', () => { @@ -25,10 +36,7 @@ test('should not call warn when using const or let is used in source', () => { argumentTypes: [], name: 'kernel', }); - let called = false; - node.varWarn = () => { - called = true; - }; + node.varWarn = node.varWarn = sinon.spy(); node.toString(); - assert.notOk(called); + assert.equal(node.varWarn.callCount, 0); }); diff --git a/test/internal/backend/web-gl/function-node/index.js b/test/internal/backend/web-gl/function-node/index.js index 6b2174bf..dc6f1e48 100644 --- a/test/internal/backend/web-gl/function-node/index.js +++ b/test/internal/backend/web-gl/function-node/index.js @@ -1,4 +1,5 @@ const { assert, skip, test, module: describe, only } = require('qunit'); +const sinon = require('sinon'); const { WebGLFunctionNode } = require('../../../../../src'); describe('internal: WebGLFunctionNode'); @@ -10,12 +11,22 @@ test('should call warn when using var is used in source', () => { argumentTypes: [], name: 'kernel', }); - let called = false; - node.varWarn = () => { - called = true; - }; + node.varWarn = sinon.spy(); node.toString(); - assert.ok(called); + assert.equal(node.varWarn.callCount, 1); +}); + +test('should not call warn when using var is used in source and warnVarUsage is false', () => { + const node = new WebGLFunctionNode(`function() { var v = 1; return v; }`, { + output: [1], + precision: 'unsigned', + argumentTypes: [], + name: 'kernel', + warnVarUsage: false, + }); + node.varWarn = sinon.spy(); + node.toString(); + assert.equal(node.varWarn.callCount, 0); }); test('should not call warn when using const or let is used in source', () => { @@ -25,10 +36,7 @@ test('should not call warn when using const or let is used in source', () => { argumentTypes: [], name: 'kernel', }); - let called = false; - node.varWarn = () => { - called = true; - }; + node.varWarn = sinon.spy(); node.toString(); - assert.notOk(called); + assert.equal(node.varWarn.callCount, 0); }); diff --git a/test/issues/487-dynamic-arguments.js b/test/issues/487-dynamic-arguments.js new file mode 100644 index 00000000..3c68bb72 --- /dev/null +++ b/test/issues/487-dynamic-arguments.js @@ -0,0 +1,59 @@ +const { assert, skip, test, module: describe } = require('qunit'); +const { GPU } = require('../../src'); + +describe('issue #487 - pipeline dynamic arguments'); + +function testPipelineDynamicArguments(mode) { + const gpu = new GPU({mode: mode}); + + const kernel = gpu.createKernel(function (w) { + return this.thread.x + this.thread.y * w; + }) + .setPipeline(true) + .setDynamicOutput(true); + + const sumRow = gpu.createKernel(function (texture, w) { + let sum = 0; + for (let i = 0; i < w; i++) + sum = sum + texture[this.thread.x][i]; + return sum; + }) + .setDynamicArguments(true) + .setDynamicOutput(true); + + function doAThing(w, h) { + kernel.setOutput([w, h]); + let intermediate = kernel(w); + const array = intermediate.toArray(); + assert.equal(array.length, h); + assert.equal(array[0].length, w); + sumRow.setOutput([h]); + const result = sumRow(intermediate, w); + assert.equal(result.length, h); + assert.equal(result[0].length, undefined); + } + + doAThing(10, 5); + doAThing(3, 2); + gpu.destroy(); +} + +test('(GPU only) auto', () => { + testPipelineDynamicArguments(); +}); + +test('(GPU only) gpu', () => { + testPipelineDynamicArguments('gpu'); +}); + +(GPU.isWebGLSupported ? test : skip)('(GPU only) webgl', () => { + testPipelineDynamicArguments('webgl'); +}); + +(GPU.isWebGL2Supported ? test : skip)('(GPU only) webgl2', () => { + testPipelineDynamicArguments('webgl2'); +}); + +(GPU.isHeadlessGLSupported ? test : skip)('(GPU only) headlessgl', () => { + testPipelineDynamicArguments('headlessgl'); +}); diff --git a/test/jellyfish-1.jpeg b/test/jellyfish-1.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..3797dc2b0f1894e09a2c6ea829c9eab0f163cb03 GIT binary patch literal 3004 zcmbW%c{tST9suy)7>q$VvXm_ql09P?Ddq@~PEBFPGM1yFP-GV|r#i=)#+qwOjx0mS zI+iktLyab3hU}H?S_fkcX8B#6bDw*k=l*r?{l3rp{_}p{_jy0x_j$hHXYdQ~gWb9F z=KzQR06_Kz0FD8cfQYa#Ojt++27|%jBBJ8b`^3e>#N`f1Nk}WnD<4*pS5!Qrs;hqF zn6`?d;t8aN_DOw1LqlctQ)VWJGr9(bi0_v`;BdIOnE0W6`wk(FDjr4r&jG#xBt-xm zkOYMs0|X=?P)P{b1t{;mQwZ{B0RIe#08~&&7$y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#(Bt>gFnyWw9& z;bY%%n^$Gp_)Nv<`Jse#^|YeVDlRT3aft?br+#LBvMekO1VT79ui!pzaeLi{6Qi+E zYQfH%^XU#RztTh6S+X%*?D>#RPc-|jr0cNTmZ!RBTfTDnsTZBkdIQySyrY>bM=aH$ za_Ch&S7;KN}@hA{LRoNIC&9&)gxJ&Iku}xYX&{)xxwenGr!`<0j8v8^DafPb} zBu)AtARTu^xTl?tn!Vm4gfm@Zw&rX>;DOiU=H*FN1SjNN#(erjS4yu$EX$zt{PV9B z8}ccvL}F_S-7`#g(XC9*c-PC%#}{6jDnZp_|-O?OrZho9`qe-G4+I@bA+@W zL(+*8&j_Ir)(n>^g`F*^E1RrR0xPfm;YQy!?U#XT&6_bGfEZjSGaOIj6JwqDc-J&< zzU&Te6J>ds8)xP?MF)TLrQDrqc}_*7(munH_5tM! zz8m+C`&yJQSZhH}8h-JUv=_~TAaYapfq<5ymc1x7GhUz{-*|A&iEHiRaJfp2B!E$p zUNbWhE-JRNxmP)dtG`!4oh3Kjb=d3fke#8>r}q9$?coe#t4K?|COPzMvvQED)1v(Q z%tr)$6A-vB+C>}5bEp?gH}^1DT*@8DyxYJsEjNq7wDZUZK4oyUTx@4{s#Xua-#6@Y zO0F+3PkCM@-~wFU$vXq6J%WijZ}nt-RqmV0ZZ27zFw?^%O(^k*b^#g}hz$z;Rl9}Y G$UgvaY2zmV literal 0 HcmV?d00001 diff --git a/test/jellyfish-2.jpeg b/test/jellyfish-2.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..ca9063d39b1e4714ca78f9d2bb01ba5dda649f71 GIT binary patch literal 1857 zcmbW!X;hPE76x1hr zfX_VL>Fxjo3ILFe0@j}bt^i6+4XK7eA(2Ql8l|p@)zZ|^(A3r5vKhNg&v5%TJp%*0 zvBeHNahH*Sftf97mnDTpqZ#h7ceJBASXj}hABRBDXtbt=rjC}D4wYa)p#I-kZvrqV zAOPUPAVdI)fxs}3^;W=eV^0L+Q-FU30)@d5YDg4XU1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YBhlpVxHfIUf zaZhQ1WQDm)C46&IO&7;4DZiK{@8+a6580_Ug}dJCJ)V1#WV|4t>Kf@%lERmjD3Tzq zL|UyGrk=@_s4jFl2)qoktfjr#c^xN7a)CoqwA^0`*NH5PkH-j2z=>7e$r^XML?!QX z*sVIJQb@O-hyNFRI5(pN(y(KNJ38V5j+8zZz%{2?vD(w7kFDLVpnodJ4;tX65qWvD zuL~HVZjn&3S}8RI+w`qPjW!Pz$qSTHy$PVpQ^m10r+E^n`EXR@WzV2cpJg|+s{^Q1 xT^Tu$WK{fIByeewWnU~fP^BMOs6dEgg<^gZyFUU789ByrX_3I)v46j*?GN2C_2~cr literal 0 HcmV?d00001 diff --git a/test/jellyfish-4.jpeg b/test/jellyfish-4.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..65ceb5bea7e61c2b8599830ee9081d801979dc8f GIT binary patch literal 1688 zcmbW!c~Fx_6aerq`En3~76>Y#+yuiFjxUkJ5joUgA|N*!Q49tU&~XTg5)xXVqA=h= zxPnMP4k3sZ1R+vTP^Hueq_3dM-%;_3`-uq9KV%@%64-x4ZBBdRNjjI5hlVcM?=UlX*p#XV4c1oJ{RHg?ly1eP3hCZu*is3(#2g} zY+{z&d2N4GDE`Zo+xic;BOWZ?Unre1eb#i86StUXDYuT>Tb#TafpT+rf5C~spFuSq zAgnJud5M`BoYDv5?|;q~bLXer=bQJ%>GcbxH;Y)CO*D-<`VvkrOzxj|O`O0DtjuRl z_F>x2r?8&{MH};y2n!9L>Md$Lg-yb{j~t4-nBi{S)>WV1&XOxhXBVxAlq%60=FV;- z9WS%s=veM4tG4#TU4#aF?eSV{AT~szO}m~wysP$T;Ll-v3V7e^dd~0;Tc1`xA5R9K zr(Yf~t#t~DtZfrrS}P&6ZEjB9y*rUg1%>%1Hbfi5cRq%kCl7h_#%)|XJ@%WiDNQ=v zc})EH?yUpqPYS`&%dYZmyfu4TbIS6^NKfdEkNa3g1uK8Bw@%nH)tqtKZd`3)%NPP* zDJMS!TN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