Source/WebCore/ChangeLog

 12012-06-05 Roland Takacs <takacs.roland@stud.u-szeged.hu>
 2
 3 Shader compiler unprepared to make ESSL output when GLES is used
 4 https://bugs.webkit.org/show_bug.cgi?id=87718
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Defined a new method to initialize shader compilers by the parameter value.
 9 This parameter specifies what type of output must be generated. It must be
 10 called before calling 'validateShaderSource' method.
 11
 12 * platform/graphics/ANGLEWebKitBridge.cpp:
 13 (WebCore::ANGLEWebKitBridge::initializeShaderCompilers):
 14 (WebCore::ANGLEWebKitBridge::validateShaderSource):
 15 * platform/graphics/ANGLEWebKitBridge.h:
 16 (ANGLEWebKitBridge):
 17 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
 18 (WebCore::GraphicsContext3D::compileShader):
 19
1202012-06-04 Kinuko Yasuda <kinuko@chromium.org>
221
322 Chromium tests: "Add support for the Blob constructor" [r115582] regressed blob layout tests

Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp

@@void ANGLEWebKitBridge::setResources(ShBuiltInResources resources)
6666 m_resources = resources;
6767}
6868
69 bool ANGLEWebKitBridge::validateShaderSource(const char* shaderSource, ANGLEShaderType shaderType, String& translatedShaderSource, String& shaderValidationLog)
 69bool ANGLEWebKitBridge::initializeShaderCompilers(ShShaderOutput shaderOutput)
7070{
7171 if (!builtCompilers) {
72  m_fragmentCompiler = ShConstructCompiler(SH_FRAGMENT_SHADER, SH_WEBGL_SPEC, SH_GLSL_OUTPUT, &m_resources);
73  m_vertexCompiler = ShConstructCompiler(SH_VERTEX_SHADER, SH_WEBGL_SPEC, SH_GLSL_OUTPUT, &m_resources);
 72 m_fragmentCompiler = ShConstructCompiler(SH_FRAGMENT_SHADER, SH_WEBGL_SPEC, shaderOutput, &m_resources);
 73 m_vertexCompiler = ShConstructCompiler(SH_VERTEX_SHADER, SH_WEBGL_SPEC, shaderOutput, &m_resources);
7474 if (!m_fragmentCompiler || !m_vertexCompiler) {
7575 cleanupCompilers();
7676 return false;

@@bool ANGLEWebKitBridge::validateShaderSource(const char* shaderSource, ANGLEShad
7878
7979 builtCompilers = true;
8080 }
81 
 81
 82 return true;
 83}
 84bool ANGLEWebKitBridge::validateShaderSource(const char* shaderSource, ANGLEShaderType shaderType, String& translatedShaderSource, String& shaderValidationLog)
 85{
8286 ShHandle compiler;
8387
8488 if (shaderType == SHADER_TYPE_VERTEX)

Source/WebCore/platform/graphics/ANGLEWebKitBridge.h

@@public:
5353 ShBuiltInResources getResources() { return m_resources; }
5454 void setResources(ShBuiltInResources);
5555
 56 bool initializeShaderCompilers(ShShaderOutput);
5657 bool validateShaderSource(const char* shaderSource, ANGLEShaderType shaderType, String& translatedShaderSource, String& shaderValidationLog);
5758
5859private:

Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp

@@void GraphicsContext3D::compileShader(Platform3DObject shader)
467467 String translatedShaderSource;
468468 String shaderInfoLog;
469469
 470 if (!m_compiler.initializeShaderCompilers(isGLES2Compliant() ? SH_ESSL_OUTPUT : SH_GLSL_OUTPUT))
 471 return; // Error at initialization of shader compilers
 472
470473 bool isValid = m_compiler.validateShaderSource(entry.source.utf8().data(), shaderType, translatedShaderSource, shaderInfoLog);
471474
472475 entry.log = shaderInfoLog;