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

[Vulkan][Refactor] Move ownership of per-CPU-thread objects to VulkanDeviceAPI #8196

Merged
merged 6 commits into from
Jun 11, 2021

Commits on Jun 7, 2021

  1. [Vulkan][Refactor] Moved VulkanStream ownership from VulkanThreadEntr…

    …y to VulkanDevice
    
    - Implemented ThreadMap, a container for per-thread objects.  Unlike
      dmlc::ThreadLocalStore, ThreadMap is intended for use as a
      non-static thread-specific lookup.
    
    - Added ThreadMap<VulkanStream> as a member to VulkanDevice, updated
      all uses.
    Lunderberg committed Jun 7, 2021
    Configuration menu
    Copy the full SHA
    85a85d8 View commit details
    Browse the repository at this point in the history
  2. [Vulkan][Refactor] Pulled VulkanBuffer allocation/deallocation into c…

    …onstructor/destructor.
    
    - VulkanBuffer owns the VkBuffer and VkDeviceMemory that it allocates,
      and deallocates on destruction.
    
    - VulkanHostVisibleBuffer owns a VulkanBuffer, and additional calls
      vkUnmapMemory on destruction.
    Lunderberg committed Jun 7, 2021
    Configuration menu
    Copy the full SHA
    b8f0e29 View commit details
    Browse the repository at this point in the history
  3. [Vulkan][Refactor] Move the VulkanStagingBuffer to be owned by the Vu…

    …lkanDevice
    
    - Previously, was owned by VulkanThreadEntry, so any use required
      looking up both the thread entry and the device.  Now,
      thread-specific lookup is handled in the VulkanDevice class.
    Lunderberg committed Jun 7, 2021
    Configuration menu
    Copy the full SHA
    8282abb View commit details
    Browse the repository at this point in the history
  4. [Vulkan][Refactor] Move ownership of per-thread uniform buffer to Vul…

    …kanDevice
    
    - Previously, VulkanUniformBuffer was owned by VulkanThreadEntry, so
      any use required looking up both the thread entry and the device.
      Now, thread-specific lookup is handled in the VulkanDevice class.
    Lunderberg committed Jun 7, 2021
    Configuration menu
    Copy the full SHA
    92c1e27 View commit details
    Browse the repository at this point in the history
  5. [Vulkan][Refactor] Moved ownership of per-thread workspace pool to Vu…

    …lkanDeviceAPI
    
    - Previously, the WorkspacePool was owned by VulkanThreadEntry, and
      required a lookup from VulkanDeviceAPI::AllocWorkspace.  As a
      result, non-global VulkanDeviceAPI would interact with each other.
    Lunderberg committed Jun 7, 2021
    Configuration menu
    Copy the full SHA
    7e100df View commit details
    Browse the repository at this point in the history
  6. [Vulkan][Refactor] Moved ownership of per-thread active device id to …

    …VulkanDeviceAPI
    
    - Previously, the active device was owned by VulkanThreadEntry, so
      lookups to multiple global variables were required.  Now, everything
      goes from the VulkanDeviceAPI.
    
    - Removed VulkanThreadEntry, as all functionality has been moved to
      either VulkanDevice or VulkanDeviceAPI.
    Lunderberg committed Jun 7, 2021
    Configuration menu
    Copy the full SHA
    5b224b5 View commit details
    Browse the repository at this point in the history