Skip to content
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

vk: optimize headless swapchain #7264

Merged
merged 2 commits into from
Oct 19, 2023
Merged

vk: optimize headless swapchain #7264

merged 2 commits into from
Oct 19, 2023

Conversation

poweifeng
Copy link
Contributor

  • Remove queue submit call when using headless swapchain. It was meant to emulate a real swapchain, but queue submits are expensive.
  • Add option to remove flush and wait when window resizes. If a headless platform uses this signal to refresh the swapchain, we don't necessarily need it to also flush and wait before the refresh.
  • Refactor VulkanPlatform customizations

@poweifeng poweifeng added the internal Issue/PR does not affect clients label Oct 13, 2023
@poweifeng poweifeng force-pushed the pf/vk-config-mem-vals branch from e896523 to 1640748 Compare October 13, 2023 18:06
* `vkEnumeratePhysicalDevices`. -1 by default to indicate no preference.
*/
struct GPUPreference {
std::string deviceName;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We try to not rely on the STL in our public headers. I would use utils::CString here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@poweifeng poweifeng force-pushed the pf/vk-config-mem-vals branch from 94ceddd to 09d5bcc Compare October 16, 2023 20:43
 - Remove queue submit call when using headless swapchain. It was meant
   to emulate a real swapchain, but queue submits are expensive.
 - Add option to remove flush and wait when window resizes. If a
   headless platform uses this signal to refresh the swapchain, we
   don't necessarily need it to also flush and wait before the refresh.
 - Refactor VulkanPlatform customizations
@poweifeng poweifeng force-pushed the pf/vk-config-mem-vals branch from 09d5bcc to bb4c246 Compare October 16, 2023 20:45
@poweifeng poweifeng merged commit 960c617 into main Oct 19, 2023
11 checks passed
@poweifeng poweifeng deleted the pf/vk-config-mem-vals branch October 19, 2023 18:43
poweifeng added a commit that referenced this pull request Nov 3, 2023
We removed the no-op queue submit for headless in PR #7264. This
means that a semaphore will not be waited on and caused a
validation error.  Here, we simply don't acquire that semaphore
for present.

Also reorganzied the pSempaphores array code for better
readability.

Fixes #7334
poweifeng added a commit that referenced this pull request Nov 3, 2023
We removed the no-op queue submit for headless in PR #7264. This
means that a semaphore will not be waited on and caused a
validation error.  Here, we simply don't acquire that semaphore
for present.

Also reorganzied the pSempaphores array code for better
readability.

Fixes #7334
poweifeng added a commit that referenced this pull request Nov 3, 2023
We removed the no-op queue submit for headless in PR #7264. This
means that a semaphore will not be waited on and caused a
validation error.  Here, we simply don't acquire that semaphore
for present.

Also reorganzied the pSempaphores array code for better
readability.

Fixes #7334
poweifeng added a commit that referenced this pull request Nov 4, 2023
We removed the no-op queue submit for headless in PR #7264. This
means that a semaphore will not be waited on and caused a
validation error.  Here, we simply don't acquire that semaphore
for present.

Also reorganzied the pSempaphores array code for better
readability.

Fixes #7334
plepers pushed a commit to plepers/filament that referenced this pull request Dec 9, 2023
 - Remove queue submit call when using headless swapchain. It was meant
    to emulate a real swapchain, but queue submits are expensive.
 - Add option to remove flush and wait when window resizes. If a
    headless platform uses this signal to refresh the swapchain, we
    don't necessarily need it to also flush and wait before the refresh.
 - Refactor VulkanPlatform customizations
plepers pushed a commit to plepers/filament that referenced this pull request Dec 9, 2023
We removed the no-op queue submit for headless in PR google#7264. This
means that a semaphore will not be waited on and caused a
validation error.  Here, we simply don't acquire that semaphore
for present.

Also reorganzied the pSempaphores array code for better
readability.

Fixes google#7334
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Issue/PR does not affect clients
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants