Source/WebCore:
[Web GPU] Implement API default values
https://bugs.webkit.org/show_bug.cgi?id=197032

Reviewed by Myles C. Maxfield.

Add default values and 'required' qualifiers recently merged to the WebGPU API.

WebGPU tests specifying these default values have been updated to rely on them for functionality.

* Modules/webgpu/GPUBindGroupLayoutBinding.idl:
* Modules/webgpu/GPUBindGroupLayoutDescriptor.idl:
* Modules/webgpu/GPUBlendDescriptor.idl:
* Modules/webgpu/GPUBufferDescriptor.idl:
* Modules/webgpu/GPUColor.idl:
* Modules/webgpu/GPUColorStateDescriptor.idl:
* Modules/webgpu/GPUDepthStencilStateDescriptor.idl:
* Modules/webgpu/GPUExtent3D.idl:
* Modules/webgpu/GPUInputStateDescriptor.idl:
* Modules/webgpu/GPUOrigin3D.h:
* Modules/webgpu/GPUOrigin3D.idl:
* Modules/webgpu/GPURequestAdapterOptions.idl:
* Modules/webgpu/GPUTextureDescriptor.idl:
* Modules/webgpu/GPUVertexAttributeDescriptor.idl:
* Modules/webgpu/GPUVertexInputDescriptor.idl:
* Modules/webgpu/WebGPUBindGroupBinding.idl:
* Modules/webgpu/WebGPUBindGroupDescriptor.idl:
* Modules/webgpu/WebGPUBufferBinding.h:
* Modules/webgpu/WebGPUBufferBinding.idl:
* Modules/webgpu/WebGPUCommandEncoder.idl:
* Modules/webgpu/WebGPUPipelineDescriptorBase.idl:
* Modules/webgpu/WebGPUPipelineLayoutDescriptor.idl:
* Modules/webgpu/WebGPUPipelineStageDescriptor.idl:
* Modules/webgpu/WebGPURenderPassDescriptor.idl:
* Modules/webgpu/WebGPURenderPipelineDescriptor.cpp:
(WebCore::WebGPURenderPipelineDescriptor::tryCreateGPURenderPipelineDescriptor const):
* Modules/webgpu/WebGPURenderPipelineDescriptor.h:
* Modules/webgpu/WebGPURenderPipelineDescriptor.idl:
* Modules/webgpu/WebGPUShaderModuleDescriptor.idl:
* platform/graphics/gpu/GPUBlendDescriptor.h:
* platform/graphics/gpu/GPUColorStateDescriptor.h:
* platform/graphics/gpu/GPUCommandBuffer.h:
* platform/graphics/gpu/GPUDepthStencilStateDescriptor.h:
* platform/graphics/gpu/GPURenderPassDescriptor.h:
* platform/graphics/gpu/GPURenderPipelineDescriptor.h:
(WebCore::GPURenderPipelineDescriptor::GPURenderPipelineDescriptor):
* platform/graphics/gpu/GPURequestAdapterOptions.h:
* platform/graphics/gpu/GPUTextureDescriptor.h:
* platform/graphics/gpu/GPUVertexAttributeDescriptor.h:
* platform/graphics/gpu/GPUVertexInputDescriptor.h:
* platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
(WebCore::convertRenderPipelineDescriptor):
(WebCore::trySetFunctionsForPipelineDescriptor):

LayoutTests:
[WebGPU] Implement API default values
https://bugs.webkit.org/show_bug.cgi?id=197032

Reviewed by Myles C. Maxfield.

Update WebGPU tests to use default values wherever applicable.

* webgpu/bind-groups.html:
* webgpu/blend-triangle-strip.html:
* webgpu/blit-commands.html:
* webgpu/buffer-command-buffer-races.html:
* webgpu/buffer-resource-triangles.html:
* webgpu/color-write-mask-triangle-strip.html:
* webgpu/compute-squares.html:
* webgpu/depth-enabled-triangle-strip.html:
* webgpu/draw-indexed-triangles.html:
* webgpu/js/webgpu-functions.js:
(createBasicDepthTexture):
* webgpu/texture-triangle-strip.html:
* webgpu/textures-textureviews.html:
* webgpu/vertex-buffer-triangle-strip.html:
* webgpu/whlsl.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@244442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/webgpu/blit-commands.html b/LayoutTests/webgpu/blit-commands.html
index d71947e..d7ea225 100644
--- a/LayoutTests/webgpu/blit-commands.html
+++ b/LayoutTests/webgpu/blit-commands.html
@@ -38,7 +38,6 @@
     const bufferB = device.createBuffer(bufferDescriptor);
     const bufferViewB = {
         buffer: bufferB,
-        offset: 0,
         rowPitch: image.width * 4,
         imageHeight: 0
     };
@@ -50,28 +49,14 @@
     };
     const textureDescriptor = {
         size: textureSize,
-        arrayLayerCount: 1,
-        mipLevelCount: 1,
-        sampleCount: 1,
-        dimension: "2d",
         format: "rgba8unorm",
         usage: GPUTextureUsage.TRANSFER_SRC | GPUTextureUsage.TRANSFER_DST
     };
     const textureA = device.createTexture(textureDescriptor);
-    const textureViewA = {
-        texture: textureA,
-        mipLevel: 0,
-        arrayLayer: 0,
-        origin: { x: 0, y: 0, z: 0 }
-    };
+    const textureViewA = { texture: textureA };
 
     const textureB = device.createTexture(textureDescriptor);
-    const textureViewB = {
-        texture: textureB,
-        mipLevel: 0,
-        arrayLayer: 0,
-        origin: { x: 0, y: 0, z: 0 }
-    };
+    const textureViewB = { texture: textureB };
 
     const readBufferDescriptor = {
         size: imageData.data.byteLength,
@@ -80,7 +65,6 @@
     const readBuffer = device.createBuffer(readBufferDescriptor);
     const readBufferView = {
         buffer: readBuffer,
-        offset: 0,
         rowPitch: image.width * 4,
         imageHeight: 0
     };