mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-19 18:05:31 +00:00
WebGPU error handling 5: Move CmdBufBuilder logic to CmdEncoder
This removes the CommandBufferBuilder and copies all the logic into CommandEncoderBase instead. No changes were done to the logic except for the implementation of CommandEncoderBase::HandleError and Finish. BUG=dawn:8 Change-Id: I7b6f44c3cf501477422f067bd277cef470073860 Reviewed-on: https://dawn-review.googlesource.com/c/4820 Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
3499d3ee97
commit
f20f5b9493
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "dawn_native/ComputePassEncoder.h"
|
||||
|
||||
#include "dawn_native/CommandBuffer.h"
|
||||
#include "dawn_native/CommandEncoder.h"
|
||||
#include "dawn_native/Commands.h"
|
||||
#include "dawn_native/ComputePipeline.h"
|
||||
#include "dawn_native/Device.h"
|
||||
@@ -22,13 +22,13 @@
|
||||
namespace dawn_native {
|
||||
|
||||
ComputePassEncoderBase::ComputePassEncoderBase(DeviceBase* device,
|
||||
CommandBufferBuilder* topLevelBuilder,
|
||||
CommandEncoderBase* topLevelEncoder,
|
||||
CommandAllocator* allocator)
|
||||
: ProgrammablePassEncoder(device, topLevelBuilder, allocator) {
|
||||
: ProgrammablePassEncoder(device, topLevelEncoder, allocator) {
|
||||
}
|
||||
|
||||
void ComputePassEncoderBase::Dispatch(uint32_t x, uint32_t y, uint32_t z) {
|
||||
if (mTopLevelBuilder->ConsumedError(ValidateCanRecordCommands())) {
|
||||
if (mTopLevelEncoder->ConsumedError(ValidateCanRecordCommands())) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@ namespace dawn_native {
|
||||
}
|
||||
|
||||
void ComputePassEncoderBase::SetPipeline(ComputePipelineBase* pipeline) {
|
||||
if (mTopLevelBuilder->ConsumedError(ValidateCanRecordCommands()) ||
|
||||
mTopLevelBuilder->ConsumedError(GetDevice()->ValidateObject(pipeline))) {
|
||||
if (mTopLevelEncoder->ConsumedError(ValidateCanRecordCommands()) ||
|
||||
mTopLevelEncoder->ConsumedError(GetDevice()->ValidateObject(pipeline))) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user