Post

Replies

Boosts

Views

Activity

Reply to Any way to implement a lock in Metal Shader Language?
Thank you very much for your reply. You are right on both counts - I originally had the ! since it was implemented as a "while" loop, and I forgot to change this when I altered to a "for" loop. As you predicted, however, it still doesn't work - I still have a race condition on the threads where the locks appear to be set, and some threads never get to set the lock. I can't see how to do this inside Metal - fences seem to work between encoders, rather than inside a kernel. Is this a current limitation of Metal or are there techniques for solving this? Thank you again, Colin
Topic: Graphics & Games SubTopic: General Tags:
Jul ’22
Reply to Bound Buffer Memory Leak
Thank you very much - that solved the problem. I hadn't come across autoreleasepool before - reading up on this, this needs to be used if objects are created based on older (Objective-C based) frameworks. Thank you again. Colin
Topic: Graphics & Games SubTopic: General Tags:
Jun ’22
Reply to GPU Timeout Error
I've finally figured this out - I was using a do while loop to control the iterations - I switched this to a for loop with a break statement - this solved all the issues. Not sure exactly what is the reason, but there must be something that metal does with a do while loop that uses more resources.
Topic: Graphics & Games SubTopic: General Tags:
Jun ’22