Skip to content
Permalink
Browse files
[Web GPU] BindGroups/Argument buffers: Move MTLBuffer creation from a…
…nd GPUBindGroup validation to GPUDevice.createBindGroup

https://bugs.webkit.org/show_bug.cgi?id=195519
<rdar://problem/48781297>

Reviewed by Myles C. Maxfield.

Metal's Argument Buffers should not be tied directly to GPUBindGroupLayout; rather, create the MTLBuffer
in GPUBindGroup creation process.
Move GPUBindGroup validation out of setBindGroup and to GPUBindGroup creation for performance.

Covered by existing tests. No behavior change.

* Modules/webgpu/WebGPUDevice.cpp:
(WebCore::WebGPUDevice::createBindGroup const):
* Sources.txt:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/gpu/GPUBindGroup.cpp: Removed.
* platform/graphics/gpu/GPUBindGroup.h:
(WebCore::GPUBindGroup::vertexArgsBuffer): A buffer that arguments will be encoded into during setBindGroup.
(WebCore::GPUBindGroup::fragmentArgsBuffer): Ditto.
(WebCore::GPUBindGroup::boundBuffers const): A list of resources that are bound by this GPUBindGroup.
(WebCore::GPUBindGroup::boundTextures const): Ditto.
(WebCore::GPUBindGroup::layout const): Deleted.
(WebCore::GPUBindGroup::bindings const): Deleted.
* platform/graphics/gpu/GPUBindGroupLayout.h: No longer creating and retaining MTLBuffers.
(WebCore::GPUBindGroupLayout::vertexEncoder const):
(WebCore::GPUBindGroupLayout::fragmentEncoder const):
(WebCore::GPUBindGroupLayout::computeEncoder const):
(WebCore::GPUBindGroupLayout::ArgumentEncoderBuffer::isValid const): Deleted.
(WebCore::GPUBindGroupLayout::vertexArguments const): Deleted.
(WebCore::GPUBindGroupLayout::fragmentArguments const): Deleted.
(WebCore::GPUBindGroupLayout::computeArguments const): Deleted.
* platform/graphics/gpu/GPUProgrammablePassEncoder.h:
* platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:
(WebCore::tryCreateMtlArgumentEncoder):
(WebCore::GPUBindGroupLayout::tryCreate):
(WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
(WebCore::tryCreateArgumentEncoderAndBuffer): Deleted.
* platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm: Added.
(WebCore::tryCreateArgumentBuffer): Create and associate the MTLBuffer that backs the MTLArgumentEncoder.
(WebCore::tryGetResourceAsBufferBinding): Validate a GPUBindingResource.
(WebCore::trySetBufferOnEncoder): Encodes a GPUBufferBinding's MTLBuffer on a MTLArgumentEncoder.
(WebCore::tryGetResourceAsSampler): Ditto, for GPUSamplers.
(WebCore::trySetSamplerOnEncoder):
(WebCore::tryGetResourceAsTexture): Ditto, for GPUTextures.
(WebCore::trySetTextureOnEncoder):
(WebCore::GPUBindGroup::tryCreate): Most setBindGroup validation moved here.
(WebCore::GPUBindGroup::GPUBindGroup): Retains the resource references needed for setBindGroup.
* platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm:
(WebCore::GPUProgrammablePassEncoder::setBindGroup): Most validation moved to GPUBindGroup::tryCreate().
(WebCore::GPUProgrammablePassEncoder::setResourceAsBufferOnEncoder): Deleted.
(WebCore::GPUProgrammablePassEncoder::setResourceAsSamplerOnEncoder): Deleted.
(WebCore::GPUProgrammablePassEncoder::setResourceAsTextureOnEncoder): Deleted.
* platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
(WebCore::GPURenderPassEncoder::useResource):
(WebCore::GPURenderPassEncoder::setVertexBuffer):
(WebCore::GPURenderPassEncoder::setFragmentBuffer):

Misc:
* platform/graphics/gpu/GPUCommandBuffer.cpp/h: Move missing includes to header.


Canonical link: https://commits.webkit.org/209896@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Justin Fan committed Mar 12, 2019
1 parent 90310d3 commit a24b58e9e8df15ad0b704ee0c07efa678f558f13
Showing 13 changed files with 361 additions and 263 deletions.
@@ -1,3 +1,67 @@
2019-03-11 Justin Fan <justin_fan@apple.com>

[Web GPU] BindGroups/Argument buffers: Move MTLBuffer creation from and GPUBindGroup validation to GPUDevice.createBindGroup
https://bugs.webkit.org/show_bug.cgi?id=195519
<rdar://problem/48781297>

Reviewed by Myles C. Maxfield.

Metal's Argument Buffers should not be tied directly to GPUBindGroupLayout; rather, create the MTLBuffer
in GPUBindGroup creation process.
Move GPUBindGroup validation out of setBindGroup and to GPUBindGroup creation for performance.

Covered by existing tests. No behavior change.

* Modules/webgpu/WebGPUDevice.cpp:
(WebCore::WebGPUDevice::createBindGroup const):
* Sources.txt:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/gpu/GPUBindGroup.cpp: Removed.
* platform/graphics/gpu/GPUBindGroup.h:
(WebCore::GPUBindGroup::vertexArgsBuffer): A buffer that arguments will be encoded into during setBindGroup.
(WebCore::GPUBindGroup::fragmentArgsBuffer): Ditto.
(WebCore::GPUBindGroup::boundBuffers const): A list of resources that are bound by this GPUBindGroup.
(WebCore::GPUBindGroup::boundTextures const): Ditto.
(WebCore::GPUBindGroup::layout const): Deleted.
(WebCore::GPUBindGroup::bindings const): Deleted.
* platform/graphics/gpu/GPUBindGroupLayout.h: No longer creating and retaining MTLBuffers.
(WebCore::GPUBindGroupLayout::vertexEncoder const):
(WebCore::GPUBindGroupLayout::fragmentEncoder const):
(WebCore::GPUBindGroupLayout::computeEncoder const):
(WebCore::GPUBindGroupLayout::ArgumentEncoderBuffer::isValid const): Deleted.
(WebCore::GPUBindGroupLayout::vertexArguments const): Deleted.
(WebCore::GPUBindGroupLayout::fragmentArguments const): Deleted.
(WebCore::GPUBindGroupLayout::computeArguments const): Deleted.
* platform/graphics/gpu/GPUProgrammablePassEncoder.h:
* platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:
(WebCore::tryCreateMtlArgumentEncoder):
(WebCore::GPUBindGroupLayout::tryCreate):
(WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
(WebCore::tryCreateArgumentEncoderAndBuffer): Deleted.
* platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm: Added.
(WebCore::tryCreateArgumentBuffer): Create and associate the MTLBuffer that backs the MTLArgumentEncoder.
(WebCore::tryGetResourceAsBufferBinding): Validate a GPUBindingResource.
(WebCore::trySetBufferOnEncoder): Encodes a GPUBufferBinding's MTLBuffer on a MTLArgumentEncoder.
(WebCore::tryGetResourceAsSampler): Ditto, for GPUSamplers.
(WebCore::trySetSamplerOnEncoder):
(WebCore::tryGetResourceAsTexture): Ditto, for GPUTextures.
(WebCore::trySetTextureOnEncoder):
(WebCore::GPUBindGroup::tryCreate): Most setBindGroup validation moved here.
(WebCore::GPUBindGroup::GPUBindGroup): Retains the resource references needed for setBindGroup.
* platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm:
(WebCore::GPUProgrammablePassEncoder::setBindGroup): Most validation moved to GPUBindGroup::tryCreate().
(WebCore::GPUProgrammablePassEncoder::setResourceAsBufferOnEncoder): Deleted.
(WebCore::GPUProgrammablePassEncoder::setResourceAsSamplerOnEncoder): Deleted.
(WebCore::GPUProgrammablePassEncoder::setResourceAsTextureOnEncoder): Deleted.
* platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
(WebCore::GPURenderPassEncoder::useResource):
(WebCore::GPURenderPassEncoder::setVertexBuffer):
(WebCore::GPURenderPassEncoder::setFragmentBuffer):

Misc:
* platform/graphics/gpu/GPUCommandBuffer.cpp/h: Move missing includes to header.

2019-03-11 Zalan Bujtas <zalan@apple.com>

[Synthetic Click] Dispatch mouseout soon after mouseup
@@ -116,7 +116,7 @@ Ref<WebGPUBindGroup> WebGPUDevice::createBindGroup(WebGPUBindGroupDescriptor&& d
if (!gpuDescriptor)
return WebGPUBindGroup::create(nullptr);

auto bindGroup = GPUBindGroup::create(WTFMove(*gpuDescriptor));
auto bindGroup = GPUBindGroup::tryCreate(*gpuDescriptor);
return WebGPUBindGroup::create(WTFMove(bindGroup));
}

@@ -1813,7 +1813,6 @@ platform/graphics/filters/SourceAlpha.cpp
platform/graphics/filters/SourceGraphic.cpp
platform/graphics/filters/SpotLightSource.cpp

platform/graphics/gpu/GPUBindGroup.cpp
platform/graphics/gpu/GPUDevice.cpp
platform/graphics/gpu/GPUPipelineLayout.cpp
platform/graphics/gpu/GPUProgrammablePassEncoder.cpp
@@ -317,6 +317,7 @@ platform/graphics/cv/PixelBufferConformerCV.cpp
platform/graphics/cv/TextureCacheCV.mm
platform/graphics/cv/VideoTextureCopierCV.cpp

platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm
platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm
platform/graphics/gpu/cocoa/GPUBufferMetal.mm
platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm
@@ -14094,6 +14094,7 @@
D084033D221E186400007205 /* WebGPUBindGroupDescriptor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebGPUBindGroupDescriptor.cpp; sourceTree = "<group>"; };
D0843A4A20FEBE3D00FE860E /* GraphicsContext3DManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GraphicsContext3DManager.h; sourceTree = "<group>"; };
D0843A4C20FEC16500FE860E /* GraphicsContext3DManager.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContext3DManager.cpp; sourceTree = "<group>"; };
D085E64A2236DEAE00C3E1E2 /* GPUBindGroupMetal.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = GPUBindGroupMetal.mm; sourceTree = "<group>"; };
D086FE9609D53AAB005BC74D /* UnlinkCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnlinkCommand.h; sourceTree = "<group>"; };
D086FE9709D53AAB005BC74D /* UnlinkCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UnlinkCommand.cpp; sourceTree = "<group>"; };
D087CE3821ACA94200BDE174 /* GPUCommandBufferMetal.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = GPUCommandBufferMetal.mm; sourceTree = "<group>"; };
@@ -14142,7 +14143,6 @@
D0BE105221E6AA0D00E42A89 /* WebGPUBindGroupDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUBindGroupDescriptor.h; sourceTree = "<group>"; };
D0BE105321E6AA0D00E42A89 /* WebGPUBindGroupDescriptor.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUBindGroupDescriptor.idl; sourceTree = "<group>"; };
D0BE105E21E6BAD300E42A89 /* GPUBindGroup.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUBindGroup.h; sourceTree = "<group>"; };
D0BE105F21E6BAD300E42A89 /* GPUBindGroup.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GPUBindGroup.cpp; sourceTree = "<group>"; };
D0BE106021E6C0EB00E42A89 /* WebGPUBindGroup.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUBindGroup.h; sourceTree = "<group>"; };
D0BE106121E6C0EB00E42A89 /* WebGPUBindGroup.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebGPUBindGroup.cpp; sourceTree = "<group>"; };
D0BE106221E6C0EB00E42A89 /* WebGPUBindGroup.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUBindGroup.idl; sourceTree = "<group>"; };
@@ -18491,7 +18491,6 @@
children = (
D087CE3721ACA94200BDE174 /* cocoa */,
312FF8CE21A4C33F00EB199D /* legacy */,
D0BE105F21E6BAD300E42A89 /* GPUBindGroup.cpp */,
D0BE105E21E6BAD300E42A89 /* GPUBindGroup.h */,
D0BE104E21E695E200E42A89 /* GPUBindGroupBinding.h */,
D0BE105121E6A70E00E42A89 /* GPUBindGroupDescriptor.h */,
@@ -26225,6 +26224,7 @@
isa = PBXGroup;
children = (
D0232B5821CB49B7009483B9 /* GPUBindGroupLayoutMetal.mm */,
D085E64A2236DEAE00C3E1E2 /* GPUBindGroupMetal.mm */,
D0D8649121B760C4003C983C /* GPUBufferMetal.mm */,
D087CE3821ACA94200BDE174 /* GPUCommandBufferMetal.mm */,
D087CE3C21ACA94200BDE174 /* GPUDeviceMetal.mm */,

This file was deleted.

@@ -27,28 +27,40 @@

#if ENABLE(WEBGPU)

#include "GPUBindGroupBinding.h"
#include "GPUBindGroupLayout.h"
#include <wtf/Ref.h>
#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>
#include <wtf/RetainPtr.h>
#include <wtf/Vector.h>

OBJC_PROTOCOL(MTLBuffer);

namespace WebCore {

class GPUBuffer;
class GPUTexture;

struct GPUBindGroupDescriptor;

class GPUBindGroup : public RefCounted<GPUBindGroup> {
public:
static Ref<GPUBindGroup> create(GPUBindGroupDescriptor&&);

const GPUBindGroupLayout& layout() const { return m_layout.get(); }
const Vector<GPUBindGroupBinding>& bindings() const { return m_bindings; }
static RefPtr<GPUBindGroup> tryCreate(const GPUBindGroupDescriptor&);

#if USE(METAL)
MTLBuffer *vertexArgsBuffer() { return m_vertexArgsBuffer.get(); }
MTLBuffer *fragmentArgsBuffer() { return m_fragmentArgsBuffer.get(); }
#endif
const Vector<Ref<GPUBuffer>>& boundBuffers() const { return m_boundBuffers; }
const Vector<Ref<GPUTexture>>& boundTextures() const { return m_boundTextures; }

private:
explicit GPUBindGroup(GPUBindGroupDescriptor&&);

Ref<GPUBindGroupLayout> m_layout;
Vector<GPUBindGroupBinding> m_bindings;
#if USE(METAL)
GPUBindGroup(RetainPtr<MTLBuffer>&& vertexBuffer, RetainPtr<MTLBuffer>&& fragmentBuffer, Vector<Ref<GPUBuffer>>&&, Vector<Ref<GPUTexture>>&&);

RetainPtr<MTLBuffer> m_vertexArgsBuffer;
RetainPtr<MTLBuffer> m_fragmentArgsBuffer;
#endif
Vector<Ref<GPUBuffer>> m_boundBuffers;
Vector<Ref<GPUTexture>> m_boundTextures;
};

} // namespace WebCore
@@ -50,24 +50,18 @@ class GPUBindGroupLayout : public RefCounted<GPUBindGroupLayout> {
using BindingsMapType = HashMap<unsigned long long, GPUBindGroupLayoutBinding, WTF::IntHash<unsigned long long>, WTF::UnsignedWithZeroKeyHashTraits<unsigned long long>>;
const BindingsMapType& bindingsMap() const { return m_bindingsMap; }
#if USE(METAL)
struct ArgumentEncoderBuffer {
RetainPtr<MTLArgumentEncoder> encoder;
RetainPtr<MTLBuffer> buffer;

bool isValid() const { return encoder && buffer; }
};
const ArgumentEncoderBuffer& vertexArguments() const { return m_vertexArguments; }
const ArgumentEncoderBuffer& fragmentArguments() const { return m_fragmentArguments; }
const ArgumentEncoderBuffer& computeArguments() const { return m_computeArguments; }
MTLArgumentEncoder *vertexEncoder() const { return m_vertexEncoder.get(); }
MTLArgumentEncoder *fragmentEncoder() const { return m_fragmentEncoder.get(); }
MTLArgumentEncoder *computeEncoder() const { return m_computeEncoder.get(); }
#endif // USE(METAL)

private:
#if USE(METAL)
GPUBindGroupLayout(BindingsMapType&&, ArgumentEncoderBuffer&& vertex, ArgumentEncoderBuffer&& fragment, ArgumentEncoderBuffer&& compute);
GPUBindGroupLayout(BindingsMapType&&, RetainPtr<MTLArgumentEncoder>&& vertex, RetainPtr<MTLArgumentEncoder>&& fragment, RetainPtr<MTLArgumentEncoder>&& compute);

ArgumentEncoderBuffer m_vertexArguments;
ArgumentEncoderBuffer m_fragmentArguments;
ArgumentEncoderBuffer m_computeArguments;
RetainPtr<MTLArgumentEncoder> m_vertexEncoder;
RetainPtr<MTLArgumentEncoder> m_fragmentEncoder;
RetainPtr<MTLArgumentEncoder> m_computeEncoder;
#endif // USE(METAL)
const BindingsMapType m_bindingsMap;
};
@@ -30,12 +30,11 @@
#include "GPUBindGroupBinding.h"
#include <wtf/RefCounted.h>

OBJC_PROTOCOL(MTLArgumentEncoder);
#if USE(METAL)
OBJC_PROTOCOL(MTLBuffer);
OBJC_PROTOCOL(MTLCommandEncoder);
OBJC_PROTOCOL(MTLResource);
#endif // USE(METAL)
#endif

namespace WebCore {

@@ -61,9 +60,6 @@ class GPUProgrammablePassEncoder : public RefCounted<GPUProgrammablePassEncoder>

private:
#if USE(METAL)
void setResourceAsBufferOnEncoder(MTLArgumentEncoder *, const GPUBindGroupBinding&, const char* const);
void setResourceAsSamplerOnEncoder(MTLArgumentEncoder *, const GPUBindGroupBinding&, const char* const);
void setResourceAsTextureOnEncoder(MTLArgumentEncoder *, const GPUBindGroupBinding&, const char* const);
virtual void useResource(MTLResource *, unsigned) = 0;

// Render command encoder methods.
@@ -63,28 +63,18 @@ static void appendArgumentToArray(ArgumentArray& array, RetainPtr<MTLArgumentDes
END_BLOCK_OBJC_EXCEPTIONS;
}

static GPUBindGroupLayout::ArgumentEncoderBuffer tryCreateArgumentEncoderAndBuffer(const GPUDevice& device, ArgumentArray array)
static RetainPtr<MTLArgumentEncoder> tryCreateMtlArgumentEncoder(const GPUDevice& device, ArgumentArray array)
{
GPUBindGroupLayout::ArgumentEncoderBuffer args;
RetainPtr<MTLArgumentEncoder> encoder;

BEGIN_BLOCK_OBJC_EXCEPTIONS;
args.encoder = adoptNS([device.platformDevice() newArgumentEncoderWithArguments:array.get()]);
encoder = adoptNS([device.platformDevice() newArgumentEncoderWithArguments:array.get()]);
END_BLOCK_OBJC_EXCEPTIONS;
if (!args.encoder) {
if (!encoder) {
LOG(WebGPU, "GPUBindGroupLayout::tryCreate(): Unable to create MTLArgumentEncoder!");
return { };
}

BEGIN_BLOCK_OBJC_EXCEPTIONS;
args.buffer = adoptNS([device.platformDevice() newBufferWithLength:args.encoder.get().encodedLength options:0]);
[args.encoder setArgumentBuffer:args.buffer.get() offset:0];
END_BLOCK_OBJC_EXCEPTIONS;
if (!args.buffer) {
LOG(WebGPU, "GPUBindGroupLayout::tryCreate(): Unable to create MTLBuffer from MTLArgumentEncoder!");
return { };
return nullptr;
}

return args;
return encoder;
};

RefPtr<GPUBindGroupLayout> GPUBindGroupLayout::tryCreate(const GPUDevice& device, const GPUBindGroupLayoutDescriptor& descriptor)
@@ -108,14 +98,13 @@ static void appendArgumentToArray(ArgumentArray& array, RetainPtr<MTLArgumentDes
BEGIN_BLOCK_OBJC_EXCEPTIONS;
mtlArgument = adoptNS([MTLArgumentDescriptor new]);
END_BLOCK_OBJC_EXCEPTIONS;

if (!mtlArgument) {
LOG(WebGPU, "GPUBindGroupLayout::tryCreate(): Unable to create MTLArgumentDescriptor for binding %lu!", binding.binding);
return nullptr;
}

mtlArgument.get().dataType = MTLDataTypeForBindingType(binding.type);
mtlArgument.get().index = binding.binding;
[mtlArgument setDataType:MTLDataTypeForBindingType(binding.type)];
[mtlArgument setIndex:binding.binding];

if (binding.visibility & GPUShaderStageBit::Flags::Vertex)
appendArgumentToArray(vertexArgsArray, mtlArgument);
@@ -125,28 +114,28 @@ static void appendArgumentToArray(ArgumentArray& array, RetainPtr<MTLArgumentDes
appendArgumentToArray(computeArgsArray, mtlArgument);
}

ArgumentEncoderBuffer vertex, fragment, compute;
RetainPtr<MTLArgumentEncoder> vertex, fragment, compute;

if (vertexArgsArray) {
if (!(vertex = tryCreateArgumentEncoderAndBuffer(device, vertexArgsArray)).isValid())
if (!(vertex = tryCreateMtlArgumentEncoder(device, vertexArgsArray)))
return nullptr;
}
if (fragmentArgsArray) {
if (!(fragment = tryCreateArgumentEncoderAndBuffer(device, fragmentArgsArray)).isValid())
if (!(fragment = tryCreateMtlArgumentEncoder(device, fragmentArgsArray)))
return nullptr;
}
if (computeArgsArray) {
if (!(compute = tryCreateArgumentEncoderAndBuffer(device, computeArgsArray)).isValid())
if (!(compute = tryCreateMtlArgumentEncoder(device, computeArgsArray)))
return nullptr;
}

return adoptRef(new GPUBindGroupLayout(WTFMove(bindingsMap), WTFMove(vertex), WTFMove(fragment), WTFMove(compute)));
}

GPUBindGroupLayout::GPUBindGroupLayout(BindingsMapType&& bindingsMap, ArgumentEncoderBuffer&& vertex, ArgumentEncoderBuffer&& fragment, ArgumentEncoderBuffer&& compute)
: m_vertexArguments(WTFMove(vertex))
, m_fragmentArguments(WTFMove(fragment))
, m_computeArguments(WTFMove(compute))
GPUBindGroupLayout::GPUBindGroupLayout(BindingsMapType&& bindingsMap, RetainPtr<MTLArgumentEncoder>&& vertex, RetainPtr<MTLArgumentEncoder>&& fragment, RetainPtr<MTLArgumentEncoder>&& compute)
: m_vertexEncoder(WTFMove(vertex))
, m_fragmentEncoder(WTFMove(fragment))
, m_computeEncoder(WTFMove(compute))
, m_bindingsMap(WTFMove(bindingsMap))
{
}

0 comments on commit a24b58e

Please sign in to comment.