Changeset 173527 in webkit
- Timestamp:
- Sep 11, 2014, 12:22:06 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/platform/mac/TestExpectations (modified) (1 diff)
-
Source/ThirdParty/ANGLE/ChangeLog (modified) (1 diff)
-
Source/ThirdParty/ANGLE/src/compiler/translator/Compiler.cpp (modified) (2 diffs)
-
Source/ThirdParty/ANGLE/src/compiler/translator/ShHandle.h (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/html/canvas/WebGLRenderingContext.cpp (modified) (1 diff)
-
Source/WebCore/platform/graphics/GraphicsContext3D.h (modified) (1 diff)
-
Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r173523 r173527 1 2014-09-10 Roger Fong <roger_fong@apple.com> 2 3 Check for varying packing restrictions per program instead of per shader. 4 https://bugs.webkit.org/show_bug.cgi?id=136585. 5 <rdar://problem/16308409>. 6 7 Reviewed by Dean Jackson. 8 9 * platform/mac/TestExpectations: 10 1 11 2014-09-11 Beth Dakin <bdakin@apple.com> 2 12 -
trunk/LayoutTests/platform/mac/TestExpectations
r173519 r173527 551 551 webgl/1.0.1/conformance/textures/origin-clean-conformance.html [ Skip ] 552 552 webgl/1.0.1/conformance/context/context-lost-restored.html [ Failure ] 553 webgl/1.0.2/conformance/ogles/GL/build/build_009_to_016.html [ Failure ]554 553 webgl/1.0.2/conformance/context/context-creation-and-destruction.html [ Failure Timeout ] 555 554 webgl/1.0.2/conformance/rendering/multisample-corruption.html [ Failure Timeout ] -
trunk/Source/ThirdParty/ANGLE/ChangeLog
r173364 r173527 1 2014-09-10 Roger Fong <roger_fong@apple.com> 2 3 Check for varying packing restrictions per program instead of per shader. 4 https://bugs.webkit.org/show_bug.cgi?id=136585. 5 <rdar://problem/16308409>. 6 7 Reviewed by Dean Jackson. 8 9 Remove varying packing restrictions checks from ANGLE. 10 * src/compiler/translator/Compiler.cpp: 11 (TCompiler::compile): 12 (TCompiler::enforcePackingRestrictions): 13 * src/compiler/translator/ShHandle.h: 14 1 15 2014-09-06 Darin Adler <darin@apple.com> 2 16 -
trunk/Source/ThirdParty/ANGLE/src/compiler/translator/Compiler.cpp
r173352 r173527 240 240 { 241 241 collectVariables(root); 242 if (compileOptions & SH_ENFORCE_PACKING_RESTRICTIONS) 242 if (compileOptions & SH_ENFORCE_PACKING_RESTRICTIONS) { 243 243 success = enforcePackingRestrictions(); 244 if (!success) { 245 infoSink.info.prefix(EPrefixError); 246 infoSink.info << "too many uniforms"; 247 return false; 248 } 249 } 250 244 251 if (success && shaderType == SH_VERTEX_SHADER && 245 252 (compileOptions & SH_INIT_VARYINGS_WITHOUT_STATIC_USE)) … … 454 461 { 455 462 VariablePacker packer; 456 bool success = packer.CheckVariablesWithinPackingLimits(maxUniformVectors, uniforms); 457 if (!success) { 458 infoSink.info.prefix(EPrefixError); 459 infoSink.info << "too many uniforms"; 460 return false; 461 } 462 463 success = packer.CheckVariablesWithinPackingLimits(maxVaryingVectors, varyings); 464 465 if (!success) { 466 infoSink.info.prefix(EPrefixError); 467 infoSink.info << "too many varyings"; 468 return false; 469 } 470 return true; 463 return packer.CheckVariablesWithinPackingLimits(maxUniformVectors, uniforms); 471 464 } 472 465 -
trunk/Source/ThirdParty/ANGLE/src/compiler/translator/ShHandle.h
r168055 r173527 96 96 virtual void translate(TIntermNode* root) = 0; 97 97 // Returns true if, after applying the packing rules in the GLSL 1.017 spec 98 // Appendix A, section 7, the shader does not use too many uniforms or varyings.98 // Appendix A, section 7, the shader does not use too many uniforms 99 99 bool enforcePackingRestrictions(); 100 100 // Insert statements to initialize varyings without static use in the beginning -
trunk/Source/WebCore/ChangeLog
r173523 r173527 1 2014-09-10 Roger Fong <roger_fong@apple.com> 2 3 Check for varying packing restrictions per program instead of per shader. 4 https://bugs.webkit.org/show_bug.cgi?id=136585. 5 <rdar://problem/16308409>. 6 7 Reviewed by Dean Jackson. 8 9 Covered by webgl/1.0.2/conformance/ogles/GL/build/build_009_to_016.html. 10 11 * html/canvas/WebGLRenderingContext.cpp: 12 (WebCore::WebGLRenderingContext::linkProgram): 13 Check for varying packing restrictions when linking the program. 14 15 * platform/graphics/GraphicsContext3D.h: 16 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: 17 (WebCore::GraphicsContext3D::checkVaryingsPacking): 18 Checks varyings shared by both vertex and fragment shaders and makes sure 19 they satisfy packing restrictions. 20 1 21 2014-09-11 Beth Dakin <bdakin@apple.com> 2 22 -
trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp
r173256 r173527 3454 3454 WebGLShader* vertexShader = program->getAttachedShader(GraphicsContext3D::VERTEX_SHADER); 3455 3455 WebGLShader* fragmentShader = program->getAttachedShader(GraphicsContext3D::FRAGMENT_SHADER); 3456 if (!vertexShader || !vertexShader->isValid() || !fragmentShader || !fragmentShader->isValid() || !m_context->precisionsMatch(objectOrZero(vertexShader), objectOrZero(fragmentShader)) ) {3456 if (!vertexShader || !vertexShader->isValid() || !fragmentShader || !fragmentShader->isValid() || !m_context->precisionsMatch(objectOrZero(vertexShader), objectOrZero(fragmentShader)) || !m_context->checkVaryingsPacking(objectOrZero(vertexShader), objectOrZero(fragmentShader))) { 3457 3457 program->setLinkStatus(false); 3458 3458 return; -
trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h
r170302 r173527 810 810 void useProgram(Platform3DObject); 811 811 void validateProgram(Platform3DObject); 812 bool checkVaryingsPacking(Platform3DObject vertexShader, Platform3DObject fragmentShader) const; 812 813 bool precisionsMatch(Platform3DObject vertexShader, Platform3DObject fragmentShader) const; 813 814 -
trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
r169467 r173527 41 41 #include "Extensions3DOpenGL.h" 42 42 #endif 43 #include "ANGLEWebKitBridge.h" 43 44 #include "GraphicsContext.h" 44 45 #include "ImageBuffer.h" … … 335 336 } 336 337 338 bool GraphicsContext3D::checkVaryingsPacking(Platform3DObject vertexShader, Platform3DObject fragmentShader) const 339 { 340 ASSERT(m_shaderSourceMap.contains(vertexShader)); 341 ASSERT(m_shaderSourceMap.contains(fragmentShader)); 342 const auto& vertexEntry = m_shaderSourceMap.find(vertexShader)->value; 343 const auto& fragmentEntry = m_shaderSourceMap.find(fragmentShader)->value; 344 345 HashMap<String, ShVariableInfo> combinedVaryings; 346 for (const auto& vertexSymbol : vertexEntry.varyingMap) { 347 const String& symbolName = vertexSymbol.key; 348 // The varying map includes variables for each index of an array variable. 349 // We only want a single variable to represent the array. 350 if (symbolName.endsWith("]")) 351 continue; 352 353 // Don't count built in varyings. 354 if (symbolName == "gl_FragCoord" || symbolName == "gl_FrontFacing" || symbolName == "gl_PointCoord") 355 continue; 356 357 const auto& fragmentSymbol = fragmentEntry.varyingMap.find(symbolName); 358 if (fragmentSymbol != fragmentEntry.varyingMap.end()) { 359 ShVariableInfo symbolInfo; 360 symbolInfo.type = static_cast<ShDataType>((fragmentSymbol->value).type); 361 // The arrays are already split up. 362 symbolInfo.size = (fragmentSymbol->value).size; 363 combinedVaryings.add(symbolName, symbolInfo); 364 } 365 } 366 367 size_t numVaryings = combinedVaryings.size(); 368 if (!numVaryings) 369 return true; 370 371 ShVariableInfo* variables = new ShVariableInfo[numVaryings]; 372 int index = 0; 373 for (const auto& varyingSymbol : combinedVaryings) { 374 variables[index] = varyingSymbol.value; 375 index++; 376 } 377 378 GC3Dint maxVaryingFloats = 0; 379 ::glGetIntegerv(GL_MAX_VARYING_FLOATS, &maxVaryingFloats); 380 int result = ShCheckVariablesWithinPackingLimits(maxVaryingFloats / 4, variables, numVaryings); 381 382 delete[] variables; 383 return result; 384 } 337 385 338 386 bool GraphicsContext3D::precisionsMatch(Platform3DObject vertexShader, Platform3DObject fragmentShader) const
Note:
See TracChangeset
for help on using the changeset viewer.