Changeset 293718 in webkit
- Timestamp:
- May 3, 2022, 12:47:42 AM (4 years ago)
- Location:
- trunk/Source/WebGPU
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
WebGPU/Adapter.mm (modified) (1 diff)
-
WebGPU/Instance.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebGPU/ChangeLog
r293675 r293718 1 2022-05-03 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [WebGPU] Device creation should not always fail if supported features are requested 4 https://bugs.webkit.org/show_bug.cgi?id=239955 5 6 Reviewed by Kimmo Kinnunen. 7 8 Somehow a block of code was remaining from before we implemented optional features. 9 10 Test: webgpu/api/validation/createTexture 11 12 * WebGPU/Adapter.mm: 13 (WebGPU::Adapter::requestDevice): 14 * WebGPU/Instance.mm: 15 (WebGPU::Instance::requestAdapter): 16 1 17 2022-05-02 Alex Christensen <achristensen@webkit.org> 2 18 -
trunk/Source/WebGPU/WebGPU/Adapter.mm
r293098 r293718 88 88 instance().scheduleWork([strongThis = Ref { *this }, callback = WTFMove(callback)]() mutable { 89 89 callback(WGPURequestDeviceStatus_Error, Device::createInvalid(strongThis), "Unknown descriptor type"_s); 90 });91 return;92 }93 94 if (descriptor.requiredFeaturesCount) {95 instance().scheduleWork([strongThis = Ref { *this }, callback = WTFMove(callback)]() mutable {96 callback(WGPURequestDeviceStatus_Error, Device::createInvalid(strongThis), "Device does not support requested features"_s);97 90 }); 98 91 return; -
trunk/Source/WebGPU/WebGPU/Instance.mm
r293098 r293718 187 187 auto device = sortedDevices[0]; 188 188 189 auto deviceCapabil ties = hardwareCapabilities(device);190 191 if (!deviceCapabil ties) {189 auto deviceCapabilities = hardwareCapabilities(device); 190 191 if (!deviceCapabilities) { 192 192 scheduleWork([strongThis = Ref { *this }, callback = WTFMove(callback)]() mutable { 193 193 callback(WGPURequestAdapterStatus_Error, Adapter::createInvalid(strongThis), "Device does not support WebGPU"_s); … … 196 196 } 197 197 198 scheduleWork([strongThis = Ref { *this }, device = sortedDevices[0], deviceCapabil ties = WTFMove(*deviceCapabilties), callback = WTFMove(callback)]() mutable {199 callback(WGPURequestAdapterStatus_Success, Adapter::create(device, strongThis, WTFMove(deviceCapabil ties)), { });198 scheduleWork([strongThis = Ref { *this }, device = sortedDevices[0], deviceCapabilities = WTFMove(*deviceCapabilities), callback = WTFMove(callback)]() mutable { 199 callback(WGPURequestAdapterStatus_Success, Adapter::create(device, strongThis, WTFMove(deviceCapabilities)), { }); 200 200 }); 201 201 }
Note:
See TracChangeset
for help on using the changeset viewer.