G6 icon indicating copy to clipboard operation
G6 copied to clipboard

Incorrect complex fruchterman layout rendering when GPU accelerated

Open AgustinBanchio opened this issue 4 years ago • 9 comments

Describe the bug

When a Fruchterman layout graph has complex data and is GPU accelerated, the layout is incorrectly rendered.

Sometimes it doesn't show at all and you need to pan and scroll around to see it, and it's all squashed in a diagonal line. See attached screenshot.

This can be replicated with the GPU layout example for complex data.

It doesn't happen on every machine. It runs correctly on other Windows PCs or on a MacBook.

My guess is that it has to do with the actual Graphics Adapter or driver? Nvidia Drivers on Windows?

Tried on different browsers, with no extensions or add-ons, tried replacing direct x with open GL and the issue still persisted.

Your Example Website or App

https://g6.antv.vision/en/examples/net/gpuLayout#fruchtermanComplexData

Steps to Reproduce the Bug or Issue

Go to https://g6.antv.vision/en/examples/net/gpuLayout#fruchtermanComplexData. See the rendered layout.

Expected behavior

The layout should be rendered correctly and not squashed

Screenshots or Videos

image

Platform

  • OS: Windows 10
  • Browser: Chrome (Edge and Firefox also have the same issue.)
  • Version: 97.0.4692.71
  • GPU: Nvidia GeForce 3090 with latest windows 10 drivers

Additional context

Maybe someone with a similar graphics card and setup can try to reproduce and find the issue.

We are having the same issues with M1 and M1Pro MacBooks

AgustinBanchio avatar Jan 05 '22 14:01 AgustinBanchio

I rewrote it with WebGPU which has native support for compute shader, can you reproduce this bug? https://antv-g-next.gitee.io/zh/examples/gpgpu#fruchterman

I guess this bug caused by WebGL textures(our current implementation based on WebGL texture mapping) on your device.

machine: MacBook Pro (13-inch, M1, 2020) browser: Chrome 97.0.4692.99 (arm64)

截屏2022-02-10 上午10 17 29

xiaoiver avatar Feb 08 '22 04:02 xiaoiver

We have same issue while using it on Linux, M1 Mac, and some Windows.

BinX-Suse avatar Feb 09 '22 03:02 BinX-Suse

Hi, in the link you sent I'm seeing the following (with the same machine that had the issues): image

Is that what I'm supposed to be seeing? The graph looks like just blue lines.

AgustinBanchio avatar Feb 09 '22 18:02 AgustinBanchio

Is that what I'm supposed to be seeing? The graph looks like just blue lines.

It seems that all the nodes are not rendered correctly.

xiaoiver avatar Feb 10 '22 02:02 xiaoiver

Apparently, M1 and M1 Pro MacBooks are having the same issue. When they try the GPU Fruchterman example they look fine but when it's more complex with custom nodes and edges it goes crazy.

It's there anything I can do to help you with debugging this?

AgustinBanchio avatar Feb 14 '22 11:02 AgustinBanchio

It looks like the only problem is the layout calculation, not the actual rendering.

Is this being looked at?

To avoid the issue we are forced to use gpuEnabled: false when creating the graph. But for fruchterman it's really slow.

I rewrote it with WebGPU which has native support for compute shader, can you reproduce this bug? antv-g-next.gitee.io/zh/examples/gpgpu#fruchterman

I guess this bug caused by WebGL textures(our current implementation based on WebGL texture mapping) on your device.

Will this WebGPU change be released soon or was it just an experiment to see if it worked?

AgustinBanchio avatar Feb 24 '22 15:02 AgustinBanchio

Had a similar issue over the weekend - disabling gpuEnabled: false is a work around for now but it's also a lot slower so not ideal. Also interested in the progress of this thanks!

McKenzieJDan avatar Mar 01 '22 16:03 McKenzieJDan

How long is the problem expected to be solved?

rookie-luochao avatar Nov 06 '22 06:11 rookie-luochao

Hello, friends, I also encountered this problem, do you have any good alternatives at that time, thank you

jinfei-lab avatar Mar 31 '23 09:03 jinfei-lab

This issue has been closed because it has been outdate for a long time. Please open a new issue if you still need help.

这个 issue 已经被关闭,因为 它已经过期很久了。 如果你仍然需要帮助,请创建一个新的 issue。

github-actions[bot] avatar Jul 03 '24 11:07 github-actions[bot]