Skip to content

Apple: Enable iOS Imaging support #3160

Closed
dgovil wants to merge 4 commits intoPixarAnimationStudios:devfrom
dgovil:ios-imaging
Closed

Apple: Enable iOS Imaging support #3160
dgovil wants to merge 4 commits intoPixarAnimationStudios:devfrom
dgovil:ios-imaging

Conversation

@dgovil
Copy link
Copy Markdown
Collaborator

@dgovil dgovil commented Jul 11, 2024

Description of Change(s)

This PR ports Thor's imaging changes against the latest dev. This should enable imaging on all iOS derivatives, including visionOS.
I think I got everything, and it does build/run for me, but as mentioned I haven't done significant testing just yet.

I think we can use this branch to iterate the changes for imaging as needed.

Fixes Issue(s)

  • I have verified that all unit tests pass with the proposed changes
  • I have submitted a signed Contributor License Agreement

@jesschimein
Copy link
Copy Markdown
Collaborator

Filed as internal issue #USD-9841

@jesschimein
Copy link
Copy Markdown
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Comment thread pxr/imaging/hgiGL/CMakeLists.txt
// to our original, private texture.

// Modify texture descriptor to describe the temp texture.
#if defined(ARCH_OS_OSX)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we have a comment here about why the Mode is not the same on desktop and embedded? I realize Managed isn't available on iOS but why aren't both Shared?

Copy link
Copy Markdown
Collaborator Author

@dgovil dgovil Aug 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll double check with Thor if there's any other reason, but afaik it's because Managed is required for older Macs with a dGPU (AMD/NVIDIA but not Intel).

A better check would probably be to use hasUnifiedMemory, instead of the ifdef.

However, I am torn on whether its best to leave Mac behaviour alone for now and address it in a future PR, so that we can keep the scope of this PR tight? Let me know how you feel, and I can put it in this PR if you prefer

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked with Thor, and it is the reason above. Anyway, I'll wait to hear back from you before I add a comment or just swap to the unifiedMemory check which should then be self explanatory.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbh I'd prefer we switch to the check because I worry that such a minor detail might just slip away for more months. @davidgyu any thought on this?

Copy link
Copy Markdown
Collaborator Author

@dgovil dgovil Aug 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. I made the change after discussing with a few folks who seem confident it shouldn't cause issues.
Unfortunately I do not have a Mac with an intel gpu to test on, but it seems to be working fine on Apple Silicon Macs, so I think we should be good.

I don't have a good benchmark scene, but I suspect it'll be slightly faster too with this change now.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that suggestion @meshula. I might be able to check for correct behavior on my stash of old macOS systems with Intel and AMD GPUs.

@dgovil
Copy link
Copy Markdown
Collaborator Author

dgovil commented Aug 8, 2024

I need to fix up some issues the arose from rebasing. Fixing it up now, and should have it good to go soon.

@dgovil
Copy link
Copy Markdown
Collaborator Author

dgovil commented Aug 8, 2024

With some of the changes in 24.8, I'm just going to close this PR and re-open it later once I can resolve some things. Seems like its a little more involved than I thought.

@dgovil dgovil closed this Aug 8, 2024
@dgovil
Copy link
Copy Markdown
Collaborator Author

dgovil commented Aug 8, 2024

Okay that actually was less involved than I thought.
It required a patch to MaterialX (thanks Maddy, and I'll look into mainlining it) and some linker changes.

I'll resubmit this PR because it won't let me re-open this for some reason.

@dgovil
Copy link
Copy Markdown
Collaborator Author

dgovil commented Aug 8, 2024

Re-opened here #3215

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants