-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
[Bug]: Crash on PC with AMD GPU (capturer = wlroots) #81
Comments
Thanks for reporting, and including these details! Do you have multiple GPUs (e.g. integrated and discrete), or this is the only one? |
No, RX 6600 is the only one installed |
Very curious! This is the key point:
We call Line 227 in 54874c1
Lines 279 to 280 in 54874c1
I suspect that the first line is where the issue occurs (would be nice if you could confirm), because the error also speaks about Line 218 in 54874c1
The way I understand the error is that The To be honest I don't know if I'll be able to debug it without being able to reproduce, would you be interested to dig a little bit into this issue? I'd start from figuring out where exactly the issue occurs (in If you have any questions or findings, just post them here, and I'm sure together we'll be able to find a solution 😉 |
I've spent some time debugging this, and here's what I've found:
I haven't tested if it calculates lightness percent properly with the above corrections yet, but at least the crash doesn't happen now. |
I have just checked the values returned by |
Great findings!
This sounds logical! The fact that validation layer stops complaining is also a positive sign, even if the app still crashes, it sounds like the right thing to do. Once we fix the issue and it starts working for you, we can try again without this snippet to see if it will crash again, but I'm quite sure you are right.
In case of "frame image", we already have the image of your screen contents inside the GPU, somewhere in memory, and the goal is to get access to its pixels directly, without a copy. For this purpose, we use the Once we have the information about the frame memory in
You are absolutely correct, the honest reason for the hacky zero is that I have no hardware to test whether this is actually working, on a system with only one GPU the index will anyway be always zero (to confirm you can simply print the value of Happy to take it, but probably a less important issue for you, as I don't think it would make any difference to your setup (unless it doesn't actually equal to zero for you?). |
- Handle the case when Vulkan image needs dedicated memory - Fixes maximbaz#81
- Handle the case when Vulkan image needs dedicated memory - Fixes maximbaz#81
I've finally resolved the issue. The violated part of specification is VUID-vkBindImageMemory-image-01445:
To handle the case correctly, we need to add a check for a dedicated allocation requirement and pass a |
This is extremely interesting, thanks for sharing and submitting a PR! Could you tell me how you nailed it down to |
While I was debugging it, I was checking the spec for the "valid usage" requirements on
And in the |
It's all very very cool, and I'm really glad that you managed to fix it for your system, and were willing to share your learnings and contribute your findings in a PR 🙏 I just tagged a new release, in case it helps 😉 Enjoy! |
Steps for reproducing the issue
I have an AMD RX 6600 GPU, probably it's what causes the problem. When I run wluma with capturer set to
wlroots
inconfig.toml
, it crashes shortly after starting.What is the buggy behavior?
What is the expected behavior?
It should run properly, like when I set capturer to
none
in configLogs
Version
wluma-git 4.2.0.r4.g54874c1-1
installed from AUREnvironment
The text was updated successfully, but these errors were encountered: