DadSchoorse / vkBasalt

a vulkan post processing layer for linux
zlib License
1.25k stars 52 forks source link

vkcube segfault #3

Closed clapbr closed 5 years ago

clapbr commented 5 years ago

specs

~ >>> inxi -bM                                                                                                                                                                                                                                              
System:    Host: mjb Kernel: 5.3.6-13-tkg-pds x86_64 bits: 64 Desktop: KDE Plasma 5.17.0 Distro: Manjaro Linux 
Machine:   Type: Desktop Mobo: ASUSTeK model: TUF B450M-PLUS GAMING v: Rev X.0x serial: <root required> 
           UEFI: American Megatrends v: 1201 date: 04/25/2019 
CPU:       6-Core: AMD Ryzen 5 2600 type: MT MCP speed: 2452 MHz min/max: 1550/3400 MHz 
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] driver: amdgpu 
           v: kernel 
           Display: x11 server: X.Org 1.20.5 driver: amdgpu tty: N/A 
           OpenGL: renderer: Radeon RX 580 Series (POLARIS10 DRM 3.33.0 5.3.6-13-tkg-pds LLVM 9.0.0) 
           v: 4.5 Mesa 19.3.0-devel (git-48d617118a) 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169 
Drives:    Local Storage: total: 1.59 TiB used: 1003.17 GiB (61.5%) 
Info:      Processes: 350 Uptime: 2d 18h 58m Memory: 15.63 GiB used: 4.10 GiB (26.2%) Shell: zsh inxi: 3.0.36

Tried with latest RADV:

~ >>> ENABLE_VKBASALT=1 vkcube                                                                                                                                                                                                                              
i am doing something
found graphic capable queue
1
queue 0x55b879c8cae0
queue 0x55b879c8cae0
queue 0x55b879c8cae0
format 50
format 50
device 0x55b879d56040
format 50
swapchain 0x55b879eb8070
Interrupted create swapchain
Interrupted get swapchain images 0
Interrupted get swapchain images 3
queue 0x55b879c8cae0
swapchain 0x55b879eb8070
format 50
device 0x55b879d56040
before creating descriptor Pool 
set count 3
after creating descriptor Pool 
before allocating descriptor Sets 1
before writing descriptor Sets 
before writing descriptor Sets 
before writing descriptor Sets 
0x7f5604f1ca60
0x55b879fc2840
0x8
0x55b87a1e7a20
0x55b87a2ab820
0x55b87a276ea0
after allocateCommandBuffer 
0x55b87a1e7a20
0x55b87a2ab820
0x55b87a276ea0
before begin commandbuffer 0x55b87a1e7a20
before command buffer step 1
before command buffer step 2
zsh: segmentation fault (core dumped)  ENABLE_VKBASALT=1 vkcube

With amdgpu-pro:

~ >>> VK_ICD_FILENAMES=/opt/amdgpu-pro/etc/vulkan/icd.d/amd_icd64.json ENABLE_VKBASALT=1 vkcube                                                                                                                                                        [139]
i am doing something
found graphic capable queue
1
queue 0x55612f19a4b0
queue 0x55612f19a4b0
queue 0x55612f19a4b0
format 44
format 44
device 0x55612f179ee0
format 44
swapchain 0x55612f51b380
Interrupted create swapchain
Interrupted get swapchain images 0
Interrupted get swapchain images 3
queue 0x55612f19a4b0
swapchain 0x55612f51b380
format 44
device 0x55612f179ee0
before creating descriptor Pool 
set count 3
after creating descriptor Pool 
before allocating descriptor Sets 1
before writing descriptor Sets 
before writing descriptor Sets 
before writing descriptor Sets 
0x7f64fabbda40
0x7f64fabbda40
0
0x55612f2d1260
0x55612f2d7040
0x55612f27b7d0
after allocateCommandBuffer 
0x55612f2d1260
0x55612f2d7040
0x55612f27b7d0
before begin commandbuffer 0x55612f2d1260
before command buffer step 1
before command buffer step 2
zsh: segmentation fault (core dumped)  VK_ICD_FILENAMES=/opt/amdgpu-pro/etc/vulkan/icd.d/amd_icd64.json =1 vkcube
DadSchoorse commented 5 years ago

Ohh, this is very bad. I was informed on reddit, that i use undefined behavior, no maybe vkBasalt does not work on all drivers other than nvidia currently.

fluffykittyrevenge commented 5 years ago

Can confirm that. I have the exact same errors with RADV and AMDVLK with an RX 580.

System:    Host: blackhole Kernel: 5.4.0-1.rc3-tkg-cfs x86_64 bits: 64 Desktop: KDE Plasma 5.16.5 Distro: Manjaro Linux 
Machine:   Type: Desktop System: Dell product: Precision WorkStation T5500 v: N/A serial: <root required> 
           Mobo: Dell model: 0D883F v: A06 serial: <root required> BIOS: Dell v: A17 date: 03/11/2018 
