• Advertisement
Sign in to follow this  

Modify Inputs to Functions in Metal

This topic is 413 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Perhaps a bit ironic for an Apple Inc. employee whose job is to optimize Metal to be asking about Metal, but I don’t actually start for another week (can’t just lean over and ask) and for some reason I can’t post on the Apple Developer Forums.
I need to know how to pass “output” values to a function in Metal.  These would be examples of what I want to do:
 
HLSL:
void Func( out float4 ModMe ) {
   ModMe = float4( 1, 2, 3, 4 );
}
C++:
void Func( float4 &ModMe ) {
   ModMe = float4( 1, 2, 3, 4 );
}
Metal does not seem to have a way to do this as far as I can tell.
Anyone know?


L. Spiro Edited by L. Spiro

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement