Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1293)

Unified Diff: Source/modules/webgl/WebGL2RenderingContextBase.h

Issue 1323613005: Better state tracking and validation for bindBufferBase and bindBufferRange (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed kbr@'s feedback Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/webgl/WebGL2RenderingContextBase.h
diff --git a/Source/modules/webgl/WebGL2RenderingContextBase.h b/Source/modules/webgl/WebGL2RenderingContextBase.h
index b0d5c2a32c57818d780fd28cc1e7b59ce53bb354..6feb9b99580cc783aaf79ae5259ebcc132ec936e 100644
--- a/Source/modules/webgl/WebGL2RenderingContextBase.h
+++ b/Source/modules/webgl/WebGL2RenderingContextBase.h
@@ -195,6 +195,13 @@ protected:
void texSubImage3DImpl(GLenum, GLint, GLint, GLint, GLint, GLenum, GLenum, Image*, WebGLImageConversion::ImageHtmlDomSource, bool, bool);
void samplerParameter(WebGLSampler*, GLenum, GLfloat, GLint, bool);
+ bool isBufferBoundToTransformFeedback(WebGLBuffer*);
+ bool isBufferBoundToNonTransformFeedback(WebGLBuffer*);
+ bool validateBufferTargetCompatibility(const char*, GLenum, WebGLBuffer*);
+
+ bool validateBufferBaseTarget(const char* functionName, GLenum target);
+ bool validateAndUpdateBufferBindBaseTarget(const char* functionName, GLenum, GLuint, WebGLBuffer*);
+
/* WebGLRenderingContextBase overrides */
unsigned getMaxWebGLLocationLength() const override { return 1024; };
bool validateCapability(const char* functionName, GLenum) override;
@@ -226,6 +233,10 @@ protected:
PersistentWillBeMember<WebGLBuffer> m_boundTransformFeedbackBuffer;
PersistentWillBeMember<WebGLBuffer> m_boundUniformBuffer;
+ PersistentHeapVectorWillBeHeapVector<Member<WebGLBuffer>> m_boundIndexedTransformFeedbackBuffers;
+ PersistentHeapVectorWillBeHeapVector<Member<WebGLBuffer>> m_boundIndexedUniformBuffers;
+ size_t m_maxBoundUniformBufferIndex;
+
PersistentWillBeMember<WebGLQuery> m_currentBooleanOcclusionQuery;
PersistentWillBeMember<WebGLQuery> m_currentTransformFeedbackPrimitivesWrittenQuery;
PersistentHeapVectorWillBeHeapVector<Member<WebGLSampler>> m_samplerUnits;

Powered by Google App Engine
This is Rietveld 408576698