cancel
Showing results for 
Search instead for 
Did you mean: 

OpenGL & Vulkan

tzdimi
Adept I

Latest driver 23.11.1 causes almost 50% performance drop in vulkan app.

Hi 

 After installing the latest driver 23.11.1 a custom vulkan app suddenly lost almost half of its performance. From 6000+ fps dropped to 3000+ fps.  I recompiled the app and the shaders but the problem still insists. After rolling back the driver in previous version (23.8.2) the problem disappears. I can provide any capture from Radeon Developer Tools if needed + renderdoc captures. It seems very strange because the app is very simple, it only loads a model (Crytek Nanosuit model) and draws it with a single vkCmdDrawIndexed with VK_POLYGON_MODE_LINE in rasterizer polygonMode.  Feature fillModeNonSolid is enabled during logical device creation and no validation errors are reported. 

amd-bug.jpg

15 Replies
dipak
Big Boss

Hi @tzdimi ,

Thanks for reporting it. I have whitelisted you and moved the post to the Vulkan forum.

Please share the gpu information. I will forward the issue to the Vulkan team. 

Thanks.

0 Likes
tzdimi
Adept I

Hi @dipak 

  Thanks for whitelisting! The GPU is a 6900XT. I also tested driver version 23.10.2 and the problem is on that driver to.

0 Likes

Thanks for the information. I have reported the issue to the Vulkan team.

Thanks.

0 Likes

Hi,

Can you provide your environment, vulkaninfo, and a compilable source for your app?

The renderdoc captures and any captures from Radeon Developer Tools would also be useful.

Thanks,

Owen

0 Likes
tzdimi
Adept I

Do you need renderdoc and rdp captures/vulkaninfo from both drivers? Also should I post them here as a zip file?

0 Likes

Yup, that would be good.

0 Likes

Unfortunately the forum does not allow me to post a file only photos/videos. Is it possible one 

of the admins to enable that option for my posts? 

Thanks

0 Likes

Hi @tzdimi ,

It seems like the file attachment option is not yet enabled for you. Once enabled, you will see the "Drag and drop here or browse files to attach" option while replying to a post. I have asked our community admin team to enable this option for you.

Please note, currently it supports max. file size 9MB. For larger files, you can use any public file hosting site to provide the files by sharing the download links.

Thanks.

0 Likes

The file attachment option has been enabled for you. Now, you should be able to attach/upload the files.

Thanks.

0 Likes
tzdimi
Adept I

I will upload the captures as soon as the the option becomes available.

I also have done some more research about this issue and from what I can see is that in driver 23.8.2 extension VK_KHR_win32_surface has more supported formats. In the latest driver 23.11.1 there are only 4 supported formats left and the minImageCount went from 1 to 2. In any case in my app I create the swapchain with minImageCount = 3 and I use as a format in both cases VK_FORMAT_R8G8B8A8_SRGB which is supported in both drivers. It seems like the swapchain or the surface is causing the issue.

0 Likes
tzdimi
Adept I

Here are the captures from RenderDoc/RDP and vulkaninfo. My dev environment is Windows 10 pro 22H2

CPU 5900x / 32GB ram.

https://drive.google.com/file/d/1-DIaezp-8oosQg-b4RbyRaKwYJ_CnIHo/view?usp=sharing

0 Likes

Hi @tzdimi ,

Can you also upload a compilable version of your source code?

Thanks,

Owen

0 Likes

Hi @tzdimi 

We did some digging and the difference is likely because since 23.9.2 we've enabled DXGI Swapchain by default, which introduces additional CPU overhead. However due to this your app is presenting in independent flip so the actual presentation FPS is higher as if full screen.

Previously with DWM, in windowed mode it's limited to vsync, so although it reports 6000fps, it's actually presenting at 60fps (or whatever refresh rate your monitor is). You can run your app with PresentMon to see this. With simple apps it's hitting the CPU ceiling, and due to the differences between DXGI and DWM, image is blocked longer with DXGI, while with DWM, there is an additional copy, so image is released immediately after copy. This shouldn't be as much of a factor as more work is done GPU side. While it may appear as though performance was lost, you're actually getting better performance and latency. 

Thanks,

Owen

0 Likes

Hi @Owen_Zhang 

Thanks for looking into this issue. Indeed the app is not a real life scenario as in most cases the gpu will have a lot more work to do. It was really strange to see that performance drop. 6000fps were not real presentation on the monitor (165Hz) but the app could run the "render-loop" at that rate :). So as I understand it there is increased time spent on vkAcquireNextImageKHR function or the corresponding semaphore that is used to trigger that image became available takes longer to signal?  

0 Likes

Hey @tzdimi 

It's a lower level process that's going on with windows manager. The app is probably measuring the time between each vkQueuePresentKHR call. When using DWM it will drop frames in between each vsync, keeping only the closest vsync so the driver does not block app. With DXGI the driver has to synchronize with the app's buffer so it blocks until buffer is offscreen.

Yeah at the API level, it's probably an increased vkAcquireNextImageKHR time, since the app only cares about when the swapchain buffer is released back to app, not the actual time at which KMD flips. Since DXGI flip needs to block longer, it appears to manifest as lower fps.

https://ocat.readthedocs.io/en/latest/

Is another good tool to measure performance.

0 Likes