Changeset 244406 in webkit


Ignore:
Timestamp:
Apr 17, 2019 3:51:21 PM (5 years ago)
Author:
Justin Fan
Message:

[Web GPU] GPUComputePassEncoder::dispatch number of thread groups, not grid size
https://bugs.webkit.org/show_bug.cgi?id=196984

Reviewed by Myles C. Maxfield.

Source/WebCore:

Test: Updated compute-squares.html.

  • platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm:

(WebCore::GPUComputePassEncoder::dispatch):

LayoutTests:

  • webgpu/compute-squares.html: One thread group is enough to process the data in a single pass.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r244402 r244406  
     12019-04-17  Justin Fan  <justin_fan@apple.com>
     2
     3        [Web GPU] GPUComputePassEncoder::dispatch number of thread groups, not grid size
     4        https://bugs.webkit.org/show_bug.cgi?id=196984
     5
     6        Reviewed by Myles C. Maxfield.
     7
     8        * webgpu/compute-squares.html: One thread group is enough to process the data in a single pass.
     9
    1102019-04-17  John Wilander  <wilander@apple.com>
    211
  • trunk/LayoutTests/webgpu/compute-squares.html

    r243627 r244406  
    5959    passEncoder.setPipeline(pipeline);
    6060   
    61     passEncoder.dispatch(data.length, 1, 1);
     61    // One thread group.
     62    passEncoder.dispatch(1, 1, 1);
    6263    passEncoder.endPass();
    6364   
  • trunk/Source/WebCore/ChangeLog

    r244404 r244406  
     12019-04-17  Justin Fan  <justin_fan@apple.com>
     2
     3        [Web GPU] GPUComputePassEncoder::dispatch number of thread groups, not grid size
     4        https://bugs.webkit.org/show_bug.cgi?id=196984
     5
     6        Reviewed by Myles C. Maxfield.
     7
     8        Test: Updated compute-squares.html.
     9
     10        * platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm:
     11        (WebCore::GPUComputePassEncoder::dispatch):
     12
    1132019-04-17  Andy Estes  <aestes@apple.com>
    214
  • trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm

    r243627 r244406  
    9797
    9898    BEGIN_BLOCK_OBJC_EXCEPTIONS;
    99     // FIXME: This should be gleaned from the shader if not using MSL. For now, use the docs' example calculation.
     99
    100100    auto w = pipelineState.threadExecutionWidth;
    101101    auto h = pipelineState.maxTotalThreadsPerThreadgroup / w;
     102
     103    // FIXME: This should be gleaned from the shader if not using MSL. For now, use the docs' example calculation.
    102104    auto threadsPerThreadgroup = MTLSizeMake(w, h, 1);
    103105
    104     auto threadgroupsPerGrid = MTLSizeMake((x + w - 1) / w, (y + h - 1) / h, z);
     106    auto threadgroupsPerGrid = MTLSizeMake(x, y, z);
    105107
    106108    [m_platformComputePassEncoder dispatchThreadgroups:threadgroupsPerGrid threadsPerThreadgroup:threadsPerThreadgroup];
     109
    107110    END_BLOCK_OBJC_EXCEPTIONS;
    108111}
Note: See TracChangeset for help on using the changeset viewer.