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

Add VK_EXT_pageable_device_local_memory support #5246

Open
wants to merge 27 commits into
base: master
Choose a base branch
from

Conversation

whyb
Copy link
Contributor

@whyb whyb commented Dec 25, 2023

Add VK_EXT_pageable_device_local_memory support

Why do this change?

If the VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT::pageableDeviceLocalMemory feature is enabled, memory allocations made from a heap that includes VK_MEMORY_HEAP_DEVICE_LOCAL_BIT in VkMemoryHeap::flags may be transparently moved to host-local memory allowing multiple applications to share device-local memory. If there is no space left in device-local memory when this new allocation is made, other allocations may be moved out transparently to make room. The operating system will determine which allocations to move to device-local memory or host-local memory based on platform-specific criteria. To help the operating system make good choices, the application should set the appropriate memory priority with VkMemoryPriorityAllocateInfoEXT and adjust it as necessary with vkSetDeviceMemoryPriorityEXT. Higher priority allocations will moved to device-local memory first.

If the VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT structure is included in the pNext chain of the VkPhysicalDeviceFeatures2 structure passed to vkGetPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT can also be used in the pNext chain of VkDeviceCreateInfo to selectively enable these features.

How to use it?

  • update create_gpu_instance()
  • append some codes, like this...
    圖片

whyb and others added 26 commits May 16, 2023 10:16
@github-actions github-actions bot added the core label Dec 25, 2023
@tencent-adm
Copy link
Member

tencent-adm commented Dec 25, 2023

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ nihui
❌ whyb
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov-commenter
Copy link

codecov-commenter commented Dec 25, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.53%. Comparing base (7cc8910) to head (70c6f49).
Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #5246       +/-   ##
===========================================
- Coverage   94.63%   89.53%    -5.10%     
===========================================
  Files         778      318      -460     
  Lines      243361    96127   -147234     
===========================================
- Hits       230302    86072   -144230     
+ Misses      13059    10055     -3004     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants