OpenUSD icon indicating copy to clipboard operation
OpenUSD copied to clipboard

Autodesk: HgiPresent

Open erikaharrison-adsk opened this issue 1 year ago • 2 comments

Description of Change(s)

⚠️ This is a WIP PR

  • Add HgiPresent
    • For now only implement Vulkan presentation for window presentation
    • Metal presentation will come later
  • Make HgiInterop an implementation of HgiPresent
  • Update HgiInterop to be more consistent about its composition parameters
  • Update HdxPresentTask to use HgiPresent instead of HgiInterop
  • Update HdxTaskController and UsdImagingGLEngine to support HgiPresent
  • Update all clients of UsdImagingGLEngine to default to HgiInterop presentation
  • Fix various symbol export issues I came across

Tested with:

  • Windows / WIN32 / NVIDIA
  • Windows / WIN32 / Lavapipe
  • Linux / X11 / Lavapipe
  • macOS / Metal / Lavapipe

Link to proposal (if applicable)

  • N/A

Fixes Issue(s)

  • N/A

Checklist

erikaharrison-adsk avatar Feb 25 '25 01:02 erikaharrison-adsk

Filed as internal issue #USD-10700

(This is an automated message. See here for more information.)

jesschimein avatar Feb 25 '25 19:02 jesschimein

/AzurePipelines run

jesschimein avatar Feb 25 '25 19:02 jesschimein

/AzurePipelines run

jesschimein avatar Mar 10 '25 17:03 jesschimein

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

azure-pipelines[bot] avatar Mar 10 '25 17:03 azure-pipelines[bot]

We talked about this during the meeting as a potential followup, but it'd be great to add a test executing the window present codepath.

clach avatar Mar 14 '25 21:03 clach

We talked about this during the meeting as a potential followup, but it'd be great to add a test executing the window present codepath.

I could try to implement a basic test for X11 specifically, as a proof-of-concept, and add other platform tests in another PR.

DDoS avatar Mar 17 '25 16:03 DDoS

/AzurePipelines run

jesschimein avatar Mar 17 '25 23:03 jesschimein

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

azure-pipelines[bot] avatar Mar 17 '25 23:03 azure-pipelines[bot]

/AzurePipelines run

jesschimein avatar Mar 18 '25 17:03 jesschimein

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

azure-pipelines[bot] avatar Mar 18 '25 17:03 azure-pipelines[bot]

/AzurePipelines run

jesschimein avatar Mar 25 '25 17:03 jesschimein

/AzurePipelines run

jesschimein avatar Mar 26 '25 19:03 jesschimein

Hi @erikaharrison-adsk , This is a really interesting PR. Would you be able to provide a description of what HgiPresent is and aims to achieve?

I believe I understand it from the submitted code, but having a high level overview would help to loop in some other reviewers as well.

dgovil avatar Mar 27 '25 17:03 dgovil

Hi @erikaharrison-adsk , This is a really interesting PR. Would you be able to provide a description of what HgiPresent is and aims to achieve?

I believe I understand it from the submitted code, but having a high level overview would help to loop in some other reviewers as well.

Hello @dgovil, the goal of this PR is to add native window presentation to HdxPresentTask, and a new Hgi level API to abstract over presentation. In it's most basic form, a UsdImagingGLEngine user can call engine->EnableWindowPresentation(window), where window is a handle to a window created and managed by the user, and expect that engine->Render() will present the final color AOV to the window without any additional intervention.

DDoS avatar Mar 27 '25 18:03 DDoS

Thanks!

dgovil avatar Mar 27 '25 18:03 dgovil