diff --git a/src/dawn_native/d3d12/BindGroupD3D12.cpp b/src/dawn_native/d3d12/BindGroupD3D12.cpp index 950279eb5b..ee48625a36 100644 --- a/src/dawn_native/d3d12/BindGroupD3D12.cpp +++ b/src/dawn_native/d3d12/BindGroupD3D12.cpp @@ -44,7 +44,7 @@ namespace dawn_native { namespace d3d12 { const auto& bindingOffsets = bgl->GetBindingOffsets(); - ID3D12Device* d3d12Device = device->GetD3D12Device().Get(); + ID3D12Device* d3d12Device = device->GetD3D12Device(); // It's not necessary to create descriptors in the descriptor heap for dynamic resources. // This is because they are created as root descriptors which are never heap allocated. @@ -162,7 +162,7 @@ namespace dawn_native { namespace d3d12 { const BindGroupLayout* bgl = ToBackend(GetLayout()); const Serial pendingSerial = device->GetPendingCommandSerial(); - ID3D12Device* d3d12Device = device->GetD3D12Device().Get(); + ID3D12Device* d3d12Device = device->GetD3D12Device(); // CPU bindgroups are sparsely allocated across CPU heaps. Instead of doing // simple copies per bindgroup, a single non-simple copy could be issued. diff --git a/src/dawn_native/d3d12/CommandBufferD3D12.cpp b/src/dawn_native/d3d12/CommandBufferD3D12.cpp index 104e5b1487..088480e6d6 100644 --- a/src/dawn_native/d3d12/CommandBufferD3D12.cpp +++ b/src/dawn_native/d3d12/CommandBufferD3D12.cpp @@ -309,7 +309,7 @@ namespace dawn_native { namespace d3d12 { DAWN_TRY_ASSIGN(rtvHeap, allocator->AllocateCPUHeap(D3D12_DESCRIPTOR_HEAP_TYPE_RTV, rtvCount)); ASSERT(rtvHeap.Get() != nullptr); - ID3D12Device* d3dDevice = device->GetD3D12Device().Get(); + ID3D12Device* d3dDevice = device->GetD3D12Device(); unsigned int rtvIndex = 0; for (uint32_t i : IterateBitSet(renderPass->attachmentState->GetColorAttachmentsMask())) { diff --git a/src/dawn_native/d3d12/DeviceD3D12.cpp b/src/dawn_native/d3d12/DeviceD3D12.cpp index 9dce6e38e7..755c4be4e5 100644 --- a/src/dawn_native/d3d12/DeviceD3D12.cpp +++ b/src/dawn_native/d3d12/DeviceD3D12.cpp @@ -135,8 +135,8 @@ namespace dawn_native { namespace d3d12 { ShutDownBase(); } - ComPtr Device::GetD3D12Device() const { - return mD3d12Device; + ID3D12Device* Device::GetD3D12Device() const { + return mD3d12Device.Get(); } ComPtr Device::GetCommandQueue() const { diff --git a/src/dawn_native/d3d12/DeviceD3D12.h b/src/dawn_native/d3d12/DeviceD3D12.h index 38334d5d24..1f3a95827b 100644 --- a/src/dawn_native/d3d12/DeviceD3D12.h +++ b/src/dawn_native/d3d12/DeviceD3D12.h @@ -59,7 +59,7 @@ namespace dawn_native { namespace d3d12 { Serial GetLastSubmittedCommandSerial() const final override; MaybeError TickImpl() override; - ComPtr GetD3D12Device() const; + ID3D12Device* GetD3D12Device() const; ComPtr GetCommandQueue() const; ID3D12SharingContract* GetSharingContract() const;