[WebGPU] Update texture creation validation according to the discussion at https://github.com/gpuweb/gpuweb/pull/799/files
Created attachment 400283 [details] Patch
Comment on attachment 400283 [details] Patch Looks good! I don't have the power to r+, though.
Comment on attachment 400283 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=400283&action=review > Source/WebCore/platform/graphics/gpu/GPUDevice.cpp:153 > if (descriptor.sampleCount != 1) { > + if (descriptor.sampleCount != 4) { > + m_errorScopes->generatePrefixedError("Texture sampleCount can only be 1 or 4."); > + return { }; > + } Could you move this to an early return? if (descriptor.sampleCount != 1 && descriptor.sampleCount != 4) { error and return } if (descriptor.sampleCount != 1) { // do the stuff for 4 }
Committed r262407: <https://trac.webkit.org/changeset/262407>
<rdar://problem/63860411>