Search Unity

Feature Request Vulkan & Native Rendering Plugin

Discussion in 'General Graphics' started by jdesantos, Dec 12, 2022.

  1. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    312
    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.

    https://github.com/Unity-Technologi...PluginSource/source/RenderAPI_Vulkan.cpp#L388

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

    Thanks!
     
  2. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    312
    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)
     
  3. c0d3_m0nk3y

    c0d3_m0nk3y

    Joined:
    Oct 21, 2021
    Posts:
    671
    Can you maybe query it from Vulkan directly?
     
  4. joshuacwilde

    joshuacwilde

    Joined:
    Feb 4, 2018
    Posts:
    731
    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
     
    c0d3_m0nk3y likes this.
  5. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    312
  6. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    479
    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.
     
  7. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    312
    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. :)
     
  8. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    479
  9. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    479
    Btw I did create an internal ticket for the issue you described here but there is no direct way for you to track this.
     
  10. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    312
    Thank you! I will create a new thread for similar problems with D3D12 soon.
     
  11. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    312