diff options
Diffstat (limited to 'chromium/third_party/dawn/src/dawn_native/d3d12/BindGroupLayoutD3D12.cpp')
-rw-r--r-- | chromium/third_party/dawn/src/dawn_native/d3d12/BindGroupLayoutD3D12.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/chromium/third_party/dawn/src/dawn_native/d3d12/BindGroupLayoutD3D12.cpp b/chromium/third_party/dawn/src/dawn_native/d3d12/BindGroupLayoutD3D12.cpp index 449a07a5ff2..c5151664ee0 100644 --- a/chromium/third_party/dawn/src/dawn_native/d3d12/BindGroupLayoutD3D12.cpp +++ b/chromium/third_party/dawn/src/dawn_native/d3d12/BindGroupLayoutD3D12.cpp @@ -56,6 +56,12 @@ namespace dawn_native { namespace d3d12 { } } // anonymous namespace + // static + Ref<BindGroupLayout> BindGroupLayout::Create(Device* device, + const BindGroupLayoutDescriptor* descriptor) { + return AcquireRef(new BindGroupLayout(device, descriptor)); + } + BindGroupLayout::BindGroupLayout(Device* device, const BindGroupLayoutDescriptor* descriptor) : BindGroupLayoutBase(device, descriptor), mBindingOffsets(GetBindingCount()), @@ -138,7 +144,7 @@ namespace dawn_native { namespace d3d12 { device->GetSamplerStagingDescriptorAllocator(GetSamplerDescriptorCount()); } - ResultOrError<BindGroup*> BindGroupLayout::AllocateBindGroup( + ResultOrError<Ref<BindGroup>> BindGroupLayout::AllocateBindGroup( Device* device, const BindGroupDescriptor* descriptor) { uint32_t viewSizeIncrement = 0; @@ -158,7 +164,7 @@ namespace dawn_native { namespace d3d12 { bindGroup->SetSamplerAllocationEntry(std::move(samplerHeapCacheEntry)); } - return bindGroup.Detach(); + return bindGroup; } void BindGroupLayout::DeallocateBindGroup(BindGroup* bindGroup, |