-
Notifications
You must be signed in to change notification settings - Fork 967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of Metal MTLCommandBuffer directly. #3970
Comments
What is the reason for wanting to use the underlying I don't think we can guarantee a 1:1 mapping of wgpu objects to objects of one of our underlying platform APIs as there are extra invariants that wgpu needs to maintain which might require a one to many relationship. See also #3517 & #3966 - but even with these, it doesn't seem that the API is as permissive as you'd like it to be. |
The current application iOS code encodes multiple operations to the same That is, we want to be able to replace the underling components one by one. These components are performed on a Dividing these pipelines to multiple command buffers will result in substantial added complexity, and possibly running time (this is especially important when taking tiled-rendering into account). |
@AdrianEddy I did make use of this PR to define the device and command queue, but this issue is about encoding directly to a command buffer. |
Take a look at #4067 |
In some Metal based applications it makes sense to perform multiple calculations on the same
MTLCommandBuffer
.To make some of these calculations platform independent, I'd like to be able to perform them via WGPU. However, it doesn't seem to be possible with the current API.
I would like to be able to define (a single)
MTLCommandBuffer
in my Swift code, provide this command buffer to WGPU, and to encode commands to it (e.g. apply wgsl shaders to some texture), without commiting/submiting anything. The performcommit
in my Swift code.I tried to work around this by wrapping the
MTLCommandQueue
and providing theMTLCommandBuffer
s to the WGPU code myself, but it turns out that even before submitting anything, the WGPU code creates 3 different command buffers, and defining them in advance doesn't work.In any case, even if I managed to make it work, there's no guarantee that this solution will be stable...
The text was updated successfully, but these errors were encountered: