-
-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GLMakie] only every 64th line segment is rendered on AMD integrated graphics #1460
Comments
i am experiencing the same issue running the same setup but using x server instead of wayland on arch linux. also tried with julia i thought it might be a driver issue and have tried it on three different machines. the only one that it does not work on is the laptop with integrated amd graphics. other opengl applications like glxgears works fine though. funny is that i can see a very short flash of the lines and then they disapear. maybe someone with similar hardware can confirm if it might be an isolated issue. output of
i get the following failed tests when i run
|
Is this also an issue with the previous version? |
tried |
Aha! I am using the integrated graphics on an AMD Ryzen 5 2400G. And yes, I also noticed the flash. |
Makie v0.16.1 This version just came out two days ago and the issue is still not solved #1543. I also use AMD integrated graphics. Blaming the driver sounds too easy since I guess we here have different kernel versions. Any idea how to help to debug it? My linux kernel version is 5.15.12 |
Well, it only happens on AMD, so it must be a driver issue one way or the other... |
I guess my question is, how is Also, what driver do you suspect is at fault here? OpenGL? OpenCL? Vulkan? Sorry, not very familiar with the GLMakie codebase, but I would be happy for that to change! |
I am sorry, I am not trying to blame you @SimonDanisch . I would just like to help. Hardware access is difficult. I could run tests and provide you with the results if you want. Should we open an issue for the kernel? The other two users are also on Linux, so it might be an issue with the Linux driver specifically. |
Strokes from I can confirm that |
|
It's not just the first line segment that displays, as you can see in my original image. It seems to maybe be every 64th line segment? Or something close to that? (away from my computer) |
@imyxh you are right! Example: x = 1:200
lines(x, x) This code shows only segments starting with the points |
I can confirm that the bug does not affect Windows but does affect Linux for me. (I am dual booting my laptop with an AMD Ryzen 7 pro 4750u APU). |
I could @SimonDanisch It would be awesome if you would provide us with some assumptions of what in the driver is not working, and which driver, as @imyxh asked :) |
I feel like if there is indeed an upstream bug, it is likely it lies in mesa instead of the kernel? I have an apitrace here: https://0x0.st/oi3o.trace but it's very long and I have no idea how to interpret it. |
So, I expect some math function to work slightly differently on AMDs linux driver.... The input of that shader is a whats called points = ...# points of the line
geom_shader_output = map(Iterators.partition(points, 4)) do g_valid_vertex
p1, p2, p3, p4 = g_valid_vertex
...
end All the To debug this, you can just directly change |
I did what you said and changed Then I tried some other combinations of
They produce the expected lines! Even the stroke problem from issue #1543 is solved! The lines do not disappear after a moment (no flashing, see below). If I set the first field to If I set the second and/or the third field to false, then I only see the coordinate system, no line segments, also not the 64-th ones. Setting the fourth field to TL;DR: The problem is that the first field is set to Please give me further instructions to debug. I am happy to help ^^ |
Same here, Arch-Linux/Wayland on AMD integrated graphics. |
@mo8it oh, I didn't see this comment. |
Same, ArchLinux/X11, driver version:
Makie version:
|
So I finally had a chance to try out an AMD onboard GPU on windows.
Damn, yeah I can confirm this. There goes the chance to debug this, I guess... |
Easy: just install Linux ;-) |
Dropping by to say that I also have the issue (on AMD graphics using Manjaro). It looks like there's no workaround so far, correct? Let me know if there's any diagnostics I can run to help! |
Issue does appear to be AMD only. @SimonDanisch What are the odds that we can shift to Rust's wgpu-rs library for Makie (via its C API) instead of GLFW? :D |
Well if someone has time for it😂 The api of glfw is pretty thin, so easy to replace😉 |
The workaround I am using as of now is to use either
to use
more details ... |
@ArbitRandomUser Darn, I totally forgot about Zink. Nice find! 😄 |
@SimonDanisch Reminds me, I visually see the full line at the very beginning for a moment, but it gets shrinked to a small line the next instant. That happens every time I run |
When I am using GLMakie inside of a Jupyter Notebook, the first plot that I do after starting Julia is displayed correctly, but the second plot shows only every 64th line segment. Even just displaying the current figure for a second time only shows every 64th line segment. @SimonDanisch maybe we can sit down together next week and have a short glance at this problem? |
I sat down with Simon and tried to debug this on Julia 1.9 and Makie 0.19.1 and GLMakie 0.8.1. julia> GLMakie.closeall()
julia> f, ax, pl = lines(rand(100)); s=display(f)
GLMakie.Screen(...)
julia> GLMakie.render_frame(s)
julia> GLFW.SwapBuffers(s.glscreen)
even if you close the window it keeps being broken on the next plot until you call |
I created an MWE repository: https://github.com/SimonDanisch/AMDMWE.jl |
For me this issue is closed on julia version 1.8.5 and GLMakie version 0.8.3 and newer combinations I tried. |
#2666 changed a lot about lines, though I don't know if it fixed this issue. That has been merged in 0.8.3 if I'm not mistaken. |
Can confirm this issue is solved for me on Linux using GLMakie v0.8.4 and Julia 1.8.5. |
Lets close it then for now^^ Would be really great if this finally "just worked" |
i just heard of wgpu for the first time this morning. described as the successor to both opengl and webgl here. seems like long-term at some point makie will need to be refactored. |
follow up question-- would refactoring to use wgpu provide a path to unify the GLMakie and WGLMakie backends? |
Seems they have a C API and some Julia wrappers already, so it's definitely feasible. But that's just for the desktop implementation, I'm not sure if that interface extends to WebGL. |
Honestly, i wouldn't bet any horses on this. |
i'm not so sure about this. in january of this year it proceeded to the stage of "candidate recommendation draft" at W3C. https://www.w3.org/standards/history/webgpu worth noting too that apple has deprecated opengl as of v4.1. there appears to be no firm date as to when they'll sunset it entirely though. |
Well, that's what I mean exactly ;) Adaptation for Graphics API are notoriously slow, for Vulcan it took at least 5-9 years from first draft/demos/support to being somewhat certain that it works on 90%+ of hardware (note Vulkan was released 2016, and adaptation is still somewhat shaky). |
Hello, I just noticed something wrong with my
lines
plots today. When I run the following simple test code in the REPL:This is the kind of output I get:
The lines drawn seem to only connect two points at a time, and only do so very very intermittently. I have noticed no problems with
scatter
or evenlinesegments
, justlines
.Does anyone have any suggestions to debug this further? Help would be greatly appreciated. Thanks!
Edit: Julia 1.6.3, GLMakie 0.4.7, Wayland on Linux. CairoMakie does not have the same issue.
The text was updated successfully, but these errors were encountered: