Conversation
|
Clarification to the second point: we can't actually use the render pass directly created for |
|
I don't think we want to do this: the consensus in the group was to go with "fat pipeline objects" so This would mean implementation need to keep a cache of renderpasses see for example this part of Dawn https://dawn.googlesource.com/dawn/+/master/src/dawn_native/vulkan/RenderPassCache.h |
|
@Kangz wait, do you mean that you want to remove the
Can you remind me of what this means for us? A WeGPUPipelineState no longer corresponding 1:1 to the native pipeline?
Right, I do agree that somewhere there's got to be a cache of renderpasses, as I indicated in the previous comment. However, I don't quite like the idea of a global cache per device, as done in Dawn. If |
16: [WIP] render pass begin/end r=grovesNL a=kvark Depends on gpuweb/gpuweb#91 and gpuweb/gpuweb#92 Co-authored-by: Dzmitry Malyshau <kvark@mozilla.com>
|
Yes I suggest removing Right now pipeline objects are made of a number of pre-built objects like |
|
@Kangz ok, that "fat pipeline object" definition is fine, but I'd argue that the attachments state is not a part of the render pipeline descriptor. The relation should be one to many, as in: a single |
|
This is fair, how about we discuss it quickly in the next meeting? Either way would work well for us. |
|
@Kangz sure! Too bad our next meeting is in a whole week from now :/ |
dictionary WebGPURenderPassColorAttachmentDescriptor {
WebGPUTextureView attachment;
...
};
dictionary WebGPURenderPassDescriptor {
WebGPUAttachmentsState attachmentsState;
sequence<WebGPURenderPassColorAttachmentDescriptor> colorAttachments;
...
};Seems redundant. If we know what the textures are themselves, there's no need to pass in an attachmentsState. |
|
Right now, |
|
Closing in favor of #102, which we agreed on during the call. Thanks everyone for feedback! |
This PR is based on #91
Actual changes (one line!) are in the second commit.
Fixes #103
I propose to include the attachment state into the render pass descriptor for the following reasons:
VkRenderPasswhen starting one, andWebGPUAttachmentsStateis what represents a render pass. We could try deriving it based on the formats of the render targets provided, but this seems rather backwards... say, what if the user created two differentWebGPUAttachmentsStateobjects from the same inputs? Do we then require the implementation to de-duplicate those? TL:DR; I think it's possible to work around, but it doesn't worth it - the user should clearly be aware of the attachment state they plan to use at this point.