Unity-Technologies / Unity-Technologies/NativeRenderingPlugin
Does AccessRenderBufferTexture of Vulkan Plugin API can transition image layout?
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 943
- Forks
- 186
- PR merge metrics
- No merged PRs in 30d
Description
UnityVulkanImage image;
if (!m_UnityVulkan->AccessRenderBufferTexture((UnityRenderBuffer)data->colorBuffer, UnityVulkanWholeImage, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, VK_ACCESS_SHADER_READ_BIT, kUnityVulkanResourceAccess_PipelineBarrier, &image))
{
UnityLog("failed to access rendertexture color buffer");
return;
}
after calling the API, I print the image.layout, it's VK_IMAGE_LAYOUT_UNDEFINED type instead of VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL. Because I want to sample the texture, so the image layout out must be VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL.
Do I need to transition image layout manully?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the AccessRenderBufferTexture call shown in the issue and trace how the UnityVulkanImage layout is populated after the call. Compare the requested Vulkan layout and access parameters with the plugin API behavior and relevant Vulkan image-layout documentation. Done means establishing whether the API performs the transition or whether callers must do it manually, with the expected behavior documented or corrected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, unity
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100