Changeset 258875 in webkit
- Timestamp:
- Mar 23, 2020 2:28:16 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r258871 r258875 1 2020-03-23 Dean Jackson <dino@apple.com> 2 3 [WebGL] Skip vertexAttrib0 simulation when using ANGLE 4 https://bugs.webkit.org/show_bug.cgi?id=209416 5 <rdar://problem/60765734> 6 7 Reviewed by Antoine Quint. 8 9 Remove the console logging that is no longer output when using ANGLE. 10 Remove failing expectations for some tests. 11 12 * fast/canvas/webgl/index-validation-with-subsequent-draws-expected.txt: 13 * fast/canvas/webgl/out-of-bounds-simulated-vertexAttrib0-drawArrays-expected.txt: 14 * platform/mac/TestExpectations: 15 1 16 2020-03-23 Darin Adler <darin@apple.com> 2 17 -
trunk/LayoutTests/fast/canvas/webgl/index-validation-with-subsequent-draws-expected.txt
r231441 r258875 1 CONSOLE MESSAGE: line 50: WebGL: INVALID_OPERATION: drawElements: unable to simulate vertexAttrib0 array2 CONSOLE MESSAGE: line 56: WebGL: INVALID_OPERATION: drawElements: unable to simulate vertexAttrib0 array3 1 -
trunk/LayoutTests/fast/canvas/webgl/out-of-bounds-simulated-vertexAttrib0-drawArrays-expected.txt
r198091 r258875 1 CONSOLE MESSAGE: line 30: WebGL: INVALID_OPERATION: drawArrays: attempt to access outside the bounds of the simulated vertexAttrib0 array2 1 -
trunk/LayoutTests/platform/ios-simulator/TestExpectations
r258514 r258875 119 119 webkit.org/b/189686 webgl/2.0.0/conformance2/buffers/one-large-uniform-buffer.html [ Skip ] 120 120 121 # This test takes a long time to execute in the simulator, since it creates a huge (empty) buffer 122 # to draw lots of nothing. 123 webkit.org/b/209416 fast/canvas/webgl/out-of-bounds-simulated-vertexAttrib0-drawArrays.html [ Pass Timeout ] 124 121 125 imported/w3c/web-platform-tests/css/css-lists/content-property/marker-text-matches-georgian.html [ ImageOnlyFailure ] 122 126 imported/w3c/web-platform-tests/css/css-lists/content-property/marker-text-matches-lower-greek.html [ Pass ] -
trunk/LayoutTests/platform/mac/TestExpectations
r258823 r258875 1979 1979 1980 1980 webkit.org/b/207858 fast/canvas/webgl/program-test.html [ Failure ] 1981 webkit.org/b/207858 fast/canvas/webgl/readPixels-float.html [ Failure ]1982 webkit.org/b/207858 fast/canvas/webgl/draw-elements-out-of-bounds-uint-index.html [ Failure ]1983 webkit.org/b/207858 fast/canvas/webgl/webgl2-texture-upload-enums.html [ Failure ]1984 1981 webkit.org/b/207858 webgl/1.0.3/conformance/programs/program-test.html [ Failure ] 1985 1982 -
trunk/Source/WebCore/ChangeLog
r258871 r258875 1 2020-03-23 Dean Jackson <dino@apple.com> 2 3 [WebGL] Skip vertexAttrib0 simulation when using ANGLE 4 https://bugs.webkit.org/show_bug.cgi?id=209416 5 <rdar://problem/60765734> 6 7 Reviewed by Antoine Quint. 8 9 When using ANGLE as a backend, we do not need to simulate a 10 missing vertexAttrib0 at the WebGL layer, since ANGLE will 11 handle it for us. 12 13 This causes a couple of tests to begin passing (they were marked as 14 failures). It also allows us to re-land r258025, which was rolled 15 out in r258226. 16 17 * html/canvas/WebGL2RenderingContext.cpp: Wrap any code that does vertexAttrib0 18 simulation in a !USE(ANGLE). 19 (WebCore::WebGL2RenderingContext::initializeVertexArrayObjects): 20 * html/canvas/WebGLRenderingContext.cpp: 21 (WebCore::WebGLRenderingContext::initializeVertexArrayObjects): 22 * html/canvas/WebGLRenderingContextBase.cpp: 23 (WebCore::WebGLRenderingContextBase::~WebGLRenderingContextBase): 24 (WebCore::WebGLRenderingContextBase::disableVertexAttribArray): 25 (WebCore::WebGLRenderingContextBase::validateDrawArrays): 26 (WebCore::WebGLRenderingContextBase::validateDrawElements): 27 (WebCore::WebGLRenderingContextBase::drawArrays): 28 (WebCore::WebGLRenderingContextBase::drawElements): 29 (WebCore::WebGLRenderingContextBase::getActiveUniform): 30 (WebCore::WebGLRenderingContextBase::getVertexAttrib): 31 (WebCore::WebGLRenderingContextBase::vertexAttribfImpl): 32 (WebCore::WebGLRenderingContextBase::vertexAttribfvImpl): 33 * html/canvas/WebGLRenderingContextBase.h: 34 * html/canvas/WebGLVertexArrayObjectBase.cpp: 35 (WebCore::WebGLVertexArrayObjectBase::unbindBuffer): 36 1 37 2020-03-23 Darin Adler <darin@apple.com> 2 38 -
trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
r258478 r258875 121 121 bindVertexArray(nullptr); // The default VAO was removed in OpenGL 3.3 but not from WebGL 2; bind the default for WebGL to use. 122 122 #endif 123 #if !USE(ANGLE) 123 124 if (!isGLES2Compliant()) 124 125 initVertexAttrib0(); 126 #endif 125 127 } 126 128 -
trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp
r256697 r258875 108 108 addContextObject(*m_defaultVertexArrayObject); 109 109 m_boundVertexArrayObject = m_defaultVertexArrayObject; 110 #if !USE(ANGLE) 110 111 if (!isGLES2Compliant()) 111 112 initVertexAttrib0(); 113 #endif 112 114 } 113 115 -
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
r257799 r258875 859 859 m_defaultVertexArrayObject = nullptr; 860 860 m_boundVertexArrayObject = nullptr; 861 #if !USE(ANGLE) 861 862 m_vertexAttrib0Buffer = nullptr; 863 #endif 862 864 m_currentProgram = nullptr; 863 865 m_framebufferBinding = nullptr; … … 1963 1965 state.enabled = false; 1964 1966 1967 #if !USE(ANGLE) 1965 1968 if (index > 0 || isGLES2Compliant()) 1969 #endif 1966 1970 m_context->disableVertexAttribArray(index); 1967 1971 } … … 2177 2181 return false; 2178 2182 } 2183 #if !USE(ANGLE) 2179 2184 if (!validateSimulatedVertexAttrib0(checkedSum.unsafeGet() - 1)) { 2180 2185 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, functionName, "attempt to access outside the bounds of the simulated vertexAttrib0 array"); 2181 2186 return false; 2182 2187 } 2188 #endif 2183 2189 2184 2190 const char* reason = "framebuffer incomplete"; … … 2255 2261 } 2256 2262 2263 #if !USE(ANGLE) 2257 2264 if (!validateSimulatedVertexAttrib0(numElements)) { 2258 2265 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, functionName, "attempt to access outside the bounds of the simulated vertexAttrib0 array"); 2259 2266 return false; 2260 2267 } 2268 #endif 2261 2269 2262 2270 const char* reason = "framebuffer incomplete"; … … 2279 2287 clearIfComposited(); 2280 2288 2289 #if !USE(ANGLE) 2281 2290 bool vertexAttrib0Simulated = false; 2282 2291 if (!isGLES2Compliant()) { … … 2289 2298 vertexAttrib0Simulated = simulateVertexAttrib0Status.value(); 2290 2299 } 2300 #endif 2291 2301 bool usesFallbackTexture = false; 2292 2302 if (!isGLES2NPOTStrict()) … … 2299 2309 } 2300 2310 2311 #if !USE(ANGLE) 2301 2312 if (!isGLES2Compliant() && vertexAttrib0Simulated) 2302 2313 restoreStatesAfterVertexAttrib0Simulation(); 2314 #endif 2303 2315 if (usesFallbackTexture) 2304 2316 checkTextureCompleteness("drawArrays", false); … … 2337 2349 if (!numElements) 2338 2350 validateIndexArrayPrecise(count, type, static_cast<GCGLintptr>(offset), numElements); 2351 #if !USE(ANGLE) 2339 2352 auto simulateVertexAttrib0Status = simulateVertexAttrib0(numElements); 2340 2353 if (!simulateVertexAttrib0Status) { … … 2344 2357 } 2345 2358 vertexAttrib0Simulated = simulateVertexAttrib0Status.value(); 2359 #endif 2346 2360 } 2347 2361 … … 2361 2375 } 2362 2376 2377 #if !USE(ANGLE) 2363 2378 if (!isGLES2Compliant() && vertexAttrib0Simulated) 2364 2379 restoreStatesAfterVertexAttrib0Simulation(); 2380 #else 2381 UNUSED_VARIABLE(vertexAttrib0Simulated); 2382 #endif 2365 2383 if (usesFallbackTexture) 2366 2384 checkTextureCompleteness("drawElements", false); … … 2548 2566 if (!m_context->getActiveUniform(objectOrZero(program), index, info)) 2549 2567 return nullptr; 2568 // FIXME: Do we still need this for the ANGLE backend? 2550 2569 if (!isGLES2Compliant()) 2551 2570 if (info.size > 1 && !info.name.endsWith("[0]")) … … 3050 3069 switch (pname) { 3051 3070 case GraphicsContextGL::VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: 3071 #if !USE(ANGLE) 3052 3072 if ((!isGLES2Compliant() && !index && m_boundVertexArrayObject->getVertexAttribState(0).bufferBinding == m_vertexAttrib0Buffer) 3053 3073 || !state.bufferBinding 3054 3074 || !state.bufferBinding->object()) 3055 3075 return nullptr; 3076 #endif 3056 3077 return state.bufferBinding; 3057 3078 case GraphicsContextGL::VERTEX_ATTRIB_ARRAY_ENABLED: … … 6110 6131 return; 6111 6132 } 6133 #if !USE(ANGLE) 6112 6134 // In GL, we skip setting vertexAttrib0 values. 6113 if (index || isGLES2Compliant()) { 6135 if (index || isGLES2Compliant()) 6136 #endif 6137 { 6114 6138 switch (expectedSize) { 6115 6139 case 1: … … 6154 6178 return; 6155 6179 } 6180 #if !USE(ANGLE) 6156 6181 // In GL, we skip setting vertexAttrib0 values. 6157 if (index || isGLES2Compliant()) { 6182 if (index || isGLES2Compliant()) 6183 #endif 6184 { 6158 6185 switch (expectedSize) { 6159 6186 case 1: … … 6177 6204 } 6178 6205 6206 #if !USE(ANGLE) 6179 6207 void WebGLRenderingContextBase::initVertexAttrib0() 6180 6208 { … … 6289 6317 m_context->bindBuffer(GraphicsContextGL::ARRAY_BUFFER, objectOrZero(m_boundArrayBuffer.get())); 6290 6318 } 6319 #endif 6291 6320 6292 6321 void WebGLRenderingContextBase::dispatchContextLostEvent() … … 6559 6588 clearIfComposited(); 6560 6589 6590 #if !USE(ANGLE) 6561 6591 bool vertexAttrib0Simulated = false; 6562 6592 if (!isGLES2Compliant()) { … … 6569 6599 vertexAttrib0Simulated = simulateVertexAttrib0Status.value(); 6570 6600 } 6601 #endif 6571 6602 if (!isGLES2NPOTStrict()) 6572 6603 checkTextureCompleteness("drawArraysInstanced", true); … … 6574 6605 m_context->drawArraysInstanced(mode, first, count, primcount); 6575 6606 6607 #if !USE(ANGLE) 6576 6608 if (!isGLES2Compliant() && vertexAttrib0Simulated) 6577 6609 restoreStatesAfterVertexAttrib0Simulation(); 6610 #endif 6578 6611 if (!isGLES2NPOTStrict()) 6579 6612 checkTextureCompleteness("drawArraysInstanced", false); … … 6598 6631 if (!numElements) 6599 6632 validateIndexArrayPrecise(count, type, static_cast<GCGLintptr>(offset), numElements); 6633 #if !USE(ANGLE) 6600 6634 auto simulateVertexAttrib0Status = simulateVertexAttrib0(numElements); 6601 6635 if (!simulateVertexAttrib0Status) { … … 6605 6639 } 6606 6640 vertexAttrib0Simulated = simulateVertexAttrib0Status.value(); 6641 #endif 6607 6642 } 6608 6643 if (!isGLES2NPOTStrict()) … … 6616 6651 m_context->drawElementsInstanced(mode, count, type, static_cast<GCGLintptr>(offset), primcount); 6617 6652 6653 #if !USE(ANGLE) 6618 6654 if (!isGLES2Compliant() && vertexAttrib0Simulated) 6619 6655 restoreStatesAfterVertexAttrib0Simulation(); 6656 #else 6657 UNUSED_VARIABLE(vertexAttrib0Simulated); 6658 #endif 6620 6659 if (!isGLES2NPOTStrict()) 6621 6660 checkTextureCompleteness("drawElementsInstanced", false); -
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h
r257799 r258875 513 513 Vector<VertexAttribValue> m_vertexAttribValue; 514 514 unsigned m_maxVertexAttribs; 515 #if !USE(ANGLE) 515 516 RefPtr<WebGLBuffer> m_vertexAttrib0Buffer; 516 517 long m_vertexAttrib0BufferSize { 0 }; … … 518 519 bool m_forceAttrib0BufferRefill { true }; 519 520 bool m_vertexAttrib0UsedBefore { false }; 521 #endif 520 522 521 523 RefPtr<WebGLProgram> m_currentProgram; … … 821 823 bool validateAndCacheBufferBinding(const char* functionName, GCGLenum target, WebGLBuffer*); 822 824 825 #if !USE(ANGLE) 823 826 // Helpers for simulating vertexAttrib0. 824 827 void initVertexAttrib0(); … … 826 829 bool validateSimulatedVertexAttrib0(GCGLuint numVertex); 827 830 void restoreStatesAfterVertexAttrib0Simulation(); 831 #endif 828 832 829 833 // Wrapper for GraphicsContextGLOpenGL::synthesizeGLError that sends a message to the JavaScript console. -
trunk/Source/WebCore/html/canvas/WebGLVertexArrayObjectBase.cpp
r254214 r258875 83 83 buffer.onDetached(context()->graphicsContextGL()); 84 84 85 #if !USE(ANGLE) 85 86 if (!i && !context()->isGLES2Compliant()) { 86 87 state.bufferBinding = context()->m_vertexAttrib0Buffer; … … 94 95 state.offset = 0; 95 96 } else 97 #endif 96 98 state.bufferBinding = nullptr; 97 99 }
Note: See TracChangeset
for help on using the changeset viewer.