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

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

Issue 2446773002: Always use Desktop GL 4.1 or less BindBufferRange behavior. (Closed)
Patch Set: fix comments Created 4 years, 2 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 3730069917f2a1ff176c102eef7f1d5281e463b1..363f75fc70d4dd1f6b89048de0e86dfe9c80448f 100644
--- a/gpu/command_buffer/service/indexed_buffer_binding_host.h
+++ b/gpu/command_buffer/service/indexed_buffer_binding_host.h
@@ -22,7 +22,9 @@ class Buffer;
class GPU_EXPORT IndexedBufferBindingHost :
public base::RefCounted<IndexedBufferBindingHost> {
public:
- // |needs_emulation| is set to true on Desktop GL 4.1 or lower.
+ // In theory |needs_emulation| needs to be true on Desktop GL 4.1 or lower.
+ // However, we set it to true everywhere, not to trust drivers to handle
+ // out-of-bounds buffer accesses.
IndexedBufferBindingHost(uint32_t max_bindings, bool needs_emulation);
// The following two functions do state update and call the underlying GL
@@ -89,7 +91,7 @@ class GPU_EXPORT IndexedBufferBindingHost :
void Reset();
};
- // This is called on Desktop GL lower than 4.2, where the range
+ // This is called when |needs_emulation_| is true, where the range
// (offset + size) can't go beyond the buffer's size.
static void DoAdjustedBindBufferRange(
GLenum target, GLuint index, GLuint service_id, GLintptr offset,

Powered by Google App Engine
This is Rietveld 408576698