CPU:       2x Quad Core: Intel Xeon X5687 type: MT MCP SMP speed: 1596 MHz min/max: 1596/3592 MHz 
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] driver: amdgpu 
           v: kernel 
           Display: x11 server: X.Org 1.20.5 driver: amdgpu resolution: 1920x1080~60Hz 
           OpenGL: renderer: Radeon RX 580 Series (POLARIS10 DRM 3.35.0 5.4.0-1.rc3-tkg-cfs LLVM 10.0.0) 
           v: 4.5 Mesa 19.3.0-devel (git-4c9b9ed5f9) 
Network:   Device-1: Broadcom and subsidiaries NetXtreme BCM5761 Gigabit Ethernet PCIe driver: tg3 
Drives:    Local Storage: total: 2.43 TiB used: 1.86 TiB (76.3%) 
Info:      Processes: 437 Uptime: 3h 43m Memory: 47.05 GiB used: 2.79 GiB (5.9%) Shell: bash inxi: 3.0.36

amdvlk.txt radv.txt

DadSchoorse commented 5 years ago

@fluffykittyrevenge @clapbr, can someone of you test this build and see if this fixes it? vkBasalt.tar.gz

alex9k1 commented 5 years ago

@fluffykittyrevenge @clapbr, can someone of you test this build and see if this fixes it? vkBasalt.tar.gz

Got the same issue and tested your .tar.gz While the application does not segfault anymore, the image immediately freezes. Here's the output:

i am doing something
found graphic capable queue
1
queue 0x56266709ae90
queue 0x56266709ae90
queue 0x56266709ae90
format 44
format 44
device 0x562667089d00
format 44
swapchain 0x562667170da0
Interrupted create swapchain
Interrupted get swapchain images 0
Interrupted get swapchain images 3
queue 0x56266709ae90
swapchain 0x562667170da0
format 44
device 0x562667089d00
before creating descriptor Pool 
set count 3
after creating descriptor Pool 
before allocating descriptor Sets 1
before writing descriptor Sets 
before writing descriptor Sets 
before writing descriptor Sets 
0x562666f900b0
0
0x20
0x5626671c0a10
0x5626671c7520
0x5626671cf040
after allocateCommandBuffer 
0x5626671c0a10
0x5626671c7520
0x5626671cf040
before begin commandbuffer 0x5626671c0a10
before command buffer step 1
before command buffer step 2
before command buffer step 3
before command buffer step 4
before ending command buffer
before begin commandbuffer 0x5626671c7520
before command buffer step 1
before command buffer step 2
before command buffer step 3
before command buffer step 4
before ending command buffer
before begin commandbuffer 0x5626671cf040
before command buffer step 1
before command buffer step 2
before command buffer step 3
before command buffer step 4
before ending command buffer
0writen commandbuffer0x5626671c0a10
1writen commandbuffer0x5626671c7520
2writen commandbuffer0x5626671cf040
DadSchoorse commented 5 years ago

This is good and bad. I fixed an obvious error. The bad part is, I have never seen such an issue. Does the window stay open?

fluffykittyrevenge commented 5 years ago

@alex9k1

Tested that with both RADV and AMDVLK with the same results as you, doesn't crash but freezes.

amdvlk.txt radv.txt

fluffykittyrevenge commented 5 years ago

This is good and bad. I fixed an obvious error. The bad part is, I have never seen such an issue. Does the window stay open?

It does with what @alex9k1 posted, but not with yours.

EDIT: Tried from the latest commit and now vkcube is freezing upon launch

alex9k1 commented 5 years ago

This is good and bad. I fixed an obvious error. The bad part is, I have never seen such an issue. Does the window stay open?

Yes

DadSchoorse commented 5 years ago

This build will not solve the problem, but could give me some info, so please try it: vkBasalt.tar.gz

fluffykittyrevenge commented 5 years ago

This build will not solve the problem, but could give me some info, so please try it: vkBasalt.tar.gz

Segfaults but has more output

amdvlk.txt radv.txt

alex9k1 commented 5 years ago

This build will not solve the problem, but could give me some info, so please try it: vkBasalt.tar.gz

