Closed Bug 1863106 Opened 7 months ago Closed 7 months ago

With the no-readback webgpu enabled, crash on https://webgpu.github.io/webgpu-samples/samples/cornell

Categories

(Core :: Graphics: WebGPU, defect)

defect

Tracking

()

VERIFIED FIXED
121 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox119 --- unaffected
firefox120 --- unaffected
firefox121 --- verified
firefox122 --- verified

People

(Reporter: mayankleoboy1, Assigned: sotaro)

References

(Regression, )

Details

(Keywords: regression)

Crash Data

Attachments

(2 files)

Enable webgpu
Set Set dom.webgpu.swap-chain.external-texture-dx12=True . Restart the browser
Go to https://webgpu.github.io/webgpu-samples/samples/cornell

AR: Crash (2 crash reports are generated)
ER: Not so

https://crash-stats.mozilla.org/report/index/a9f8ef64-5f07-4dbd-b2e4-463f90231104
https://crash-stats.mozilla.org/report/index/afdfe916-4949-426a-8505-e38250231104#tab-bugzilla

See Also: → 1862349
Crash Signature: [@ mozilla::webgpu::CommandEncoder::CommandEncoder ] [@ d3d12::com::impl$4::deref ]
Attached file about:support

Set release status flags based on info from the regressing bug 1856787

:sotaro, since you are the author of the regressor, bug 1856787, could you take a look?

For more information, please visit BugBot documentation.

Flags: needinfo?(sotaro.ikeda.g)
Assignee: nobody → sotaro.ikeda.g
Flags: needinfo?(sotaro.ikeda.g)

During the STR, D3D12 Device was removed. It seemed to cause the problem.

CreateUnorderedAccessView was failed with the following error log.


D3D12 ERROR: ID3D12Device::CreateUnorderedAccessView: A UnorderedAccessView cannot be created of a Resource that did not specify the D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS Flag. [ STATE_CREATION ERROR #340: CREATEUNORDEREDACCESSVIEW_INVALIDRESOURCE]
D3D12: Removing Device.

Adding D3D11_BIND_UNORDERED_ACCESS flag to D3D11 texture addressed the problem for me.

Attachment #9362412 - Attachment description: WIP: Bug 1863106 - Add D3D11_BIND_UNORDERED_ACCESS flag handling to ExternalTextureD3D11::Create() → Bug 1863106 - Set D3D11_BIND_UNORDERED_ACCESS if texture usage has STORAGE_BINDING

wgpu dx12 requests to Texture that if its usage has STORAGE_BINDING, D3D12 resource needs to have D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS.

The equivalent of D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS in D3D11 is D3D11_BIND_UNORDERED_ACCESS. Therefore, D3D11 textures in ExternalTextureD3D11 also require D3D11_BIND_UNORDERED_ACCESS if STORAGE_BINDING is used.

Pushed by sikeda.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/70862704c37d
Set D3D11_BIND_UNORDERED_ACCESS if texture usage has STORAGE_BINDING r=lsalzman
Crash Signature: [@ mozilla::webgpu::CommandEncoder::CommandEncoder ] [@ d3d12::com::impl$4::deref ] → [@ mozilla::webgpu::CommandEncoder::CommandEncoder ] [@ core::result::unwrap_failed | wgpu_core::command::CommandEncoder<T>::open<T>] [@ d3d12::com::ComPtr<T>::as_unknown] [@ d3d12::com::impl$4::deref ]
Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch

This is fixed on latest Nightly. Thanks!

Flags: qe-verify+

Reproducible on a 2023-11-03 Nightly build on Windows 10.
Verified as fixed on Firefox 121.0b4 and Nightly 122.0a1 on Windows 10, Ubuntu 22, macOS 12.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: