https://bugs.webkit.org/show_bug.cgi?id=87718
Patch by Roland Takacs <takacs.roland@stud.u-szeged.hu> on 2012-06-26
Reviewed by Noam Rosenthal.
Defined a new member that says what type of output code must be generated
(SH_GLSL_OUTPUT, SH_ESSL_OUTPUT). It is set within the constructor.
* platform/graphics/ANGLEWebKitBridge.cpp:
(WebCore::ANGLEWebKitBridge::ANGLEWebKitBridge):
(WebCore::ANGLEWebKitBridge::validateShaderSource):
* platform/graphics/ANGLEWebKitBridge.h:
(ANGLEWebKitBridge):
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121259
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-06-26 Roland Takacs <takacs.roland@stud.u-szeged.hu>
+
+ Shader compiler unprepared to make ESSL output when GLES is used
+ https://bugs.webkit.org/show_bug.cgi?id=87718
+
+ Reviewed by Noam Rosenthal.
+
+ Defined a new member that says what type of output code must be generated
+ (SH_GLSL_OUTPUT, SH_ESSL_OUTPUT). It is set within the constructor.
+
+ * platform/graphics/ANGLEWebKitBridge.cpp:
+ (WebCore::ANGLEWebKitBridge::ANGLEWebKitBridge):
+ (WebCore::ANGLEWebKitBridge::validateShaderSource):
+ * platform/graphics/ANGLEWebKitBridge.h:
+ (ANGLEWebKitBridge):
+ * platform/graphics/qt/GraphicsContext3DQt.cpp:
+ (WebCore::GraphicsContext3D::GraphicsContext3D):
+
2012-06-26 Philip Rogers <pdr@google.com>
Fix bug where animations failed to start
namespace WebCore {
-
-ANGLEWebKitBridge::ANGLEWebKitBridge() :
+ANGLEWebKitBridge::ANGLEWebKitBridge(ShShaderOutput shaderOutput) :
builtCompilers(false),
m_fragmentCompiler(0),
- m_vertexCompiler(0)
+ m_vertexCompiler(0),
+ m_shaderOutput(shaderOutput)
{
ShInitialize();
}
bool ANGLEWebKitBridge::validateShaderSource(const char* shaderSource, ANGLEShaderType shaderType, String& translatedShaderSource, String& shaderValidationLog)
{
if (!builtCompilers) {
- m_fragmentCompiler = ShConstructCompiler(SH_FRAGMENT_SHADER, SH_WEBGL_SPEC, SH_GLSL_OUTPUT, &m_resources);
- m_vertexCompiler = ShConstructCompiler(SH_VERTEX_SHADER, SH_WEBGL_SPEC, SH_GLSL_OUTPUT, &m_resources);
+ m_fragmentCompiler = ShConstructCompiler(SH_FRAGMENT_SHADER, SH_WEBGL_SPEC, m_shaderOutput, &m_resources);
+ m_vertexCompiler = ShConstructCompiler(SH_VERTEX_SHADER, SH_WEBGL_SPEC, m_shaderOutput, &m_resources);
if (!m_fragmentCompiler || !m_vertexCompiler) {
cleanupCompilers();
return false;
class ANGLEWebKitBridge {
public:
- ANGLEWebKitBridge();
+ ANGLEWebKitBridge(ShShaderOutput = SH_GLSL_OUTPUT);
~ANGLEWebKitBridge();
ShBuiltInResources getResources() { return m_resources; }
ShHandle m_fragmentCompiler;
ShHandle m_vertexCompiler;
+ ShShaderOutput m_shaderOutput;
+
ShBuiltInResources m_resources;
};
GraphicsContext3D::GraphicsContext3D(GraphicsContext3D::Attributes attrs, HostWindow* hostWindow, bool)
: m_currentWidth(0)
, m_currentHeight(0)
+ , m_compiler(isGLES2Compliant() ? SH_ESSL_OUTPUT : SH_GLSL_OUTPUT)
, m_attrs(attrs)
, m_texture(0)
, m_compositorTexture(0)