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:
parent
24f8d1870b
commit
db8b3fa44c
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -83,23 +83,19 @@ 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()
|
|
||||||
->CreateCommandSignature(&programDesc, NULL,
|
|
||||||
IID_PPV_ARGS(&mDrawIndexedIndirectSignature));
|
IID_PPV_ARGS(&mDrawIndexedIndirectSignature));
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
|
|
|
@ -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 {};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue