Changeset 248277 in webkit
- Timestamp:
- Aug 5, 2019, 4:17:48 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
Modules/webgpu/WHLSL/WHLSLPrepare.h (modified) (1 diff)
-
platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm (modified) (2 diffs)
-
platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r248276 r248277 1 2019-08-05 Saam Barati <sbarati@apple.com> 2 3 [WHLSL] Add compile time flag to dump metal compile times 4 https://bugs.webkit.org/show_bug.cgi?id=200447 5 6 Reviewed by Myles C. Maxfield. 7 8 * Modules/webgpu/WHLSL/WHLSLPrepare.h: 9 * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm: 10 (WebCore::trySetFunctions): 11 * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm: 12 (WebCore::trySetFunctions): 13 1 14 2019-08-05 Chris Dumez <cdumez@apple.com> 2 15 -
trunk/Source/WebCore/Modules/webgpu/WHLSL/WHLSLPrepare.h
r248266 r248277 37 37 namespace WHLSL { 38 38 39 constexpr bool dumpMetalCompileTimes = false; 40 39 41 struct RenderPrepareResult { 40 42 String metalSource; -
trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm
r248266 r248277 35 35 #import <Metal/Metal.h> 36 36 #import <wtf/BlockObjCExceptions.h> 37 #import <wtf/DataLog.h> 38 #import <wtf/MonotonicTime.h> 37 39 #import <wtf/text/StringConcatenate.h> 38 40 … … 86 88 87 89 BEGIN_BLOCK_OBJC_EXCEPTIONS; 90 MonotonicTime startTime; 91 if (WHLSL::dumpMetalCompileTimes) 92 startTime = MonotonicTime::now(); 88 93 computeLibrary = adoptNS([device.platformDevice() newLibraryWithSource:whlslCompileResult->metalSource options:nil error:&error]); 94 if (WHLSL::dumpMetalCompileTimes) 95 dataLogLn("Metal compile times: ", (MonotonicTime::now() - startTime).milliseconds(), " ms"); 89 96 END_BLOCK_OBJC_EXCEPTIONS; 90 97 #ifndef NDEBUG -
trunk/Source/WebCore/platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm
r248266 r248277 38 38 #import <wtf/BlockObjCExceptions.h> 39 39 #import <wtf/CheckedArithmetic.h> 40 #import <wtf/DataLog.h> 40 41 #import <wtf/HashSet.h> 42 #import <wtf/MonotonicTime.h> 41 43 #import <wtf/OptionSet.h> 42 44 #import <wtf/Optional.h> … … 398 400 399 401 BEGIN_BLOCK_OBJC_EXCEPTIONS; 402 MonotonicTime startTime; 403 if (WHLSL::dumpMetalCompileTimes) 404 startTime = MonotonicTime::now(); 400 405 vertexLibrary = adoptNS([device.platformDevice() newLibraryWithSource:whlslCompileResult->metalSource options:nil error:&error]); 406 if (WHLSL::dumpMetalCompileTimes) 407 dataLogLn("Metal compile times: ", (MonotonicTime::now() - startTime).milliseconds(), " ms"); 401 408 END_BLOCK_OBJC_EXCEPTIONS; 402 409
Note:
See TracChangeset
for help on using the changeset viewer.