WebKit Bugzilla
Attachment 361089 Details for
Bug 194238
: [Web GPU] Code clean-up for RenderPipeline backend
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194238-20190204131651.patch (text/plain), 3.68 KB, created by
Justin Fan
on 2019-02-04 13:16:52 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Justin Fan
Created:
2019-02-04 13:16:52 PST
Size:
3.68 KB
patch
obsolete
>Subversion Revision: 240936 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 80acf87eb156d51942fa39f2e93d46603c458225..ca537df48ac3354bd6de91dcc659fc8f43d2ed03 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2019-02-04 Justin Fan <justin_fan@apple.com> >+ >+ [Web GPU] Code clean-up for RenderPipeline backend >+ https://bugs.webkit.org/show_bug.cgi?id=194238 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Replace dot syntax setters with calls to setter methods, and remove unnecessary setter calls for >+ the input state's descriptor arrays. >+ >+ Covered by existing tests; no change in behavior. >+ >+ * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm: >+ (WebCore::tryCreateMtlDepthStencilState): Refactor to use implicit setters rather than dot syntax. >+ (WebCore::setInputStateForPipelineDescriptor): Ditto, and remove unnecessary setter calls on array objects. >+ > 2019-02-04 Sihui Liu <sihui_liu@apple.com> > > IndexedDB: leak WebIDBConnectionToServer in layout tests >diff --git a/Source/WebCore/platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm b/Source/WebCore/platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm >index b77ee9a52bcec2838db7edfbf033a8041986b7ab..493ff25653548c4fa2286895560d2cb948b90058 100644 >--- a/Source/WebCore/platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm >+++ b/Source/WebCore/platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm >@@ -85,8 +85,8 @@ static RetainPtr<MTLDepthStencilState> tryCreateMtlDepthStencilState(const char* > return nullptr; > } > >- mtlDescriptor.get().depthCompareFunction = *mtlDepthCompare; >- mtlDescriptor.get().depthWriteEnabled = descriptor.depthWriteEnabled; >+ [mtlDescriptor setDepthCompareFunction:*mtlDepthCompare]; >+ [mtlDescriptor setDepthWriteEnabled:descriptor.depthWriteEnabled]; > > // FIXME: Implement back/frontFaceStencil. > >@@ -210,10 +210,9 @@ static bool setInputStateForPipelineDescriptor(const char* const functionName, M > } > > auto mtlAttributeDesc = retainPtr([attributeArray objectAtIndexedSubscript:location]); >- mtlAttributeDesc.get().format = *mtlFormat; >- mtlAttributeDesc.get().offset = attributes[i].offset; // FIXME: After adding more vertex formats, ensure offset < buffer's stride + format's data size. >- mtlAttributeDesc.get().bufferIndex = WHLSL::Metal::calculateVertexBufferIndex(attributes[i].inputSlot); >- [mtlVertexDescriptor.get().attributes setObject:mtlAttributeDesc.get() atIndexedSubscript:location]; >+ [mtlAttributeDesc setFormat:*mtlFormat]; >+ [mtlAttributeDesc setOffset:attributes[i].offset]; // FIXME: After adding more vertex formats, ensure offset < buffer's stride + format's data size. >+ [mtlAttributeDesc setBufferIndex:WHLSL::Metal::calculateVertexBufferIndex(attributes[i].inputSlot)]; > } > > const auto& inputs = descriptor.inputState.inputs; >@@ -235,12 +234,11 @@ static bool setInputStateForPipelineDescriptor(const char* const functionName, M > > auto convertedSlot = WHLSL::Metal::calculateVertexBufferIndex(slot); > auto mtlLayoutDesc = retainPtr([layoutArray objectAtIndexedSubscript:convertedSlot]); >- mtlLayoutDesc.get().stepFunction = *mtlStepFunction; >- mtlLayoutDesc.get().stride = inputs[j].stride; >- [mtlVertexDescriptor.get().layouts setObject:mtlLayoutDesc.get() atIndexedSubscript:convertedSlot]; >+ [mtlLayoutDesc setStepFunction:*mtlStepFunction]; >+ [mtlLayoutDesc setStride:inputs[j].stride]; > } > >- mtlDescriptor.vertexDescriptor = mtlVertexDescriptor.get(); >+ [mtlDescriptor setVertexDescriptor:mtlVertexDescriptor.get()]; > > return true; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194238
: 361089