gpujs / gpu.js

GPU Accelerated JavaScript

Home Page:https://gpu.rocks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Heavily dependent functions throw Error: no matching overloaded function found

szacskesz opened this issue · comments

What is wrong?

I have a problem with the added functions while running the kernel. Added some simple vector functions (dotProduct, scale, magnitude, normalize) and when I call them in a specific order, I get the error: Error compiling fragment shader: ERROR: 0:457: 'vecDotProduct' : no matching overloaded function found. The problem only occurs when I try to run/execute the kernel, not when I create it. (Note: the function, which was refered in the error, does exist with the proper types)

The mentioned functions rely on each other (calls each other), and I belive the problem might be related to this, because with independent functions I get no error.

Where does it happen?

A webpage using GPU.js running on my computer (Win10, Chrome)

How do we replicate the issue?

I created a Stackblitz to replitcate the issue:
https://stackblitz.com/edit/js-ztmz1t?devToolsHeight=33&file=index.js
(If the previous link doesn't work: https://js-ztmz1t.stackblitz.io )

How important is this (1-5)?

4

Expected behavior (i.e. solution)

The kernel runs without any error.

I found a similar issue: #730

The changes in it's pull request solve my problem, but it concerns me that it might not be the proper solution, because it hasn't been merged since 2021.