Remove unnecessary DeviceBase::GetDevice

BUG=

Change-Id: Iac73c9ffb4900961a0b47bf26dac049518021af2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8165
Reviewed-by: Idan Raiter <idanr@google.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez 2019-06-20 09:08:24 +00:00 committed by Commit Bot service account
parent 24f8d1870b
commit db8b3fa44c
4 changed files with 7 additions and 18 deletions

View File

@ -96,10 +96,6 @@ namespace dawn_native {
return mAdapter; return mAdapter;
} }
DeviceBase* DeviceBase::GetDevice() {
return this;
}
FenceSignalTracker* DeviceBase::GetFenceSignalTracker() const { FenceSignalTracker* DeviceBase::GetFenceSignalTracker() const {
return mFenceSignalTracker.get(); return mFenceSignalTracker.get();
} }

View File

@ -54,9 +54,6 @@ namespace dawn_native {
AdapterBase* GetAdapter() const; AdapterBase* GetAdapter() const;
// Used by autogenerated code, returns itself
DeviceBase* GetDevice();
FenceSignalTracker* GetFenceSignalTracker() const; FenceSignalTracker* GetFenceSignalTracker() const;
virtual CommandBufferBase* CreateCommandBuffer(CommandEncoderBase* encoder) = 0; virtual CommandBufferBase* CreateCommandBuffer(CommandEncoderBase* encoder) = 0;

View File

@ -83,24 +83,20 @@ namespace dawn_native { namespace d3d12 {
programDesc.NumArgumentDescs = 1; programDesc.NumArgumentDescs = 1;
programDesc.pArgumentDescs = &argumentDesc; programDesc.pArgumentDescs = &argumentDesc;
ToBackend(GetDevice()) GetD3D12Device()->CreateCommandSignature(&programDesc, NULL,
->GetD3D12Device() IID_PPV_ARGS(&mDispatchIndirectSignature));
->CreateCommandSignature(&programDesc, NULL, IID_PPV_ARGS(&mDispatchIndirectSignature));
argumentDesc.Type = D3D12_INDIRECT_ARGUMENT_TYPE_DRAW; argumentDesc.Type = D3D12_INDIRECT_ARGUMENT_TYPE_DRAW;
programDesc.ByteStride = 4 * sizeof(uint32_t); programDesc.ByteStride = 4 * sizeof(uint32_t);
ToBackend(GetDevice()) GetD3D12Device()->CreateCommandSignature(&programDesc, NULL,
->GetD3D12Device() IID_PPV_ARGS(&mDrawIndirectSignature));
->CreateCommandSignature(&programDesc, NULL, IID_PPV_ARGS(&mDrawIndirectSignature));
argumentDesc.Type = D3D12_INDIRECT_ARGUMENT_TYPE_DRAW_INDEXED; argumentDesc.Type = D3D12_INDIRECT_ARGUMENT_TYPE_DRAW_INDEXED;
programDesc.ByteStride = 5 * sizeof(uint32_t); programDesc.ByteStride = 5 * sizeof(uint32_t);
ToBackend(GetDevice()) GetD3D12Device()->CreateCommandSignature(&programDesc, NULL,
->GetD3D12Device() IID_PPV_ARGS(&mDrawIndexedIndirectSignature));
->CreateCommandSignature(&programDesc, NULL,
IID_PPV_ARGS(&mDrawIndexedIndirectSignature));
return {}; return {};
} }

View File

@ -158,7 +158,7 @@ namespace dawn_native { namespace null {
operation->destinationOffset = destinationOffset; operation->destinationOffset = destinationOffset;
operation->size = size; operation->size = size;
ToBackend(GetDevice())->AddPendingOperation(std::move(operation)); AddPendingOperation(std::move(operation));
return {}; return {};
} }