Vulkan & Native Rendering Plugin

The current implementation of IUnityGraphicsVulkanV2 doesn’t give information about the sample count of the active render pass.

This makes impossible to implement a native plugin in Vulkan compatible with different MSAA configurations. At least, not in an easy and generic way. The provided example in GitHub has also this issue because VK_SAMPLE_COUNT_1_BIT is hardcoded.

I think, UnityVulkanRecordingState could be extended to provided this information.

Thanks!

Bumping this.

@aleksandrk could you please indicate who we should talk to regarding this and in general for issues about native rendering plugins (we have found many issues in the past)

Can you maybe query it from Vulkan directly?

All I can say is good luck. I have been wanting to have changes fixed for a long time. They don’t even seem to answer bug reports anymore.

Regarding your question, can’t you just send it over from your C# code? By calling : https://docs.unity3d.com/ScriptReference/Rendering.CommandBuffer.IssuePluginEventAndData.html

1 Like

Yes, I could do that but our scenario is a bit more complex than this because we are a plugin. And we need to support all combinations of pipelines and cameras and the safest and cleanest would be receiving that information for the active render pass.

This request makes sense, we should be able to add this.

A potential workaround could be to use the hooking api of the Vulkan plugin api and use that to keep a map of renderpass->sample count around. It will require the plugin to be preloaded, so not sure if that’s feasible.

Hi Florian, thanks for your answer.

What would be the best way to request and track this feature?

And thanks for the suggestion about preloading. We will try that.

We also have similar suggestions for D3D12 and a few bugs and in general we are missing a place to discuss about native plugins. Not sure what would be the best contact for this. I think we are one of the biggest native plugins in Unity and our code is plagued with workarounds. :slight_smile:

Public feature requests should go to https://portal.productboard.com/8ufdwj59ehtmsvxenjumxo82/c/1181-didn-t-find-what-you-were-looking-for?utm_medium=social&utm_source=portal_share but as far as I know there is no way for you to track the status.
If you decide to give this a shot it would probably be good to include links to related forum threads.

Btw I did create an internal ticket for the issue you described here but there is no direct way for you to track this.

Thank you! I will create a new thread for similar problems with D3D12 soon.

@florianpenzkofer I have created two extra threads for more issues about native plugins. Wondering if you could help us too. Thank you!