Remove the "Base" from pure-frontend dawn_native types

This was unnecessary verbosity. Fix this by having the ProcTable
generator using type aliases so all types appear like they have
"Base".

BUG=

Change-Id: I8c472fb924f6ce739e4e41038452381b4f727a2b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13442
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Corentin Wallez
2019-11-13 17:00:37 +00:00
committed by Commit Bot service account
parent 9e7107eb96
commit 321c12255e
41 changed files with 198 additions and 214 deletions

View File

@@ -22,28 +22,27 @@
namespace dawn_native {
ComputePassEncoderBase::ComputePassEncoderBase(DeviceBase* device,
CommandEncoderBase* commandEncoder,
EncodingContext* encodingContext)
ComputePassEncoder::ComputePassEncoder(DeviceBase* device,
CommandEncoder* commandEncoder,
EncodingContext* encodingContext)
: ProgrammablePassEncoder(device, encodingContext), mCommandEncoder(commandEncoder) {
}
ComputePassEncoderBase::ComputePassEncoderBase(DeviceBase* device,
CommandEncoderBase* commandEncoder,
EncodingContext* encodingContext,
ErrorTag errorTag)
ComputePassEncoder::ComputePassEncoder(DeviceBase* device,
CommandEncoder* commandEncoder,
EncodingContext* encodingContext,
ErrorTag errorTag)
: ProgrammablePassEncoder(device, encodingContext, errorTag),
mCommandEncoder(commandEncoder) {
}
ComputePassEncoderBase* ComputePassEncoderBase::MakeError(DeviceBase* device,
CommandEncoderBase* commandEncoder,
EncodingContext* encodingContext) {
return new ComputePassEncoderBase(device, commandEncoder, encodingContext,
ObjectBase::kError);
ComputePassEncoder* ComputePassEncoder::MakeError(DeviceBase* device,
CommandEncoder* commandEncoder,
EncodingContext* encodingContext) {
return new ComputePassEncoder(device, commandEncoder, encodingContext, ObjectBase::kError);
}
void ComputePassEncoderBase::EndPass() {
void ComputePassEncoder::EndPass() {
if (mEncodingContext->TryEncode(this, [&](CommandAllocator* allocator) -> MaybeError {
allocator->Allocate<EndComputePassCmd>(Command::EndComputePass);
@@ -53,7 +52,7 @@ namespace dawn_native {
}
}
void ComputePassEncoderBase::Dispatch(uint32_t x, uint32_t y, uint32_t z) {
void ComputePassEncoder::Dispatch(uint32_t x, uint32_t y, uint32_t z) {
mEncodingContext->TryEncode(this, [&](CommandAllocator* allocator) -> MaybeError {
DispatchCmd* dispatch = allocator->Allocate<DispatchCmd>(Command::Dispatch);
dispatch->x = x;
@@ -64,8 +63,7 @@ namespace dawn_native {
});
}
void ComputePassEncoderBase::DispatchIndirect(BufferBase* indirectBuffer,
uint64_t indirectOffset) {
void ComputePassEncoder::DispatchIndirect(BufferBase* indirectBuffer, uint64_t indirectOffset) {
mEncodingContext->TryEncode(this, [&](CommandAllocator* allocator) -> MaybeError {
DAWN_TRY(GetDevice()->ValidateObject(indirectBuffer));
@@ -83,7 +81,7 @@ namespace dawn_native {
});
}
void ComputePassEncoderBase::SetPipeline(ComputePipelineBase* pipeline) {
void ComputePassEncoder::SetPipeline(ComputePipelineBase* pipeline) {
mEncodingContext->TryEncode(this, [&](CommandAllocator* allocator) -> MaybeError {
DAWN_TRY(GetDevice()->ValidateObject(pipeline));