Search Unity

Render passes for Vulkan native plugins

Discussion in 'General Graphics' started by williamih-resolve, Apr 1, 2022.

  1. williamih-resolve

    williamih-resolve

    Joined:
    Feb 4, 2021
    Posts:
    6
    Hi,

    I'm working on a C++ native plugin using Vulkan.

    I noticed the Unity native plugin example project with Vulkan at https://github.com/Unity-Technologi...ster/PluginSource/source/RenderAPI_Vulkan.cpp states that Unity does not destroy render pass objects in Vulkan (line 646 of this file).

    I just want to confirm if this is officially guaranteed behaviour that we can rely on (and not just an implementation detail of a particular Unity version)? That is, if Unity passes the native plugin a VkRenderPass object in the UnityVulkanRecordingState struct, are we guaranteed that Unity will not later destroy the same VkRenderPass object while the native plugin is still being used?

    Many thanks!