Title: [141870] trunk/Source/WebCore
- Revision
- 141870
- Author
- [email protected]
- Date
- 2013-02-05 01:07:20 -0800 (Tue, 05 Feb 2013)
Log Message
[Qt][EFL][WebGL] Webgl doesn't work on nvidia cards
https://bugs.webkit.org/show_bug.cgi?id=108059
Patch by Viatcheslav Ostapenko <[email protected]> on 2013-02-05
Reviewed by Kenneth Rohde Christiansen.
Commit r138327 fixed repainting issues on mesa3d GL library by re-binding
texture to the window after every glXSwapBuffer. Unfortunatelly re-bind
breaks rendering on NVidia cards with NVidia propiertary drivers.
This change limits texture re-binding only for mesa3d GL library.
No new tests. HW specific fix.
* platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
(WebCore::OffScreenRootWindow::isMesaGLX):
(OffScreenRootWindow):
(WebCore::GraphicsSurface::platformSwapBuffers):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (141869 => 141870)
--- trunk/Source/WebCore/ChangeLog 2013-02-05 09:05:33 UTC (rev 141869)
+++ trunk/Source/WebCore/ChangeLog 2013-02-05 09:07:20 UTC (rev 141870)
@@ -1,3 +1,22 @@
+2013-02-05 Viatcheslav Ostapenko <[email protected]>
+
+ [Qt][EFL][WebGL] Webgl doesn't work on nvidia cards
+ https://bugs.webkit.org/show_bug.cgi?id=108059
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Commit r138327 fixed repainting issues on mesa3d GL library by re-binding
+ texture to the window after every glXSwapBuffer. Unfortunatelly re-bind
+ breaks rendering on NVidia cards with NVidia propiertary drivers.
+ This change limits texture re-binding only for mesa3d GL library.
+
+ No new tests. HW specific fix.
+
+ * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
+ (WebCore::OffScreenRootWindow::isMesaGLX):
+ (OffScreenRootWindow):
+ (WebCore::GraphicsSurface::platformSwapBuffers):
+
2013-02-05 Praveen Jadhav <[email protected]>
Floating point precision error in AudioPannerNode.
Modified: trunk/Source/WebCore/platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp (141869 => 141870)
--- trunk/Source/WebCore/platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp 2013-02-05 09:05:33 UTC (rev 141869)
+++ trunk/Source/WebCore/platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp 2013-02-05 09:07:20 UTC (rev 141870)
@@ -181,6 +181,12 @@
}
}
+ static bool isMesaGLX()
+ {
+ static bool isMesa = !!strstr(glXGetClientString(display(), GLX_VENDOR), "Mesa");
+ return isMesa;
+ }
+
private:
static int m_refCount;
static Window m_window;
@@ -555,12 +561,14 @@
uint32_t GraphicsSurface::platformSwapBuffers()
{
- if (m_private->isReceiver() && platformGetTextureID()) {
- glBindTexture(GL_TEXTURE_2D, platformGetTextureID());
- // Release previous lock and rebind texture to surface to get frame update.
- pGlXReleaseTexImageEXT(m_private->display(), m_private->glxPixmap(), GLX_FRONT_EXT);
- pGlXBindTexImageEXT(m_private->display(), m_private->glxPixmap(), GLX_FRONT_EXT, 0);
-
+ if (m_private->isReceiver()) {
+ if (OffScreenRootWindow::isMesaGLX() && platformGetTextureID()) {
+ glBindTexture(GL_TEXTURE_2D, platformGetTextureID());
+ // Mesa doesn't re-bind texture to the front buffer on glXSwapBufer
+ // Manually release previous lock and rebind texture to surface to get frame update.
+ pGlXReleaseTexImageEXT(m_private->display(), m_private->glxPixmap(), GLX_FRONT_EXT);
+ pGlXBindTexImageEXT(m_private->display(), m_private->glxPixmap(), GLX_FRONT_EXT, 0);
+ }
return 0;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes