-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Shader seems to not work #118
Comments
This is weird, v2.1a_L and v2.1a are identical except the L version has a couple more CNN layers... Does enabling each of the five shaders individually cause problems? Have you also tried other mpv shaders? We have to narrow down the problem as I can see that the shaders are running in the screenshot, but something is causing illegal/wrong texture accesses, which causes all of the artifacts you see. |
Thank you for quick reply.
Good suspect, seems like it was only the
Yes, it was downloaded from your releases section.
Here's a screenshot for them: |
Just checked, |
This is even more strange, Bilateral_Median is more complex than Bilateral_Mode, except that a part of the code is disabled by default. What happens if you set |
As you suspected, changing it to anything larger than 0.0 creates the bug. |
What I think might be happening is that this part of the code causes the GPU wavefronts to go out of sync. This should not happen with modern GPUs as they all can handle this type of "branching" very well if properly unrolled during compilation.
Here you see that Or it is simply because the regularization part uses 9 more registers ( As I do not have access to your GPU I'm afraid I cannot debug this unless mpv supports a full GPU profiler dump. (Which I'm not aware of.) |
I have quickly modified the bilateral mode denoiser so it no longer uses the extra registers and also removed the nested for loop. This of course is bad for readability and theoretically performs worse, but might work for you. Feel free to try it when you see fit. |
Thank you for your insights. I don't possess the hardwares to test them right now, I will test them tomorrow. Something I did notice earlier, not sure if helpful:
|
Probably worth noting old AMD driver versions on Windows used to get a corrupt image (sort of similar) with this shader about half a year ago in DX but not in OGL/Vulkan. |
That is what I thought too, as I saw people having this issue with older GPUs, but here the user has macOS, which should be using either OGL and Vulkan. |
I'm really kind of clueless when it comes to MACs but I thought OGL was deprecated and Vulkan can't be used directly but instead translated to Metal via MoltenVK? No idea what MPV does though. |
Just tried your modified version, still doesn't seem to work. However, I just tried manually write out the array as 9 separate variables, and expand the for loop manually, that seems to solve it. See as attached. |
mpv-player/mpv#7482 |
To Reproduce
Currently the config file is set as:
Screenshots
Desktop (please complete the following information):
Is there anything I need to manually install beside mpv? I simply followed the
Installation Instruction
on the release page.Tried to apply only a single shader, seems to result in similar problem.
Just checked, the v2.1a_L works totally fine for me, but v2.1a doesn't work.
The text was updated successfully, but these errors were encountered: