Skip to content

Commit

Permalink
fix: Don't call kernel.updateTextureArgumentRefs if kernel is mutable
Browse files Browse the repository at this point in the history
  • Loading branch information
robertleeplummerjr committed Mar 12, 2020
1 parent bea9d34 commit b1af9b3
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 27 deletions.
14 changes: 7 additions & 7 deletions dist/gpu-browser-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*
* GPU Accelerated JavaScript
*
* @version 2.8.0
* @date Wed Mar 11 2020 07:33:36 GMT-0400 (Eastern Daylight Time)
* @version 2.8.1
* @date Thu Mar 12 2020 07:32:27 GMT-0400 (Eastern Daylight Time)
*
* @license MIT
* The MIT License
Expand Down Expand Up @@ -9160,11 +9160,11 @@ class WebGLKernelValueMemoryOptimizedNumberTexture extends WebGLKernelArray {
return;
}
if (this.checkContext && inputTexture.context !== this.context) {
throw new Error(`Value ${this.name} (${this.type }) must be from same context`);
throw new Error(`Value ${this.name} (${this.type}) must be from same context`);
}

const { context: gl, kernel } = this;
if (kernel.pipeline) {
const { kernel, context: gl } = this;
if (kernel.pipeline && kernel.immutable) {
kernel.updateTextureArgumentRefs(this, inputTexture);
}

Expand Down Expand Up @@ -9220,7 +9220,7 @@ class WebGLKernelValueNumberTexture extends WebGLKernelArray {
}

const { kernel, context: gl } = this;
if (kernel.pipeline) {
if (kernel.pipeline && kernel.immutable) {
kernel.updateTextureArgumentRefs(this, inputTexture);
}

Expand Down Expand Up @@ -12577,7 +12577,7 @@ class WebGL2Kernel extends WebGLKernel {
}
}
getInternalFormat() {
const { context: gl, optimizeFloatMemory, pipeline, precision } = this;
const { context: gl } = this;

if (this.precision === 'single') {
if (this.pipeline) {
Expand Down
6 changes: 3 additions & 3 deletions dist/gpu-browser-core.min.js

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions dist/gpu-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*
* GPU Accelerated JavaScript
*
* @version 2.8.0
* @date Wed Mar 11 2020 07:33:35 GMT-0400 (Eastern Daylight Time)
* @version 2.8.1
* @date Thu Mar 12 2020 07:32:26 GMT-0400 (Eastern Daylight Time)
*
* @license MIT
* The MIT License
Expand Down Expand Up @@ -13613,11 +13613,11 @@ class WebGLKernelValueMemoryOptimizedNumberTexture extends WebGLKernelArray {
return;
}
if (this.checkContext && inputTexture.context !== this.context) {
throw new Error(`Value ${this.name} (${this.type }) must be from same context`);
throw new Error(`Value ${this.name} (${this.type}) must be from same context`);
}

const { context: gl, kernel } = this;
if (kernel.pipeline) {
const { kernel, context: gl } = this;
if (kernel.pipeline && kernel.immutable) {
kernel.updateTextureArgumentRefs(this, inputTexture);
}

Expand Down Expand Up @@ -13673,7 +13673,7 @@ class WebGLKernelValueNumberTexture extends WebGLKernelArray {
}

const { kernel, context: gl } = this;
if (kernel.pipeline) {
if (kernel.pipeline && kernel.immutable) {
kernel.updateTextureArgumentRefs(this, inputTexture);
}

Expand Down Expand Up @@ -17030,7 +17030,7 @@ class WebGL2Kernel extends WebGLKernel {
}
}
getInternalFormat() {
const { context: gl, optimizeFloatMemory, pipeline, precision } = this;
const { context: gl } = this;

if (this.precision === 'single') {
if (this.pipeline) {
Expand Down
6 changes: 3 additions & 3 deletions dist/gpu-browser.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gpu.js",
"version": "2.8.0",
"version": "2.8.1",
"description": "GPU Accelerated JavaScript",
"engines": {
"node": ">=8.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ class WebGLKernelValueMemoryOptimizedNumberTexture extends WebGLKernelArray {
return;
}
if (this.checkContext && inputTexture.context !== this.context) {
throw new Error(`Value ${this.name} (${this.type }) must be from same context`);
throw new Error(`Value ${this.name} (${this.type}) must be from same context`);
}

const { context: gl, kernel } = this;
if (kernel.pipeline) {
const { kernel, context: gl } = this;
if (kernel.pipeline && kernel.immutable) {
kernel.updateTextureArgumentRefs(this, inputTexture);
}

Expand Down
2 changes: 1 addition & 1 deletion src/backend/web-gl/kernel-value/number-texture.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class WebGLKernelValueNumberTexture extends WebGLKernelArray {
}

const { kernel, context: gl } = this;
if (kernel.pipeline) {
if (kernel.pipeline && kernel.immutable) {
kernel.updateTextureArgumentRefs(this, inputTexture);
}

Expand Down
2 changes: 1 addition & 1 deletion src/backend/web-gl2/kernel.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ class WebGL2Kernel extends WebGLKernel {
}
}
getInternalFormat() {
const { context: gl, optimizeFloatMemory, pipeline, precision } = this;
const { context: gl } = this;

if (this.precision === 'single') {
if (this.pipeline) {
Expand Down

0 comments on commit b1af9b3

Please sign in to comment.