Revert "dawn_native: Indirect draw/dispatch"

This reverts commit 7eb6be186b.

Reason for revert: This change is breaking Clusterfuzz bots. crbug.com/972358

Bug: chromium:972358

Original change's description:
> dawn_native: Indirect draw/dispatch
>
> Adds indirect draw and dispatch for all backends (without validation).
>
> Tests for opengl negative offset are skipped since there is no easy
> way to add the index buffer offset. Current idea is to use a compute
> shader to modify the indirect draw buffer.
>
> Change-Id: I1d3eec7c699b211423f4b911769cca17bfbcd045
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7481
> Commit-Queue: Idan Raiter <idanr@google.com>
> Reviewed-by: Kai Ninomiya <kainino@chromium.org>

TBR=cwallez@chromium.org,kainino@chromium.org,idanr@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I9b7b63de0900e20c4da8561ceb9b2dece77c3885
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7960
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
Austin Eng
2019-06-10 17:15:27 +00:00
committed by Commit Bot service account
parent 7eb6be186b
commit 39b8ddfbd9
21 changed files with 1 additions and 1003 deletions

View File

@@ -14,7 +14,6 @@
#include "dawn_native/ComputePassEncoder.h"
#include "dawn_native/Buffer.h"
#include "dawn_native/CommandEncoder.h"
#include "dawn_native/Commands.h"
#include "dawn_native/ComputePipeline.h"
@@ -50,25 +49,6 @@ namespace dawn_native {
dispatch->z = z;
}
void ComputePassEncoderBase::DispatchIndirect(BufferBase* indirectBuffer,
uint64_t indirectOffset) {
if (mTopLevelEncoder->ConsumedError(ValidateCanRecordCommands()) ||
mTopLevelEncoder->ConsumedError(GetDevice()->ValidateObject(indirectBuffer))) {
return;
}
if (indirectOffset >= indirectBuffer->GetSize() ||
indirectOffset + kDispatchIndirectSize > indirectBuffer->GetSize()) {
mTopLevelEncoder->HandleError("Indirect offset out of bounds");
return;
}
DispatchIndirectCmd* dispatch =
mAllocator->Allocate<DispatchIndirectCmd>(Command::DispatchIndirect);
dispatch->indirectBuffer = indirectBuffer;
dispatch->indirectOffset = indirectOffset;
}
void ComputePassEncoderBase::SetPipeline(ComputePipelineBase* pipeline) {
if (mTopLevelEncoder->ConsumedError(ValidateCanRecordCommands()) ||
mTopLevelEncoder->ConsumedError(GetDevice()->ValidateObject(pipeline))) {