Title: [120571] trunk/Source/WebCore
- Revision
- 120571
- Author
- [email protected]
- Date
- 2012-06-17 23:32:49 -0700 (Sun, 17 Jun 2012)
Log Message
Fix Framebuffer restrictions
https://bugs.webkit.org/show_bug.cgi?id=89320
Patch by Gregg Tavares <[email protected]> on 2012-06-17
Reviewed by Kenneth Russell.
No new tests, just fixing old ones
* html/canvas/WebGLFramebuffer.cpp:
(WebCore::WebGLFramebuffer::checkStatus):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (120570 => 120571)
--- trunk/Source/WebCore/ChangeLog 2012-06-18 04:57:34 UTC (rev 120570)
+++ trunk/Source/WebCore/ChangeLog 2012-06-18 06:32:49 UTC (rev 120571)
@@ -1,3 +1,15 @@
+2012-06-17 Gregg Tavares <[email protected]>
+
+ Fix Framebuffer restrictions
+ https://bugs.webkit.org/show_bug.cgi?id=89320
+
+ Reviewed by Kenneth Russell.
+
+ No new tests, just fixing old ones
+
+ * html/canvas/WebGLFramebuffer.cpp:
+ (WebCore::WebGLFramebuffer::checkStatus):
+
2012-06-17 Yoshifumi Inoue <[email protected]>
[Forms] Move search field related code to RenderSearchField from RenderTextControlSingleLine
Modified: trunk/Source/WebCore/html/canvas/WebGLFramebuffer.cpp (120570 => 120571)
--- trunk/Source/WebCore/html/canvas/WebGLFramebuffer.cpp 2012-06-18 04:57:34 UTC (rev 120570)
+++ trunk/Source/WebCore/html/canvas/WebGLFramebuffer.cpp 2012-06-18 06:32:49 UTC (rev 120571)
@@ -233,8 +233,9 @@
{
ASSERT(attachedObject && attachedObject->isValid());
ASSERT(reason);
+ GC3Denum format = attachedObject->getFormat();
unsigned need = GraphicsContext3D::getClearBitsByAttachmentType(attachment);
- unsigned have = GraphicsContext3D::getClearBitsByFormat(attachedObject->getFormat());
+ unsigned have = GraphicsContext3D::getClearBitsByFormat(format);
if ((need & have) != need) {
*reason = "attachment type is not correct for attachment";
@@ -244,6 +245,11 @@
*reason = "attachment has a 0 dimension";
return false;
}
+ if ((attachment == GraphicsContext3D::DEPTH_ATTACHMENT || attachment == GraphicsContext3D::STENCIL_ATTACHMENT)
+ && format == GraphicsContext3D::DEPTH_STENCIL) {
+ *reason = "attachment DEPTH_STENCIL not allowed on DEPTH or STENCIL attachment";
+ return false;
+ }
return true;
}
@@ -440,7 +446,7 @@
return GraphicsContext3D::FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
}
// WebGL specific: no conflicting DEPTH/STENCIL/DEPTH_STENCIL attachments.
- if (haveDepthStencil && (haveDepth || haveStencil)) {
+ if ((haveDepthStencil && (haveDepth || haveStencil)) || (haveDepth && haveStencil)) {
*reason = "conflicting DEPTH/STENCIL/DEPTH_STENCIL attachments";
return GraphicsContext3D::FRAMEBUFFER_UNSUPPORTED;
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes