mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 02:15:43 +00:00
Add RenderEncoderBase to match WebGPU class hierarchy.
This is needed so that RenderBundleEncoder and RenderPassEncoder can share code. This patch also moves EndPass out of ProgrammablePassEncoder and into both RenderPassEncoder and ComputePassEncoder. Render bundles do not have EndPass. Bug: dawn:154 Change-Id: Ib7126b2ba718b0b93e3d6f15c429ac910c0d5d31 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9180 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
c0b8132f55
commit
69f1db7248
@@ -39,6 +39,15 @@ namespace dawn_native {
|
||||
return new ComputePassEncoderBase(device, topLevelEncoder, ObjectBase::kError);
|
||||
}
|
||||
|
||||
void ComputePassEncoderBase::EndPass() {
|
||||
if (mTopLevelEncoder->ConsumedError(ValidateCanRecordCommands())) {
|
||||
return;
|
||||
}
|
||||
|
||||
mTopLevelEncoder->PassEnded();
|
||||
mAllocator = nullptr;
|
||||
}
|
||||
|
||||
void ComputePassEncoderBase::Dispatch(uint32_t x, uint32_t y, uint32_t z) {
|
||||
if (mTopLevelEncoder->ConsumedError(ValidateCanRecordCommands())) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user