Title: [121259] trunk/Source/WebCore
Revision
121259
Author
commit-qu...@webkit.org
Date
2012-06-26 06:07:17 -0700 (Tue, 26 Jun 2012)

Log Message

Shader compiler unprepared to make ESSL output when GLES is used
https://bugs.webkit.org/show_bug.cgi?id=87718

Patch by Roland Takacs <takacs.rol...@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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (121258 => 121259)


--- trunk/Source/WebCore/ChangeLog	2012-06-26 12:56:13 UTC (rev 121258)
+++ trunk/Source/WebCore/ChangeLog	2012-06-26 13:07:17 UTC (rev 121259)
@@ -1,3 +1,21 @@
+2012-06-26  Roland Takacs  <takacs.rol...@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  <p...@google.com>
 
         Fix bug where animations failed to start

Modified: trunk/Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp (121258 => 121259)


--- trunk/Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp	2012-06-26 12:56:13 UTC (rev 121258)
+++ trunk/Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp	2012-06-26 13:07:17 UTC (rev 121259)
@@ -32,11 +32,11 @@
 
 namespace WebCore {
 
-
-ANGLEWebKitBridge::ANGLEWebKitBridge() :
+ANGLEWebKitBridge::ANGLEWebKitBridge(ShShaderOutput shaderOutput) :
     builtCompilers(false),
     m_fragmentCompiler(0),
-    m_vertexCompiler(0)
+    m_vertexCompiler(0),
+    m_shaderOutput(shaderOutput)
 {
     ShInitialize();
 }
@@ -69,8 +69,8 @@
 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;

Modified: trunk/Source/WebCore/platform/graphics/ANGLEWebKitBridge.h (121258 => 121259)


--- trunk/Source/WebCore/platform/graphics/ANGLEWebKitBridge.h	2012-06-26 12:56:13 UTC (rev 121258)
+++ trunk/Source/WebCore/platform/graphics/ANGLEWebKitBridge.h	2012-06-26 13:07:17 UTC (rev 121259)
@@ -47,7 +47,7 @@
 class ANGLEWebKitBridge {
 public:
 
-    ANGLEWebKitBridge();
+    ANGLEWebKitBridge(ShShaderOutput = SH_GLSL_OUTPUT);
     ~ANGLEWebKitBridge();
     
     ShBuiltInResources getResources() { return m_resources; }
@@ -64,6 +64,8 @@
     ShHandle m_fragmentCompiler;
     ShHandle m_vertexCompiler;
 
+    ShShaderOutput m_shaderOutput;
+
     ShBuiltInResources m_resources;
 };
 

Modified: trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp (121258 => 121259)


--- trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp	2012-06-26 12:56:13 UTC (rev 121258)
+++ trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp	2012-06-26 13:07:17 UTC (rev 121259)
@@ -313,6 +313,7 @@
 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)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to