i am doing something
found graphic capable queue
1
queue 0x5578e7a60390
queue 0x5578e7a60390
queue 0x5578e7a60390
format 44
format 44
device 0x5578e7a4f200
format 44
swapchain 0x5578e7b370e0
Interrupted create swapchain
Interrupted get swapchain images 0
Interrupted get swapchain images 3
queue 0x5578e7a60390
swapchain 0x5578e7b370e0
format 44
device 0x5578e7a4f200
before creating descriptor Pool 
set count 3
after creating descriptor Pool 
before allocating descriptor Sets 1
before writing descriptor Sets 
before writing descriptor Sets 
before writing descriptor Sets 
0x5578e76dfbe0
0
0x20
0x5578e7b86680
0x5578e7b8d190
0x5578e7b94cb0
after allocateCommandBuffer 
0x5578e7b86680
0x5578e7b8d190
0x5578e7b94cb0
before begin commandbuffer 0x5578e7b86680
before command buffer step 1
before command buffer step 2
before command buffer step 3
before command buffer step 4
before ending command buffer
before begin commandbuffer 0x5578e7b8d190
before command buffer step 1
before command buffer step 2
before command buffer step 3
before command buffer step 4
before ending command buffer
before begin commandbuffer 0x5578e7b94cb0
before command buffer step 1
before command buffer step 2
before command buffer step 3
before command buffer step 4
before ending command buffer
0writen commandbuffer0x5578e7b86680
1writen commandbuffer0x5578e7b8d190
2writen commandbuffer0x5578e7b94cb0
Interrupted QueuePresentKHR with queue: 0x5578e7a60390
queue in device info: 0x5578e7a60390
zsh: segmentation fault (core dumped)  ENABLE_VKBASALT=1 vkcube
DadSchoorse commented 5 years ago

can someone test if this programm cas build.tar.gz does create a out.png file?

fluffykittyrevenge commented 5 years ago

It's an empty folder

DadSchoorse commented 5 years ago

castest.tar.gz man I am stupid

fluffykittyrevenge commented 5 years ago

Yes, it creates out.png.

out

Ahmed-E-86 commented 5 years ago

This build will not solve the problem, but could give me some info, so please try it: vkBasalt.tar.gz

I tested one game, and it works fine for me. I use AMD HD 8750M (Mesa 19.2.99)

DadSchoorse commented 5 years ago

@ahmed-elsayed2017 really? does it look different?

@fluffykittyrevenge thanks, this mean the undefined behavior works on amd and there is a different problem. At this point I have no clear Idea, what to... Maybe I should by a cheap Amd gpu and test my self.

Ahmed-E-86 commented 5 years ago

@ahmed-elsayed2017 really? does it look different?

Yeah. I noticed the difference from the intro video. The colors are so vivide. It is like using ReShade, and there is more terminal outputs than the usual.

DadSchoorse commented 5 years ago

@fluffykittyrevenge @clapbr, can someone of you test this build and see if this fixes it? https://github.com/DadSchoorse/vkBasalt/files/3748220/vkBasalt.tar.gz

@ahmed-elsayed2017 does this build work too?

Ahmed-E-86 commented 5 years ago

@fluffykittyrevenge @clapbr, can someone of you test this build and see if this fixes it? https://github.com/DadSchoorse/vkBasalt/files/3748220/vkBasalt.tar.gz

@ahmed-elsayed2017 does this build work too?

Yes, it does. I have just tried it now.

DadSchoorse commented 5 years ago

@ahmed-elsayed2017 then use that build, it should have better performance

fluffykittyrevenge commented 5 years ago

@fluffykittyrevenge @clapbr, can someone of you test this build and see if this fixes it? https://github.com/DadSchoorse/vkBasalt/files/3748220/vkBasalt.tar.gz

@ahmed-elsayed2017 does this build work too?

still segvaults

vkcube: amdvlk.txt radv.txt

hitman 2: hitman2-amdvlk.txt hitman2-radv.txt

Figured I'd add some variety to the mix :cat2:

Ahmed-E-86 commented 5 years ago

@ahmed-elsayed2017 then use that build, it should have better performance

Ok, Thanks. Could you please add .deb releases in the future?

DadSchoorse commented 5 years ago

Man I am a bit lost, I am going to sleep now and see If come up if an idea next week.

fluffykittyrevenge commented 5 years ago

No problems. I'll keep an eye on my notifications in case you want more testing.

DadSchoorse commented 5 years ago

Could everybody try 0.0.4 and see if this fixes it?

alex9k1 commented 5 years ago

Could everybody try 0.0.4 and see if this fixes it?

vkcube is working now. I'll test other applications later.

fluffykittyrevenge commented 5 years ago

That fixes it for me with vkcube and games, though for some reason the effect isn't applied on vkcube with AMDVLK. I can tell that it is working in the games since I tested everything in this post with RADV & AMDVLK with vkBasalt enabled and disabled.

With Hitman 2 (DXVK), it works great. Notice how the trees and bushes look sharper and lose a bit of blur. No vkBasalt: hitman2-no_vkbasalt

With vkBasalt: hitman2-with_vkbasalt

With Mad Max (native), it works, notice the details of the car and how Max isn't blurry, but it makes it so dark that the gamma needs to be turned all the way up (it could actually go another 10-20% more than the game allows). No vkBasalt, Gamma 50: MadMax_no-vkBasalt

With vkBasalt, Gamma 100: MadMax_with-vkBasalt

RADV/AMDVLK makes no difference in regards to the in-game darkness with MadMax.

Just wanted to add: Thanks.

DadSchoorse commented 5 years ago

Ok, I will close this for now.