Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/backend/gl/kernel.js
Original file line number Diff line number Diff line change
Expand Up @@ -929,9 +929,9 @@ class GLKernel extends Kernel {
this.updateMaxTexSize();
this.framebuffer.width = this.texSize[0];
this.framebuffer.height = this.texSize[1];
gl.viewport(0, 0, this.maxTexSize[0], this.maxTexSize[1]);
this.canvas.width = this.maxTexSize[0];
this.canvas.height = this.maxTexSize[1];
gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);
if (this.texture) {
this.texture.delete();
}
Expand Down Expand Up @@ -1056,4 +1056,4 @@ const typeMap = {

module.exports = {
GLKernel
};
};
14 changes: 4 additions & 10 deletions src/backend/web-gl/kernel.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,15 +491,9 @@ class WebGLKernel extends GLKernel {
}
const { texSize, context: gl, canvas } = this;
gl.enable(gl.SCISSOR_TEST);
if (this.pipeline && this.precision === 'single') {
gl.viewport(0, 0, this.maxTexSize[0], this.maxTexSize[1]);
canvas.width = this.maxTexSize[0];
canvas.height = this.maxTexSize[1];
} else {
gl.viewport(0, 0, this.maxTexSize[0], this.maxTexSize[1]);
canvas.width = this.maxTexSize[0];
canvas.height = this.maxTexSize[1];
}
canvas.width = this.maxTexSize[0];
canvas.height = this.maxTexSize[1];
gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);
const threadDim = this.threadDim = Array.from(this.output);
while (threadDim.length < 3) {
threadDim.push(1);
Expand Down Expand Up @@ -1604,4 +1598,4 @@ float integerCorrectionModulo(float number, float divisor) {

module.exports = {
WebGLKernel
};
};