James-McCarthy-4
  • Joined on 2024-04-30
James-McCarthy-4 commented on pull request blender/blender#131085 2024-11-28 17:13:32 +01:00
Fix #130700: Release Metal resources after each frame when rendering Python animations.

It turns out I also needed to clear up the auto release pools for the render_step() fix to completely remove the high memory usage issues. I've added a new API to indicate that we need that to…

James-McCarthy-4 commented on pull request blender/blender#131085 2024-11-28 16:39:01 +01:00
Fix #130700: Release Metal resources after each frame when rendering Python animations.

I have a fix pending for the complete fix so hold off merging anything.

James-McCarthy-4 commented on pull request blender/blender#129686 2024-11-12 16:28:52 +01:00
Fix #129661: Wait for GPU to complete to avoid use-after-free issues.

@Jason-Fielder Please separate merge commits from the functional changes commits. It makes it easier to follow incremental changes to the PR.

Ah, apologies. Will do.

James-McCarthy-4 commented on pull request blender/blender#129951 2024-11-07 14:54:12 +01:00
Fix #126364: Metal: modified texture usage flags causing cache misses

I changed the naming of the variable so it matches our style guide.

Ah sorry. Every time I think I've got the hang of the Blender coding style it turns out...

James-McCarthy-4 commented on pull request blender/blender#129686 2024-11-04 15:39:20 +01:00
Fix #129661: Wait for GPU to complete to avoid use-after-free issues.

@Sergey: "The confusing part in the PR you've mentioned is that it explicitly mentions leaks identified by the instruments, so I thought those are about something much more hidden." You are…

James-McCarthy-4 commented on pull request blender/blender#129117 2024-11-04 15:08:10 +01:00
Fix: Metal: Memory leaks identified by Instruments and Xcode memory graph.

@Brainzman sure, that's fine. We have run into complications on large projects before when mixing C++ & Objective-C which has lead us to initially develop with ARC disabled as a pragmatic starting…

James-McCarthy-4 commented on issue blender/blender#129661 2024-11-01 15:19:22 +01:00
Blender 4.4 randomly crashes (heap-use-after-free)

The issue is we're tearing down the context before all GPU work has completed. I don't understand the interaction with 6da42e9c95

James-McCarthy-4 commented on pull request blender/blender#129117 2024-11-01 10:58:16 +01:00
Fix: Metal: Memory leaks identified by Instruments and Xcode memory graph.

@Jason-Fielder see my edit2. The retain count is set to 2 on creation for some reason and the API documentation specify that we should not rely on retainCount for debugging purpose. Maybe it…

James-McCarthy-4 commented on pull request blender/blender#125657 2024-09-27 17:41:25 +02:00
Metal: Add support for parallel compilation and precompilation specialisation

@fclem Implemented your suggested changes. Thanks for the pointers.

James-McCarthy-4 commented on pull request blender/blender#125657 2024-09-25 17:08:30 +02:00
Metal: Add support for parallel compilation and precompilation specialisation

I had to remove this and mtl_misc.hh to make it compile.

Ah yes. Sorry missed this when I deleted the files. Will fix and update.

Thanks for the verbose explanation about how to use the…

James-McCarthy-4 commented on pull request blender/blender#125657 2024-09-25 16:51:06 +02:00
Metal: Add support for parallel compilation and precompilation specialisation

Ah, too bad. One of the goals of batch compilation was to never block the UI. Ah no I've added it, it will now block on specialization_batch_is_ready if we were able to pre-compile the…

James-McCarthy-4 commented on pull request blender/blender#125657 2024-09-24 19:57:28 +02:00
Metal: Add support for parallel compilation and precompilation specialisation

I was unable to reproduce the crash in the initial comment, if anyone can offer any reliable ways of reproducing it that would be appreciated. The stack trace wasn't enough to isolate it.

_"The…

James-McCarthy-4 commented on pull request blender/blender#125657 2024-09-24 19:20:36 +02:00
Metal: Add support for parallel compilation and precompilation specialisation

Thanks, will change.

James-McCarthy-4 commented on pull request blender/blender#125657 2024-09-24 19:20:26 +02:00
Metal: Add support for parallel compilation and precompilation specialisation

Because the Metal backend has stricter requirements about when we can actually precompile a specialisation (we effectively need to know the render state for vertex and fragment shaders) I was…

James-McCarthy-4 commented on pull request blender/blender#125657 2024-09-24 19:20:25 +02:00
Metal: Add support for parallel compilation and precompilation specialisation

It's not strictly required because it's just adding the shader variations to the pipeline state cache which can be done asynchronously - you'll just pause when you come to use it if it's not ready…

James-McCarthy-4 commented on pull request blender/blender#125657 2024-09-24 19:20:23 +02:00
Metal: Add support for parallel compilation and precompilation specialisation

Thanks, will change.

James-McCarthy-4 commented on pull request blender/blender#125657 2024-09-24 19:20:20 +02:00
Metal: Add support for parallel compilation and precompilation specialisation

No, but it has been useful for testing purposes. The OGL backend allows it to be adjusted via the argument --gpu-compilation-subprocesses. We should probably hook that up to the Metal backend…

James-McCarthy-4 commented on pull request blender/blender#125657 2024-09-24 19:20:14 +02:00
Metal: Add support for parallel compilation and precompilation specialisation

Thanks, will change.

James-McCarthy-4 commented on pull request blender/blender#125657 2024-09-24 19:20:10 +02:00
Metal: Add support for parallel compilation and precompilation specialisation

Thanks, will change.

James-McCarthy-4 commented on pull request blender/blender#125657 2024-09-24 19:20:09 +02:00
Metal: Add support for parallel compilation and precompilation specialisation

Thanks, will change.