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

Unified Diff: gpu/command_buffer/service/indexed_buffer_binding_host.h

Issue 2165873002: Validate UniformBlocks being backed by sufficient data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a bug Created 4 years, 5 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: gpu/command_buffer/service/indexed_buffer_binding_host.h
diff --git a/gpu/command_buffer/service/indexed_buffer_binding_host.h b/gpu/command_buffer/service/indexed_buffer_binding_host.h
index 54e88569e1b377946becc43ab9b5aaa838a7e646..3730069917f2a1ff176c102eef7f1d5281e463b1 100644
--- a/gpu/command_buffer/service/indexed_buffer_binding_host.h
+++ b/gpu/command_buffer/service/indexed_buffer_binding_host.h
@@ -43,7 +43,13 @@ class GPU_EXPORT IndexedBufferBindingHost :
void RemoveBoundBuffer(Buffer* buffer);
Buffer* GetBufferBinding(GLuint index) const;
+ // Returns |size| set by glBindBufferRange; 0 if set by glBindBufferBase.
GLsizeiptr GetBufferSize(GLuint index) const;
+ // For glBindBufferBase, return the actual buffer size when this function is
+ // called, not when glBindBufferBase is called.
+ // For glBindBufferRange, return the |size| set by glBindBufferRange minus
+ // the range that's beyond the buffer.
+ GLsizeiptr GetEffectiveBufferSize(GLuint index) const;
GLintptr GetBufferStart(GLuint index) const;
// This is used only for UNIFORM_BUFFER bindings in context switching.

Powered by Google App Engine
This is Rietveld 408576698