Associate command encoding with a queue#1278
Conversation
|
My concerns with this are:
I think I'm slightly in favor of keeping createCommandEncoder where it is, but adding an optional |
|
+1 to @kainino0x's concerns. (and I think we'd like reusable command buffers at some point, but IDK how well it would work in wgpu to have them work for all queue types) |
|
Let me try to downplay the concerns :)
Command encoders are created in only a few places by the code. Most command recording in the apps is expected to work with an existing encoder. So we are talking about just a few
Right. We could have a discussion about queue families. It would need to be resolved before we proceed with the PR.
First time I'm hearing about this. Note that "reusability" of command buffers can be implemented without the "virtual" aspect, and it will likely be more efficient, since it would use
Are you talking about a member of |
kainino0x
left a comment
There was a problem hiding this comment.
Are you talking about a member of
GPUCommandEncoderDescriptor? I suppose it would be a nullable member then.
It sounds good in this case, I haven't thought of that.
Yes, exactly, sorry for the typo.
Kangz
left a comment
There was a problem hiding this comment.
Having queue in the descriptors LGTM
|
Consider this blocked on #1977 |
|
Editors discussion: we'd want to know how multi-queue works with queue families. If WebGPU exposes queue families, it would be a better API to have With this in mind, our recommendation is to not proceed with this PR for now. Instead, try to think more about how multi-queue is exposed, possibly basing off #1306 in the direction that DX12 does it. |
…1417) This PR adds unimplmented stubs for the read-write-modify atomic operations. * `atomicAdd` * `atomicAnd` * `atomicCompareExchangeWeak` * `atomicExchange` * `atomicMax` * `atomicMin` * `atomicOr` * `atomicSub` * `atomicXor` Issue gpuweb#1275, gpuweb#1276, gpuweb#1277, gpuweb#1278, gpuweb#1279, gpuweb#1280, gpuweb#1281, gpuweb#1282, gpuweb#1283
This is one of the API changes that we probably need in order to be ready for multi-queue support down the road (#1169 and friends).
Investigation bits:
VkCommandPool, creating which requires a queue family index to be specified: https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCommandPoolCreateInfo.html . If we aren't exposing the queue families (and I don't think it's been really considered so far), then we have to associate a command encoder/buffer with a queue.MTLQueue: https://developer.apple.com/documentation/metal/mtlcommandqueue/1508686-makecommandbufferD3D12_COMMAND_LIST_TYPE. There isn't either a queue, or a queue family required, as far as I see. However, it also allows creation of any number of queues of a type. Therefore, I see each queue type as a distant analogy to Vulkan's queue family.Preview | Diff