⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 243438 in webkit


Ignore:
Timestamp:
Mar 25, 2019, 8:29:17 AM (7 years ago)
Author:
Justin Fan
Message:

Update WebGPU class names based on sketch.idl
https://bugs.webkit.org/show_bug.cgi?id=194260

Reviewed by Dean Jackson.
Source/WebCore:

Update all exposed Web GPU interface names to GPU* prefix.

Existing Web GPU tests updated to expect new names.

  • Modules/webgpu/WebGPU.idl:
  • Modules/webgpu/WebGPUAdapter.idl:
  • Modules/webgpu/WebGPUBindGroup.idl:
  • Modules/webgpu/WebGPUBindGroupLayout.idl:
  • Modules/webgpu/WebGPUBuffer.idl:
  • Modules/webgpu/WebGPUDevice.idl:
  • Modules/webgpu/WebGPUInputStepMode.h: Removed.
  • Modules/webgpu/WebGPUPipelineLayout.idl:
  • Modules/webgpu/WebGPUProgrammablePassEncoder.idl:
  • Modules/webgpu/WebGPUQueue.idl:
  • Modules/webgpu/WebGPURenderPassEncoder.idl:
  • Modules/webgpu/WebGPURenderPipeline.idl:
  • Modules/webgpu/WebGPUSampler.idl:
  • Modules/webgpu/WebGPUTexture.idl:
  • Modules/webgpu/WebGPUTextureView.idl:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/WebCoreBuiltinNames.h:

LayoutTests:

Update all exposed Web GPU interface names to GPU* prefix.

  • webgpu/adapter-options.html:
  • webgpu/bind-groups.html:
  • webgpu/map-read-buffers.html:
  • webgpu/map-write-buffers.html:
  • webgpu/pipeline-layouts.html:
  • webgpu/queue-creation.html:
  • webgpu/render-command-encoding.html:
  • webgpu/render-pipelines.html:
  • webgpu/textures-textureviews.html:
  • webgpu/webgpu-enabled.html:
