Changeset 244406 in webkit
- Timestamp:
- Apr 17, 2019 3:51:21 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r244402 r244406 1 2019-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 1 10 2019-04-17 John Wilander <wilander@apple.com> 2 11 -
trunk/LayoutTests/webgpu/compute-squares.html
r243627 r244406 59 59 passEncoder.setPipeline(pipeline); 60 60 61 passEncoder.dispatch(data.length, 1, 1); 61 // One thread group. 62 passEncoder.dispatch(1, 1, 1); 62 63 passEncoder.endPass(); 63 64 -
trunk/Source/WebCore/ChangeLog
r244404 r244406 1 2019-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 1 13 2019-04-17 Andy Estes <aestes@apple.com> 2 14 -
trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm
r243627 r244406 97 97 98 98 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 100 100 auto w = pipelineState.threadExecutionWidth; 101 101 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. 102 104 auto threadsPerThreadgroup = MTLSizeMake(w, h, 1); 103 105 104 auto threadgroupsPerGrid = MTLSizeMake( (x + w - 1) / w, (y + h - 1) / h, z);106 auto threadgroupsPerGrid = MTLSizeMake(x, y, z); 105 107 106 108 [m_platformComputePassEncoder dispatchThreadgroups:threadgroupsPerGrid threadsPerThreadgroup:threadsPerThreadgroup]; 109 107 110 END_BLOCK_OBJC_EXCEPTIONS; 108 111 }
Note: See TracChangeset
for help on using the changeset viewer.