RESOLVED FIXED 169535
WebGPU Backend
https://bugs.webkit.org/show_bug.cgi?id=169535
Summary WebGPU Backend
Dean Jackson
Reported 2017-03-12 19:34:08 PDT
WebGPU Backend
Attachments
Patch (206.78 KB, patch)
2017-03-12 19:40 PDT, Dean Jackson
no flags
Radar WebKit Bug Importer
Comment 1 2017-03-12 19:34:52 PDT
Dean Jackson
Comment 2 2017-03-12 19:40:40 PDT
Jon Lee
Comment 3 2017-03-12 19:59:49 PDT
Comment on attachment 304216 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=304216&action=review > Source/WebCore/platform/graphics/cocoa/GPUBufferMetal.mm:45 > + m_buffer = (MTLBuffer *)[device->platformDevice() newBufferWithBytes:data->baseAddress() length:data->byteLength() options:MTLResourceOptionCPUCacheModeDefault]; adoptNS()? > Source/WebCore/platform/graphics/cocoa/GPUCommandQueueMetal.mm:45 > + m_commandQueue = (MTLCommandQueue *)[device->platformDevice() newCommandQueue]; adoptNS()? > Source/WebCore/platform/graphics/cocoa/GPUDepthStencilDescriptorMetal.mm:42 > + m_depthStencilDescriptor = (MTLDepthStencilDescriptor *)[MTLDepthStencilDescriptor new]; adoptNS()? > Source/WebCore/platform/graphics/cocoa/GPUDepthStencilStateMetal.mm:46 > + m_depthStencilState = (MTLDepthStencilState *)[device->platformDevice() newDepthStencilStateWithDescriptor:descriptor->platformDepthStencilDescriptor()]; adoptNS()? > Source/WebCore/platform/graphics/cocoa/GPUFunctionMetal.mm:44 > + m_function = (MTLFunction *)[library->platformLibrary() newFunctionWithName:name]; adoptNS()? > Source/WebCore/platform/graphics/cocoa/GPULibraryMetal.mm:46 > + m_library = (MTLLibrary *)[device->platformDevice() newLibraryWithSource:sourceCode options:nil error:&error]; adoptNS()? > Source/WebCore/platform/graphics/cocoa/GPURenderPassColorAttachmentDescriptorMetal.mm:52 > + MTLRenderPassColorAttachmentDescriptor *colorAttachmentDescriptor = static_cast<MTLRenderPassColorAttachmentDescriptor*>(m_renderPassAttachmentDescriptor.get()); space: static_cast<MTLRenderPassColorAttachmentDescriptor *> > Source/WebCore/platform/graphics/cocoa/GPURenderPassColorAttachmentDescriptorMetal.mm:72 > + return static_cast<MTLRenderPassColorAttachmentDescriptor*>(platformRenderPassAttachmentDescriptor()); space: static_cast<MTLRenderPassColorAttachmentDescriptor *> > Source/WebCore/platform/graphics/cocoa/GPURenderPassDepthAttachmentDescriptorMetal.mm:52 > + MTLRenderPassDepthAttachmentDescriptor *depthAttachmentDescriptor = static_cast<MTLRenderPassDepthAttachmentDescriptor*>(m_renderPassAttachmentDescriptor.get()); space: static_cast<MTLRenderPassDepthAttachmentDescriptor *> > Source/WebCore/platform/graphics/cocoa/GPURenderPassDepthAttachmentDescriptorMetal.mm:67 > + return static_cast<MTLRenderPassDepthAttachmentDescriptor*>(platformRenderPassAttachmentDescriptor()); space: static_cast<MTLRenderPassDepthAttachmentDescriptor *> > Source/WebCore/platform/graphics/cocoa/GPURenderPassDescriptorMetal.mm:43 > + m_renderPassDescriptor = (MTLRenderPassDescriptor *)[MTLRenderPassDescriptor new]; adoptNS()? > Source/WebCore/platform/graphics/cocoa/GPURenderPipelineDescriptorMetal.mm:43 > + m_renderPipelineDescriptor = (MTLRenderPipelineDescriptor *)[MTLRenderPipelineDescriptor new]; adoptNS()? > Source/WebCore/platform/graphics/cocoa/GPURenderPipelineStateMetal.mm:46 > + m_renderPipelineState = (MTLRenderPipelineState *)[device->platformDevice() newRenderPipelineStateWithDescriptor:descriptor->platformRenderPipelineDescriptor() error:nil]; adoptNS()? > Source/WebCore/platform/graphics/cocoa/GPUTextureMetal.mm:47 > + m_texture = (MTLTexture *)[device->platformDevice() newTextureWithDescriptor:descriptor->platformTextureDescriptor()]; adoptNS()?
Jon Lee
Comment 4 2017-03-12 20:26:50 PDT
Comment on attachment 304216 [details] Patch Confirmed with Dean out-of-band that adoptNS() was needed. Will check in patch with adoptNS() wrapped in the places I marked.
Jon Lee
Comment 5 2017-03-12 20:41:35 PDT
Committed r213780.
Jon Lee
Comment 6 2017-03-13 00:11:29 PDT
*** Bug 169367 has been marked as a duplicate of this bug. ***
Jon Lee
Comment 7 2017-03-13 00:11:57 PDT
*** Bug 169368 has been marked as a duplicate of this bug. ***
Jon Lee
Comment 8 2017-03-13 00:12:00 PDT
*** Bug 169370 has been marked as a duplicate of this bug. ***
Jon Lee
Comment 9 2017-03-13 00:12:03 PDT
*** Bug 169372 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.