Location:
trunk
Files:
1 deleted
28 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r243437 r243438  
     12019-03-25  Justin Fan  <justin_fan@apple.com>
     2
     3        Update WebGPU class names based on sketch.idl
     4        https://bugs.webkit.org/show_bug.cgi?id=194260
     5
     6        Reviewed by Dean Jackson.
     7       
     8        Update all exposed Web GPU interface names to GPU* prefix.
     9
     10        * webgpu/adapter-options.html:
     11        * webgpu/bind-groups.html:
     12        * webgpu/map-read-buffers.html:
     13        * webgpu/map-write-buffers.html:
     14        * webgpu/pipeline-layouts.html:
     15        * webgpu/queue-creation.html:
     16        * webgpu/render-command-encoding.html:
     17        * webgpu/render-pipelines.html:
     18        * webgpu/textures-textureviews.html:
     19        * webgpu/webgpu-enabled.html:
     20
    1212019-03-25  Javier Fernandez  <jfernandez@igalia.com>
    222
  • trunk/LayoutTests/webgpu/adapter-options.html

    r243090 r243438  
    1010    const device = await defaultAdapter.requestDevice();
    1111
    12     assert_true(device instanceof WebGPUDevice, "Default device successfully created.");
     12    assert_true(device instanceof GPUDevice, "Default device successfully created.");
    1313}, "Create the default device.");
    1414
     
    1717    const device = await lowPowerAdapter.requestDevice();
    1818
    19     assert_true(device instanceof WebGPUDevice, "Device successfully created using low-power option.");
     19    assert_true(device instanceof GPUDevice, "Device successfully created using low-power option.");
    2020}, "Create a device with a low-power option.");
    2121
     
    2424    const device = await highPerfAdapter.requestDevice();
    2525
    26     assert_true(device instanceof WebGPUDevice, "Device successfully created using high-performance option.");
     26    assert_true(device instanceof GPUDevice, "Device successfully created using high-performance option.");
    2727}, "Create a device with a high-performance option.");
    2828</script>
  • trunk/LayoutTests/webgpu/bind-groups.html

    r242575 r243438  
    2525
    2626    const bindGroup = device.createBindGroup({ layout: bindGroupLayout, bindings: [bindGroupBinding]});
    27     assert_true(bindGroup instanceof WebGPUBindGroup, "WebGPUBindGroup successfully created.")
     27    assert_true(bindGroup instanceof GPUBindGroup, "WebGPUBindGroup successfully created.")
    2828}, "Create a basic WebGPUBindGroup via WebGPUDevice.")
    2929</script>
  • trunk/LayoutTests/webgpu/map-read-buffers.html

    r242148 r243438  
    1313    promise_test(async () => {
    1414        const buffer = device.createBuffer({ size: 16, usage: GPUBufferUsage.TRANSFER_DST | GPUBufferUsage.MAP_READ });
    15         assert_true(buffer instanceof WebGPUBuffer, "createBuffer returned a WebGPUBuffer");
     15        assert_true(buffer instanceof GPUBuffer, "createBuffer returned a WebGPUBuffer");
    1616
    1717        let array = new Float32Array([1, 2, 3, 4]);
  • trunk/LayoutTests/webgpu/map-write-buffers.html

    r241996 r243438  
    1313    promise_test(async () => {
    1414        const buffer = device.createBuffer({ size: 16, usage: GPUBufferUsage.MAP_WRITE });
    15         assert_true(buffer instanceof WebGPUBuffer, "createBuffer returned a WebGPUBuffer");
     15        assert_true(buffer instanceof GPUBuffer, "createBuffer returned a WebGPUBuffer");
    1616
    1717        let arrayBuffer = await buffer.mapWriteAsync();
  • trunk/LayoutTests/webgpu/pipeline-layouts.html

    r242575 r243438  
    2525    const device = await getBasicDevice();
    2626    const bindGroupLayout = device.createBindGroupLayout({ bindings: [createBindGroupLayoutBinding()] });
    27     assert_true(bindGroupLayout instanceof WebGPUBindGroupLayout, "createBindGroupLayout returned a WebGPUBindGroupLayout");
     27    assert_true(bindGroupLayout instanceof GPUBindGroupLayout, "createBindGroupLayout returned a WebGPUBindGroupLayout");
    2828
    2929    const pipelineLayout = device.createPipelineLayout({ bindGroupLayouts: [bindGroupLayout] });
    30     assert_true(pipelineLayout instanceof WebGPUPipelineLayout, "createPipelineLayout returned a WebGPUPipelineLayout");
     30    assert_true(pipelineLayout instanceof GPUPipelineLayout, "createPipelineLayout returned a WebGPUPipelineLayout");
    3131}, "Create a basic WebGPUPipelineLayout wtih a WebGPUDevice.");
    3232</script>
  • trunk/LayoutTests/webgpu/queue-creation.html

    r243090 r243438  
    1616
    1717    const adapter = await window.gpu.requestAdapter({});
    18     assert_true(adapter instanceof WebGPUAdapter, "requestAdapter returned a WebGPUAdapter.");
     18    assert_true(adapter instanceof GPUAdapter, "requestAdapter returned a WebGPUAdapter.");
    1919
    2020    const device = await adapter.requestDevice();
    21     assert_true(device instanceof WebGPUDevice, "requestDevice returned a WebGPUDevice.");
     21    assert_true(device instanceof GPUDevice, "requestDevice returned a WebGPUDevice.");
    2222
    2323    const queue = device.getQueue();
    24     assert_true(queue instanceof WebGPUQueue, "getQueue returned a WebGPUQueue.");
     24    assert_true(queue instanceof GPUQueue, "getQueue returned a WebGPUQueue.");
    2525
    2626    queue.label = "Example label";
  • trunk/LayoutTests/webgpu/render-command-encoding.html

    r242974 r243438  
    3939
    4040    const encoder = beginBasicRenderPass(swapChain, commandEncoder);
    41     assert_true(encoder instanceof WebGPURenderPassEncoder, "beginRenderPass() returned a WebGPURenderPassEncoder");
     41    assert_true(encoder instanceof GPURenderPassEncoder, "beginRenderPass() returned a WebGPURenderPassEncoder");
    4242
    4343    encoder.setPipeline(pipeline);
  • trunk/LayoutTests/webgpu/render-pipelines.html

    r242839 r243438  
    4949
    5050    const pipeline = createBasicPipeline(shaderModule, device, pipelineLayout);
    51     assert_true(pipeline instanceof WebGPURenderPipeline, "Successfully created WebGPURenderPipeline");
     51    assert_true(pipeline instanceof GPURenderPipeline, "Successfully created WebGPURenderPipeline");
    5252}, "Create basic WebGPURenderPipeline");
    5353</script>
  • trunk/LayoutTests/webgpu/textures-textureviews.html

    r243089 r243438  
    3232
    3333    const texture = swapChain.getCurrentTexture();
    34     assert_true(texture instanceof WebGPUTexture, "Successfully acquired next texture.");
     34    assert_true(texture instanceof GPUTexture, "Successfully acquired next texture.");
    3535
    3636    const textureView = texture.createDefaultView();
    37     assert_true(textureView instanceof WebGPUTextureView, "Successfully created texture view from next texture.");
     37    assert_true(textureView instanceof GPUTextureView, "Successfully created texture view from next texture.");
    3838}, "Create texture view from swap chain.");
    3939
    4040promise_test(async () => {
    4141    const depthTexture = device.createTexture(texDescriptor);
    42     assert_true(depthTexture instanceof WebGPUTexture, "Successfully created depth texture.");
     42    assert_true(depthTexture instanceof GPUTexture, "Successfully created depth texture.");
    4343}, "Create basic depth texture from device.");
    4444
     
    4949
    5050    const multisampledTexture = device.createTexture(texDescriptor);
    51     assert_true(multisampledTexture instanceof WebGPUTexture, "Successfully created multisampled texture.");
     51    assert_true(multisampledTexture instanceof GPUTexture, "Successfully created multisampled texture.");
    5252}, "Create basic 4x multisampled texture.");
    5353
     
    5858
    5959    const texture3d = device.createTexture(texDescriptor);
    60     assert_true(texture3d instanceof WebGPUTexture, "Successfully created basic 3D texture.");
     60    assert_true(texture3d instanceof GPUTexture, "Successfully created basic 3D texture.");
    6161}, "Create basic 3D texture from device.");
    6262
  • trunk/LayoutTests/webgpu/webgpu-enabled.html

    r243090 r243438  
    1414
    1515    const adapter = await window.gpu.requestAdapter();
    16     assert_true(adapter instanceof WebGPUAdapter, "Created default GPUAdapter.");
     16    assert_true(adapter instanceof GPUAdapter, "Created default GPUAdapter.");
    1717   
    1818    const device = await adapter.requestDevice();
    19     assert_true(device instanceof WebGPUDevice, "Created GPUDevice.");
     19    assert_true(device instanceof GPUDevice, "Created GPUDevice.");
    2020}, "Web GPU is enabled.");
    2121</script>
  • trunk/Source/WebCore/ChangeLog

    r243437 r243438  
     12019-03-25  Justin Fan  <justin_fan@apple.com>
     2
     3        Update WebGPU class names based on sketch.idl
     4        https://bugs.webkit.org/show_bug.cgi?id=194260
     5
     6        Reviewed by Dean Jackson.
     7
     8        Update all exposed Web GPU interface names to GPU* prefix.
     9
     10        Existing Web GPU tests updated to expect new names.
     11
     12        * Modules/webgpu/WebGPU.idl:
     13        * Modules/webgpu/WebGPUAdapter.idl:
     14        * Modules/webgpu/WebGPUBindGroup.idl:
     15        * Modules/webgpu/WebGPUBindGroupLayout.idl:
     16        * Modules/webgpu/WebGPUBuffer.idl:
     17        * Modules/webgpu/WebGPUDevice.idl:
     18        * Modules/webgpu/WebGPUInputStepMode.h: Removed.
     19        * Modules/webgpu/WebGPUPipelineLayout.idl:
     20        * Modules/webgpu/WebGPUProgrammablePassEncoder.idl:
     21        * Modules/webgpu/WebGPUQueue.idl:
     22        * Modules/webgpu/WebGPURenderPassEncoder.idl:
     23        * Modules/webgpu/WebGPURenderPipeline.idl:
     24        * Modules/webgpu/WebGPUSampler.idl:
     25        * Modules/webgpu/WebGPUTexture.idl:
     26        * Modules/webgpu/WebGPUTextureView.idl:
     27        * WebCore.xcodeproj/project.pbxproj:
     28        * bindings/js/WebCoreBuiltinNames.h:
     29
    1302019-03-25  Javier Fernandez  <jfernandez@igalia.com>
    231
  • trunk/Source/WebCore/Modules/webgpu/WebGPU.idl

    r240807 r243438  
    2828    Conditional=WEBGPU,
    2929    EnabledAtRuntime=WebGPU,
    30     ImplementationLacksVTable
     30    ImplementationLacksVTable,
     31    InterfaceName=GPU
    3132] interface WebGPU {
    3233    Promise<WebGPUAdapter> requestAdapter(optional GPURequestAdapterOptions options);
  • trunk/Source/WebCore/Modules/webgpu/WebGPUAdapter.idl

    r243090 r243438  
    2828    Conditional=WEBGPU,
    2929    EnabledAtRuntime=WebGPU,
    30     ImplementationLacksVTable
     30    ImplementationLacksVTable,
     31    InterfaceName=GPUAdapter
    3132] interface WebGPUAdapter {
    3233    // readonly attribute DOMString name;
  • trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroup.idl

    r239853 r243438  
    2828    Conditional=WEBGPU,
    2929    EnabledAtRuntime=WebGPU,
    30     ImplementationLacksVTable
     30    ImplementationLacksVTable,
     31    InterfaceName=GPUBindGroup
    3132] interface WebGPUBindGroup {
    3233};
  • trunk/Source/WebCore/Modules/webgpu/WebGPUBindGroupLayout.idl

    r239351 r243438  
    2828    Conditional=WEBGPU,
    2929    EnabledAtRuntime=WebGPU,
    30     ImplementationLacksVTable
     30    ImplementationLacksVTable,
     31    InterfaceName=GPUBindGroupLayout
    3132] interface WebGPUBindGroupLayout {
    3233};
  • trunk/Source/WebCore/Modules/webgpu/WebGPUBuffer.idl

    r242148 r243438  
    3030    Conditional=WEBGPU,
    3131    EnabledAtRuntime=WebGPU,
    32     ImplementationLacksVTable
     32    ImplementationLacksVTable,
     33    InterfaceName=GPUBuffer
    3334] interface WebGPUBuffer {
    3435    void setSubData(u64 offset, ArrayBuffer data);
  • trunk/Source/WebCore/Modules/webgpu/WebGPUDevice.idl

    r243419 r243438  
    4040    Conditional=WEBGPU,
    4141    EnabledAtRuntime=WebGPU,
    42     ImplementationLacksVTable
     42    ImplementationLacksVTable,
     43    InterfaceName=GPUDevice
    4344] interface WebGPUDevice {
    4445    readonly attribute WebGPUAdapter adapter;
  • trunk/Source/WebCore/Modules/webgpu/WebGPUPipelineLayout.idl

    r239410 r243438  
    2828    Conditional=WEBGPU,
    2929    EnabledAtRuntime=WebGPU,
    30     ImplementationLacksVTable
     30    ImplementationLacksVTable,
     31    InterfaceName=GPUPipelineLayout
    3132] interface WebGPUPipelineLayout {
    3233};
  • trunk/Source/WebCore/Modules/webgpu/WebGPUProgrammablePassEncoder.idl

    r243089 r243438  
    3030    Conditional=WEBGPU,
    3131    EnabledAtRuntime=WebGPU,
     32    InterfaceName=GPUProgrammablePassEncoder,
    3233    SkipVTableValidation
    3334] interface WebGPUProgrammablePassEncoder {
  • trunk/Source/WebCore/Modules/webgpu/WebGPUQueue.idl

    r242974 r243438  
    2828    Conditional=WEBGPU,
    2929    EnabledAtRuntime=WebGPU,
    30     ImplementationLacksVTable
     30    ImplementationLacksVTable,
     31    InterfaceName=GPUQueue
    3132] interface WebGPUQueue {
    3233    void submit(sequence<WebGPUCommandBuffer> buffers);
  • trunk/Source/WebCore/Modules/webgpu/WebGPURenderPassEncoder.idl

    r243089 r243438  
    3131    Conditional=WEBGPU,
    3232    EnabledAtRuntime=WebGPU,
     33    InterfaceName=GPURenderPassEncoder,
    3334    JSGenerateToJSObject
    3435] interface WebGPURenderPassEncoder : WebGPUProgrammablePassEncoder {
  • trunk/Source/WebCore/Modules/webgpu/WebGPURenderPipeline.idl

    r237912 r243438  
    2828    Conditional=WEBGPU,
    2929    EnabledAtRuntime=WebGPU,
    30     ImplementationLacksVTable
     30    ImplementationLacksVTable,
     31    InterfaceName=GPURenderPipeline
    3132] interface WebGPURenderPipeline {
    3233};
  • trunk/Source/WebCore/Modules/webgpu/WebGPUSampler.idl

    r242615 r243438  
    2828    Conditional=WEBGPU,
    2929    EnabledAtRuntime=WebGPU,
    30     ImplementationLacksVTable
     30    ImplementationLacksVTable,
     31    InterfaceName=GPUSampler
    3132] interface WebGPUSampler {
    3233};
  • trunk/Source/WebCore/Modules/webgpu/WebGPUTexture.idl

    r243089 r243438  
    2828    Conditional=WEBGPU,
    2929    EnabledAtRuntime=WebGPU,
    30     ImplementationLacksVTable
     30    ImplementationLacksVTable,
     31    InterfaceName=GPUTexture
    3132] interface WebGPUTexture {
    3233    WebGPUTextureView createDefaultView();
  • trunk/Source/WebCore/Modules/webgpu/WebGPUTextureView.idl

    r238382 r243438  
    2828    Conditional=WEBGPU,
    2929    EnabledAtRuntime=WebGPU,
    30     ImplementationLacksVTable
     30    ImplementationLacksVTable,
     31    InterfaceName=GPUTextureView
    3132] interface WebGPUTextureView {
    3233};
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r243419 r243438  
    1412414124                D0615FCD217FE5C6008A48A8 /* WebGPUShaderModule.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebGPUShaderModule.cpp; sourceTree = "<group>"; };
    1412514125                D0615FCE217FE5C6008A48A8 /* WebGPUShaderModule.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUShaderModule.idl; sourceTree = "<group>"; };
    14126                 D063AE4621C06626000E6A35 /* WebGPUInputStepMode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUInputStepMode.h; sourceTree = "<group>"; };
    1412714126                D06A9A2122026C7A0083C662 /* GPURequestAdapterOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPURequestAdapterOptions.h; sourceTree = "<group>"; };
    1412814127                D06C0D8D0CFD11460065F43F /* RemoveFormatCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoveFormatCommand.h; sourceTree = "<group>"; };
     
    2627126270                                D00F595221701D8C000D71DB /* WebGPUDevice.h */,
    2627226271                                D00F595421701D8C000D71DB /* WebGPUDevice.idl */,
    26273                                 D063AE4621C06626000E6A35 /* WebGPUInputStepMode.h */,
    2627426272                                D0C419F02183EB31009EC1DE /* WebGPUPipelineDescriptorBase.h */,
    2627526273                                D0C419F12183EB31009EC1DE /* WebGPUPipelineDescriptorBase.idl */,
  • trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h

    r243419 r243438  
    8282    macro(GamepadButton) \
    8383    macro(GamepadEvent) \
     84    macro(GPU) \
     85    macro(GPUAdapter) \
     86    macro(GPUBindGroup) \
     87    macro(GPUBindGroupLayout) \
     88    macro(GPUBuffer) \
    8489    macro(GPUBufferUsage) \
    8590    macro(GPUCanvasContext) \
     
    8994    macro(GPUComputePassEncoder) \
    9095    macro(GPUComputePipeline) \
     96    macro(GPUDevice) \
     97    macro(GPUPipelineLayout) \
     98    macro(GPUProgrammablePassEncoder) \
     99    macro(GPUQueue) \
     100    macro(GPURenderPassEncoder) \
     101    macro(GPURenderPipeline) \
     102    macro(GPUSampler) \
    91103    macro(GPUShaderStageBit) \
    92104    macro(GPUSwapChain) \
     105    macro(GPUTexture) \
    93106    macro(GPUTextureUsage) \
     107    macro(GPUTextureView) \
    94108    macro(HTMLAttachmentElement) \
    95109    macro(HTMLAudioElement) \
     
    201215    macro(WebGL2RenderingContext) \
    202216    macro(WebGLVertexArrayObject) \
    203     macro(WebGPU) \
    204     macro(WebGPUAdapter) \
    205     macro(WebGPUBindGroup) \
    206     macro(WebGPUBindGroupLayout) \
    207     macro(WebGPUBuffer) \
    208     macro(WebGPUDevice) \
    209     macro(WebGPUIndexFormat) \
    210     macro(WebGPUInputStepMode) \
    211     macro(WebGPUQueue) \
    212     macro(WebGPUPipelineLayout) \
    213     macro(WebGPUProgrammablePassEncoder) \
    214     macro(WebGPURenderPassEncoder) \
    215     macro(WebGPURenderPipeline) \
    216     macro(WebGPUSampler) \
    217     macro(WebGPUTexture) \
    218     macro(WebGPUTextureView) \
    219     macro(WebGPUVertexFormat) \
    220217    macro(WebMetalBuffer) \
    221218    macro(WebMetalCommandBuffer) \
Note: See TracChangeset for help on using the changeset viewer.