Changeset 295174 in webkit
- Timestamp:
- Jun 2, 2022, 11:45:01 PM (4 years ago)
- Location:
- branches/safari-613-branch
- Files:
-
- 4 edited
-
Source/WTF/ChangeLog (modified) (1 diff)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/GPUProcess/graphics/WebGPU/RemoteGPU.h (modified) (1 diff)
-
Tools/ChangeLog (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-613-branch/Source/WTF/ChangeLog
r295172 r295174 1 2022-04-22 Kimmo Kinnunen <kkinnunen@apple.com> 2 3 Thread safety analysis to assert "code is run sequentially" is not useful when code is mainly run with WorkQueues 4 https://bugs.webkit.org/show_bug.cgi?id=236832 5 6 Thread safety analysis is not useful when code is mainly run with WorkQueues. 7 WorkQueue runnables might run in arbitrary thread, but still serially in a specific 8 "work queue". Thus current ThreadAssertion produces false assertions. 9 10 Make Thread and WorkQueue hold "is current" capability. This means the 11 `assertIsCurrent(thread/workQueue)` can establish that the caller holds the capabity, 12 e.g. that the caller is running in the particular thread or work queue. 13 14 Tested by new API tests. 15 16 * wtf/Threading.h: 17 (WTF::WTF_ASSERTS_ACQUIRED_CAPABILITY): 18 * wtf/WorkQueue.h: 19 (WTF::WTF_ASSERTS_ACQUIRED_CAPABILITY): 20 * wtf/cocoa/WorkQueueCocoa.cpp: 21 (WTF::WorkQueueBase::platformInitialize): 22 (WTF::WorkQueue::assertIsCurrent const): 23 (WTF::currentSequenceID): 24 * wtf/generic/WorkQueueGeneric.cpp: 25 (WTF::WorkQueueBase::platformInitialize): 26 (WTF::WorkQueue::assertIsCurrent): 27 (WTF::currentSequenceID): 28 1 29 2022-04-22 Kimmo Kinnunen <kkinnunen@apple.com> 2 30 -
branches/safari-613-branch/Source/WebKit/ChangeLog
r295173 r295174 1 2022-04-22 Kimmo Kinnunen <kkinnunen@apple.com> 2 3 Thread safety analysis to assert "code is run sequentially" is not useful when code is mainly run with WorkQueues 4 https://bugs.webkit.org/show_bug.cgi?id=236832 5 6 Assert directly that the work queues are current instead of using ThreadAssertion. 7 8 * GPUProcess/graphics/RemoteGraphicsContextGL.cpp: 9 (WebKit::RemoteGraphicsContextGL::~RemoteGraphicsContextGL): 10 (WebKit::RemoteGraphicsContextGL::displayWasReconfigured): 11 (WebKit::RemoteGraphicsContextGL::workQueueInitialize): 12 (WebKit::RemoteGraphicsContextGL::workQueueUninitialize): 13 (WebKit::RemoteGraphicsContextGL::didComposite): 14 (WebKit::RemoteGraphicsContextGL::forceContextLost): 15 (WebKit::RemoteGraphicsContextGL::dispatchContextChangedNotification): 16 (WebKit::RemoteGraphicsContextGL::reshape): 17 (WebKit::RemoteGraphicsContextGL::prepareForDisplay): 18 (WebKit::RemoteGraphicsContextGL::synthesizeGLError): 19 (WebKit::RemoteGraphicsContextGL::getError): 20 (WebKit::RemoteGraphicsContextGL::ensureExtensionEnabled): 21 (WebKit::RemoteGraphicsContextGL::markContextChanged): 22 (WebKit::RemoteGraphicsContextGL::paintRenderingResultsToCanvasWithQualifiedIdentifier): 23 (WebKit::RemoteGraphicsContextGL::paintCompositedResultsToCanvasWithQualifiedIdentifier): 24 (WebKit::RemoteGraphicsContextGL::paintCompositedResultsToMediaSample): 25 (WebKit::RemoteGraphicsContextGL::paintPixelBufferToImageBuffer): 26 (WebKit::RemoteGraphicsContextGL::simulateEventForTesting): 27 * GPUProcess/graphics/RemoteGraphicsContextGL.h: 28 (WebKit::RemoteGraphicsContextGL::workQueue const): 29 * GPUProcess/graphics/RemoteGraphicsContextGL.messages.in: 30 * GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp: 31 (WebKit::RemoteGraphicsContextGL::copyTextureFromVideoFrame): 32 (WebKit::RemoteGraphicsContextGLCocoa::platformWorkQueueInitialize): 33 (WebKit::RemoteGraphicsContextGLCocoa::prepareForDisplay): 34 * GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h: 35 (moveErrorsToSyntheticErrorList): 36 (activeTexture): 37 (attachShader): 38 (bindAttribLocation): 39 (bindBuffer): 40 (bindFramebuffer): 41 (bindRenderbuffer): 42 (bindTexture): 43 (blendColor): 44 (blendEquation): 45 (blendEquationSeparate): 46 (blendFunc): 47 (blendFuncSeparate): 48 (checkFramebufferStatus): 49 (clear): 50 (clearColor): 51 (clearDepth): 52 (clearStencil): 53 (colorMask): 54 (compileShader): 55 (copyTexImage2D): 56 (copyTexSubImage2D): 57 (createBuffer): 58 (createFramebuffer): 59 (createProgram): 60 (createRenderbuffer): 61 (createShader): 62 (createTexture): 63 (cullFace): 64 (deleteBuffer): 65 (deleteFramebuffer): 66 (deleteProgram): 67 (deleteRenderbuffer): 68 (deleteShader): 69 (deleteTexture): 70 (depthFunc): 71 (depthMask): 72 (depthRange): 73 (detachShader): 74 (disable): 75 (disableVertexAttribArray): 76 (drawArrays): 77 (drawElements): 78 (enable): 79 (enableVertexAttribArray): 80 (finish): 81 (flush): 82 (framebufferRenderbuffer): 83 (framebufferTexture2D): 84 (frontFace): 85 (generateMipmap): 86 (getActiveAttrib): 87 (getActiveUniform): 88 (getAttribLocation): 89 (getBufferParameteri): 90 (getString): 91 (getFloatv): 92 (getIntegerv): 93 (getInteger64): 94 (getInteger64i): 95 (getProgrami): 96 (getBooleanv): 97 (getFramebufferAttachmentParameteri): 98 (getProgramInfoLog): 99 (getRenderbufferParameteri): 100 (getShaderi): 101 (getShaderInfoLog): 102 (getShaderPrecisionFormat): 103 (getShaderSource): 104 (getTexParameterf): 105 (getTexParameteri): 106 (getUniformfv): 107 (getUniformiv): 108 (getUniformuiv): 109 (getUniformLocation): 110 (getVertexAttribOffset): 111 (hint): 112 (isBuffer): 113 (isEnabled): 114 (isFramebuffer): 115 (isProgram): 116 (isRenderbuffer): 117 (isShader): 118 (isTexture): 119 (lineWidth): 120 (linkProgram): 121 (pixelStorei): 122 (polygonOffset): 123 (renderbufferStorage): 124 (sampleCoverage): 125 (scissor): 126 (shaderSource): 127 (stencilFunc): 128 (stencilFuncSeparate): 129 (stencilMask): 130 (stencilMaskSeparate): 131 (stencilOp): 132 (stencilOpSeparate): 133 (texParameterf): 134 (texParameteri): 135 (uniform1f): 136 (uniform1fv): 137 (uniform1i): 138 (uniform1iv): 139 (uniform2f): 140 (uniform2fv): 141 (uniform2i): 142 (uniform2iv): 143 (uniform3f): 144 (uniform3fv): 145 (uniform3i): 146 (uniform3iv): 147 (uniform4f): 148 (uniform4fv): 149 (uniform4i): 150 (uniform4iv): 151 (uniformMatrix2fv): 152 (uniformMatrix3fv): 153 (uniformMatrix4fv): 154 (useProgram): 155 (validateProgram): 156 (vertexAttrib1f): 157 (vertexAttrib1fv): 158 (vertexAttrib2f): 159 (vertexAttrib2fv): 160 (vertexAttrib3f): 161 (vertexAttrib3fv): 162 (vertexAttrib4f): 163 (vertexAttrib4fv): 164 (vertexAttribPointer): 165 (viewport): 166 (bufferData0): 167 (bufferData1): 168 (bufferSubData): 169 (readnPixels0): 170 (readnPixels1): 171 (texImage2D0): 172 (texImage2D1): 173 (texSubImage2D0): 174 (texSubImage2D1): 175 (compressedTexImage2D0): 176 (compressedTexImage2D1): 177 (compressedTexSubImage2D0): 178 (compressedTexSubImage2D1): 179 (drawArraysInstanced): 180 (drawElementsInstanced): 181 (vertexAttribDivisor): 182 (createVertexArray): 183 (deleteVertexArray): 184 (isVertexArray): 185 (bindVertexArray): 186 (copyBufferSubData): 187 (getBufferSubData): 188 (blitFramebuffer): 189 (framebufferTextureLayer): 190 (invalidateFramebuffer): 191 (invalidateSubFramebuffer): 192 (readBuffer): 193 (renderbufferStorageMultisample): 194 (texStorage2D): 195 (texStorage3D): 196 (texImage3D0): 197 (texImage3D1): 198 (texSubImage3D0): 199 (texSubImage3D1): 200 (copyTexSubImage3D): 201 (compressedTexImage3D0): 202 (compressedTexImage3D1): 203 (compressedTexSubImage3D0): 204 (compressedTexSubImage3D1): 205 (getFragDataLocation): 206 (uniform1ui): 207 (uniform2ui): 208 (uniform3ui): 209 (uniform4ui): 210 (uniform1uiv): 211 (uniform2uiv): 212 (uniform3uiv): 213 (uniform4uiv): 214 (uniformMatrix2x3fv): 215 (uniformMatrix3x2fv): 216 (uniformMatrix2x4fv): 217 (uniformMatrix4x2fv): 218 (uniformMatrix3x4fv): 219 (uniformMatrix4x3fv): 220 (vertexAttribI4i): 221 (vertexAttribI4iv): 222 (vertexAttribI4ui): 223 (vertexAttribI4uiv): 224 (vertexAttribIPointer): 225 (drawRangeElements): 226 (drawBuffers): 227 (clearBufferiv): 228 (clearBufferuiv): 229 (clearBufferfv): 230 (clearBufferfi): 231 (createQuery): 232 (deleteQuery): 233 (isQuery): 234 (beginQuery): 235 (endQuery): 236 (getQuery): 237 (getQueryObjectui): 238 (createSampler): 239 (deleteSampler): 240 (isSampler): 241 (bindSampler): 242 (samplerParameteri): 243 (samplerParameterf): 244 (getSamplerParameterf): 245 (getSamplerParameteri): 246 (fenceSync): 247 (isSync): 248 (deleteSync): 249 (clientWaitSync): 250 (waitSync): 251 (getSynci): 252 (createTransformFeedback): 253 (deleteTransformFeedback): 254 (isTransformFeedback): 255 (bindTransformFeedback): 256 (beginTransformFeedback): 257 (endTransformFeedback): 258 (transformFeedbackVaryings): 259 (getTransformFeedbackVarying): 260 (pauseTransformFeedback): 261 (resumeTransformFeedback): 262 (bindBufferBase): 263 (bindBufferRange): 264 (getUniformIndices): 265 (getActiveUniforms): 266 (getUniformBlockIndex): 267 (getActiveUniformBlockName): 268 (uniformBlockBinding): 269 (getActiveUniformBlockiv): 270 (getGraphicsResetStatusARB): 271 (getTranslatedShaderSourceANGLE): 272 (drawBuffersEXT): 273 (getInternalformativ): 274 (multiDrawArraysANGLE): 275 (multiDrawArraysInstancedANGLE): 276 (multiDrawElementsANGLE): 277 (multiDrawElementsInstancedANGLE): 278 (paintRenderingResultsToPixelBuffer): 279 * GPUProcess/graphics/WebGPU/RemoteGPU.cpp: 280 (WebKit::RemoteGPU::RemoteGPU): 281 (WebKit::RemoteGPU::initialize): 282 (WebKit::RemoteGPU::stopListeningForIPC): 283 (WebKit::RemoteGPU::workQueueInitialize): 284 (WebKit::RemoteGPU::workQueueUninitialize): 285 (WebKit::RemoteGPU::requestAdapter): 286 * GPUProcess/graphics/WebGPU/RemoteGPU.h: 287 * GPUProcess/media/RemoteVideoFrameObjectHeap.cpp: 288 (WebKit::RemoteVideoFrameObjectHeap::~RemoteVideoFrameObjectHeap): 289 (WebKit::RemoteVideoFrameObjectHeap::stopListeningForIPC): 290 (WebKit::RemoteVideoFrameObjectHeap::releaseVideoFrame): 291 * GPUProcess/media/RemoteVideoFrameObjectHeap.h: 292 * Platform/IPC/StreamConnectionWorkQueue.cpp: 293 (IPC::StreamConnectionWorkQueue::assertIsCurrent const): 294 * Platform/IPC/StreamConnectionWorkQueue.h: 295 (IPC::WTF_ASSERTS_ACQUIRED_CAPABILITY): 296 1 297 2022-04-22 Kimmo Kinnunen <kkinnunen@apple.com> 2 298 -
branches/safari-613-branch/Source/WebKit/GPUProcess/graphics/WebGPU/RemoteGPU.h
r295172 r295174 140 140 Ref<IPC::StreamConnectionWorkQueue> m_workQueue; 141 141 RefPtr<IPC::StreamServerConnection> m_streamConnection; 142 RefPtr<PAL::WebGPU::GPU> m_backing WTF_GUARDED_BY_ LOCK(workQueue());143 Ref<WebGPU::ObjectHeap> m_objectHeap WTF_GUARDED_BY_ LOCK(workQueue());142 RefPtr<PAL::WebGPU::GPU> m_backing WTF_GUARDED_BY_CAPABILITY(workQueue()); 143 Ref<WebGPU::ObjectHeap> m_objectHeap WTF_GUARDED_BY_CAPABILITY(workQueue()); 144 144 const WebGPUIdentifier m_identifier; 145 145 Ref<RemoteRenderingBackend> m_renderingBackend; -
branches/safari-613-branch/Tools/ChangeLog
r295172 r295174 1 2022-04-22 Kimmo Kinnunen <kkinnunen@apple.com> 2 3 Thread safety analysis to assert "code is run sequentially" is not useful when code is mainly run with WorkQueues 4 https://bugs.webkit.org/show_bug.cgi?id=236832 5 6 Test the added functionality to be able to use assertIsCurrent(thread/workQueue). 7 8 Fix WTF_WorkQueue.DestroyDispatchedOnDispatchQueue test, it is now able to make the assertion correctly. 9 - The object is created somewhere that is not the tested WorkQueue 10 - The object is destroyed in the tested WorkQueue 11 12 * Scripts/generate-gpup-webgl: 13 * TestWebKitAPI/Tests/WTF/Threading.cpp: 14 (TestWebKitAPI::TEST): 15 * TestWebKitAPI/Tests/WTF/WorkQueue.cpp: 16 (TestWebKitAPI::TEST): 17 1 18 2022-04-22 Kimmo Kinnunen <kkinnunen@apple.com> 2 19
Note:
See TracChangeset
for help on using the changeset viewer.