[Webkit-unassigned] [Bug 211363] New: GPUTexture objects are returned with “null” native Metal textures backing them when the “usage” flag is not set correctly.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun May 3 17:45:01 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=211363

            Bug ID: 211363
           Summary: GPUTexture objects are returned with “null” native
                    Metal textures backing them when the “usage” flag is
                    not set correctly.
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebGPU
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: gvinals at apple.com

GPUTexture objects are returned with “null” native Metal textures backing them when the “usage” flag is not set correctly. For example, you can set usage to 0 or a random number and a GPUTexture will still be returned by device.createTexture(…). This texture is also able to create a GPUTextureView.

Unfortunately after that many internal errors may happen that can be very tricky to debug for application developers. 

For example if we always return a null GPUTexture with no Metal texture backing it:

Ref<WebGPUTexture> WebGPUDevice::createTexture(const GPUTextureDescriptor& descriptor) const
{
    auto texture = m_device->tryCreateTexture(descriptor);
    return WebGPUTexture::create(nullptr);
}

The tests under LayoutTests/webgpu/textures-textureviews.html will still all pass.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200504/665885bb/attachment-0001.htm>


More information about the webkit-unassigned mailing list