Skip to content

Commit b1af9b3

Browse files
fix: Don't call kernel.updateTextureArgumentRefs if kernel is mutable
1 parent bea9d34 commit b1af9b3

File tree

9 files changed

+27
-27
lines changed

9 files changed

+27
-27
lines changed

dist/gpu-browser-core.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
*
55
* GPU Accelerated JavaScript
66
*
7-
* @version 2.8.0
8-
* @date Wed Mar 11 2020 07:33:36 GMT-0400 (Eastern Daylight Time)
7+
* @version 2.8.1
8+
* @date Thu Mar 12 2020 07:32:27 GMT-0400 (Eastern Daylight Time)
99
*
1010
* @license MIT
1111
* The MIT License
@@ -9160,11 +9160,11 @@ class WebGLKernelValueMemoryOptimizedNumberTexture extends WebGLKernelArray {
91609160
return;
91619161
}
91629162
if (this.checkContext && inputTexture.context !== this.context) {
9163-
throw new Error(`Value ${this.name} (${this.type }) must be from same context`);
9163+
throw new Error(`Value ${this.name} (${this.type}) must be from same context`);
91649164
}
91659165

9166-
const { context: gl, kernel } = this;
9167-
if (kernel.pipeline) {
9166+
const { kernel, context: gl } = this;
9167+
if (kernel.pipeline && kernel.immutable) {
91689168
kernel.updateTextureArgumentRefs(this, inputTexture);
91699169
}
91709170

@@ -9220,7 +9220,7 @@ class WebGLKernelValueNumberTexture extends WebGLKernelArray {
92209220
}
92219221

92229222
const { kernel, context: gl } = this;
9223-
if (kernel.pipeline) {
9223+
if (kernel.pipeline && kernel.immutable) {
92249224
kernel.updateTextureArgumentRefs(this, inputTexture);
92259225
}
92269226

@@ -12577,7 +12577,7 @@ class WebGL2Kernel extends WebGLKernel {
1257712577
}
1257812578
}
1257912579
getInternalFormat() {
12580-
const { context: gl, optimizeFloatMemory, pipeline, precision } = this;
12580+
const { context: gl } = this;
1258112581

1258212582
if (this.precision === 'single') {
1258312583
if (this.pipeline) {

dist/gpu-browser-core.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/gpu-browser.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
*
55
* GPU Accelerated JavaScript
66
*
7-
* @version 2.8.0
8-
* @date Wed Mar 11 2020 07:33:35 GMT-0400 (Eastern Daylight Time)
7+
* @version 2.8.1
8+
* @date Thu Mar 12 2020 07:32:26 GMT-0400 (Eastern Daylight Time)
99
*
1010
* @license MIT
1111
* The MIT License
@@ -13613,11 +13613,11 @@ class WebGLKernelValueMemoryOptimizedNumberTexture extends WebGLKernelArray {
1361313613
return;
1361413614
}
1361513615
if (this.checkContext && inputTexture.context !== this.context) {
13616-
throw new Error(`Value ${this.name} (${this.type }) must be from same context`);
13616+
throw new Error(`Value ${this.name} (${this.type}) must be from same context`);
1361713617
}
1361813618

13619-
const { context: gl, kernel } = this;
13620-
if (kernel.pipeline) {
13619+
const { kernel, context: gl } = this;
13620+
if (kernel.pipeline && kernel.immutable) {
1362113621
kernel.updateTextureArgumentRefs(this, inputTexture);
1362213622
}
1362313623

@@ -13673,7 +13673,7 @@ class WebGLKernelValueNumberTexture extends WebGLKernelArray {
1367313673
}
1367413674

1367513675
const { kernel, context: gl } = this;
13676-
if (kernel.pipeline) {
13676+
if (kernel.pipeline && kernel.immutable) {
1367713677
kernel.updateTextureArgumentRefs(this, inputTexture);
1367813678
}
1367913679

@@ -17030,7 +17030,7 @@ class WebGL2Kernel extends WebGLKernel {
1703017030
}
1703117031
}
1703217032
getInternalFormat() {
17033-
const { context: gl, optimizeFloatMemory, pipeline, precision } = this;
17033+
const { context: gl } = this;
1703417034

1703517035
if (this.precision === 'single') {
1703617036
if (this.pipeline) {

dist/gpu-browser.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gpu.js",
3-
"version": "2.8.0",
3+
"version": "2.8.1",
44
"description": "GPU Accelerated JavaScript",
55
"engines": {
66
"node": ">=8.0.0"

src/backend/web-gl/kernel-value/memory-optimized-number-texture.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ class WebGLKernelValueMemoryOptimizedNumberTexture extends WebGLKernelArray {
3737
return;
3838
}
3939
if (this.checkContext && inputTexture.context !== this.context) {
40-
throw new Error(`Value ${this.name} (${this.type }) must be from same context`);
40+
throw new Error(`Value ${this.name} (${this.type}) must be from same context`);
4141
}
4242

43-
const { context: gl, kernel } = this;
44-
if (kernel.pipeline) {
43+
const { kernel, context: gl } = this;
44+
if (kernel.pipeline && kernel.immutable) {
4545
kernel.updateTextureArgumentRefs(this, inputTexture);
4646
}
4747

src/backend/web-gl/kernel-value/number-texture.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class WebGLKernelValueNumberTexture extends WebGLKernelArray {
4444
}
4545

4646
const { kernel, context: gl } = this;
47-
if (kernel.pipeline) {
47+
if (kernel.pipeline && kernel.immutable) {
4848
kernel.updateTextureArgumentRefs(this, inputTexture);
4949
}
5050

src/backend/web-gl2/kernel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ class WebGL2Kernel extends WebGLKernel {
251251
}
252252
}
253253
getInternalFormat() {
254-
const { context: gl, optimizeFloatMemory, pipeline, precision } = this;
254+
const { context: gl } = this;
255255

256256
if (this.precision === 'single') {
257257
if (this.pipeline) {

0 commit comments

Comments
 (0)