Graphics
Intel® graphics drivers and software, compatibility, troubleshooting, performance, and optimization
20589 Discussions

vkCreateSwapchainKHR performance

compaqdrew
Beginner
1,688 Views

Not sure if this is the correct section, I didn't see a Vulkan-specific forum or a developer-specific graphics one.

 

I am writing a vulkan application.  I have noticed poor performance in window resizing, and traced the problem down to driver time inside vkCreateSwapchainKHR.  On my system this call takes one second, which seems like... quite a long time for drawing one frame?

My questions are:

1.  Is >1 second the expected time for vkCreateSwapchainKHR?

2.  Is there any way to get visibility into what the driver is doing that would illuminate a faster path?

3.  Is there some other best practice for implementing window resizing on intel's vulkan driver?

 

To reproduce,

1.  Checkout this repo

2.  Compile/run with `cargo run --bin 22`  Can provide built executable upon request.

3.  Drag to resize the window

 

Configuration:

Windows 11 22000

UHD Graphics 770

Driver version 30.0.101.1002

 

0 Kudos
10 Replies
JosueO_Intel
Moderator
1,675 Views

Hello,


Thank you for posting on the Intel®️ communities. In order to have a better understanding of the issue, please share with us the following information: 


  1. Is this for a software developing company?


Regards, 


Josue O.  

Intel Customer Support Technician



0 Kudos
compaqdrew
Beginner
1,667 Views

Yes, this is a small ISV porting their application for intel GPUs.  The company has no formal relationship with intel, just bought a few units at retail for development purposes.

0 Kudos
JosueO_Intel
Moderator
1,665 Views

Thank you for the information provided, in this case, have you tried testing a different brand GPU to check if the issue persists? 



Regards, 


Josue O.  

Intel Customer Support Technician



0 Kudos
compaqdrew
Beginner
1,660 Views

We don't have this issue on AMD drivers.  vkCreateSwapchainKHR is slower than we'd like on AMD's driver, but AMD's driver is 15ms and intel's is 1000ms, so that's 60x slower on intel.

Obviously different vendors have different drivers which perform differently etc.  It's a little difficult to ascertain how slow a call can be before it's a bug.

My intuition though is there should be a way to resize a window above 1fps.  But this secret is unknown to me and evidently unknown to popular vulkan sample projects.  Has intel published any vulkan sample code that shows a window resizing?  Or are there any tools to profile the intel driver that might shed light on what it is doing?

 

 

 

0 Kudos
JosueO_Intel
Moderator
1,650 Views

Thank you for the information provided, in this case, please provide us with a short video with the specific instructions to try to reproduce the issue. 


Also, please download and install the Intel®️ System Support Utility (Intel®️ SSU):

https://downloadcenter.intel.com/download/25293/Intel-System-Support-Utility-for-Windows- 

Open the application and select "Everything" click on "Scan" to see the system and device information. By default, Intel®️ SSU will take you to the "Summary View". Click on the menu where it says "Summary" to change to "Detailed View".  

Click on "Next", save the report and attach it to your response.



Regards, 


Josue O.  

Intel Customer Support Technician



0 Kudos
compaqdrew
Beginner
1,645 Views

I have attached the information requested.  As you can see, framerate drops precipitously when the window is resized.

 

I also tried the Intel Graphics Performance Analyzer which is evidently the recommended workflow for debugging driver behavior.  Interestingly, the behavior with the Graphics Monitor enabled is substantially different.  While still not as fast as I'd like, vkCreateSwapchainKHR becomes 20-40ms rather than 1000ms+, an obvious and substantial change.

 

For a performance analyzer, changing the performance of the thing being analyzed isn't ideal.  I assume Graphics Monitor knows some trick to enable a higher power mode, or something.  I looked briefly into thread priority, power management and didn't uncover whatever the trick is.

 

I also studied the trace itself (which may not be useful as the performance is veeeery different than what I see just running the program).  It's tough to interpret, but my overall impression is it's bottlenecked by some kind of synchronization stall between CPU/GPU.  The trace suggests that vkCreateSwapchainKHR, vkDestroySwapchainKHR returns line up with the FlipWait interval and so perhaps these functions are stalled by vblank (and it seems some multiple of vblanks, so calls to vkCreateSwapchainKHR have durations in multiples of vblank).  Separately the vblanks and therefore the return from vkCreateSwapchainKHR etc. coincide with many suspicious synchronization primitives such as waitForSingleObjectEx, waitForMultipleObjectsEx, WaitOnAddress, so I imagine there is some stall in here.

 

I can potentially dig into the trace a bit more on my side to see if I can understand the stall and eliminate some dependency.  However, the fact that it performs differently with Graphics Monitor is still a big wildcard, so it's unclear to me if it that strategy will impact the program's performance just running normally.

0 Kudos
JosueO_Intel
Moderator
1,641 Views

Hello compaqdrew,


Thank you for the information provided.  


I will proceed to check the issue internally and post back soon with more details. 


Regards, 


Josue O.  

Intel Customer Support Technician



0 Kudos
JosueO_Intel
Moderator
1,621 Views

Hello compaqdrew,


In this case, please try performing a clean installation using the latest driver provided by the OEM (version 30.0.100.9833), you can download it here: 

https://www.asus.com/Motherboards-Components/Motherboards/PRIME/PRIME-Z690-P-WIFI-D4/HelpDesk_Download/


In case the driver doesn't solve the issue, please, just for testing purposes, try driver version 30.0.100.9805.


https://www.intel.com/content/www/de/de/download/19344/646152/intel-graphics-windows-dch-drivers.html


If none of those drivers work, please try our latest generic driver, you can download it here:

 

https://www.intel.com/content/www/de/de/download/19344/intel-graphics-windows-dch-drivers.html


You can find the instructions for the clean install on our article "Clean Installation of Intel® Graphics Drivers in Windows*" 


https://www.intel.com/content/www/us/en/support/articles/000057389/graphics.html


Regards, 


Josue O.  

Intel Customer Support Technician



0 Kudos
JosueO_Intel
Moderator
1,608 Views

Hello compaqdrew,


Were you able to check the previous post?  

Let us know if you still need assistance.


Regards, 


Josue O.  

Intel Customer Support Technician



0 Kudos
JosueO_Intel
Moderator
1,600 Views

Hello compaqdrew,


We have not heard back from you, so we will close this thread. If you need any additional information, please submit a new question as this thread will no longer be monitored. 


Regards, 


Josue O.  

Intel Customer Support Technician



0 Kudos
Reply