[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
zmo at google.com
zmo at google.com
Wed Dec 22 15:02:12 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 77eb2322163531564acf3af05f9c99d9004c136a
Author: zmo at google.com <zmo at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Oct 27 17:10:14 2010 +0000
2010-10-27 Zhenyao Mo <zmo at google.com>
Reviewed by Kenneth Russell.
If WebGL is running on top of a strict version of OpenGL ES it should make sure attribs have buffers assigned at all times
https://bugs.webkit.org/show_bug.cgi?id=47964
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateRenderingState): Minimum checking: if input <= 0, only check if each enabled vertex attribute is bound to a buffer.
(WebCore::WebGLRenderingContext::drawArrays): If underlying GL performs bounds checking, we still need to do the minimum checking using validateRenderingState.
(WebCore::WebGLRenderingContext::drawElements): Ditto.
* html/canvas/WebGLRenderingContext.h: Add a comment for input <= 0 in validateRenderingState.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70661 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index fbd273c..7255568 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-10-27 Zhenyao Mo <zmo at google.com>
+
+ Reviewed by Kenneth Russell.
+
+ If WebGL is running on top of a strict version of OpenGL ES it should make sure attribs have buffers assigned at all times
+ https://bugs.webkit.org/show_bug.cgi?id=47964
+
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::validateRenderingState): Minimum checking: if input <= 0, only check if each enabled vertex attribute is bound to a buffer.
+ (WebCore::WebGLRenderingContext::drawArrays): If underlying GL performs bounds checking, we still need to do the minimum checking using validateRenderingState.
+ (WebCore::WebGLRenderingContext::drawElements): Ditto.
+ * html/canvas/WebGLRenderingContext.h: Add a comment for input <= 0 in validateRenderingState.
+
2010-10-27 Simon Fraser <simon.fraser at apple.com>
Reviewed by Dan Bernstein.
diff --git a/WebCore/html/canvas/WebGLRenderingContext.cpp b/WebCore/html/canvas/WebGLRenderingContext.cpp
index a8751da..3d36675 100644
--- a/WebCore/html/canvas/WebGLRenderingContext.cpp
+++ b/WebCore/html/canvas/WebGLRenderingContext.cpp
@@ -878,6 +878,9 @@ bool WebGLRenderingContext::validateRenderingState(long numElementsRequired)
return false;
}
+ if (numElementsRequired <= 0)
+ return true;
+
// Look in each consumed vertex attrib (by the current program) and find the smallest buffer size
long smallestNumElements = LONG_MAX;
int numActiveAttribLocations = m_currentProgram->numActiveAttribLocations();
@@ -939,6 +942,11 @@ void WebGLRenderingContext::drawArrays(unsigned long mode, long first, long coun
m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION);
return;
}
+ } else {
+ if (!validateRenderingState(0)) {
+ m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION);
+ return;
+ }
}
bool vertexAttrib0Simulated = false;
@@ -990,6 +998,11 @@ void WebGLRenderingContext::drawElements(unsigned long mode, long count, unsigne
return;
}
}
+ } else {
+ if (!validateRenderingState(0)) {
+ m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION);
+ return;
+ }
}
bool vertexAttrib0Simulated = false;
diff --git a/WebCore/html/canvas/WebGLRenderingContext.h b/WebCore/html/canvas/WebGLRenderingContext.h
index c4c856c..ce66f6a 100644
--- a/WebCore/html/canvas/WebGLRenderingContext.h
+++ b/WebCore/html/canvas/WebGLRenderingContext.h
@@ -323,6 +323,7 @@ public:
// Precise but slow index validation -- only done if conservative checks fail
bool validateIndexArrayPrecise(unsigned long count, unsigned long type, long offset, long& numElementsRequired);
+ // If numElements <= 0, we only check if each enabled vertex attribute is bound to a buffer.
bool validateRenderingState(long numElements);
bool validateWebGLObject(WebGLObject* object);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list