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

Unified Diff: gpu/command_buffer/service/vertex_attrib_manager.cc

Issue 2175673003: WebGL 2: Fix nits when check vertexAttrib type with variable type in vertex shader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/vertex_attrib_manager.cc
diff --git a/gpu/command_buffer/service/vertex_attrib_manager.cc b/gpu/command_buffer/service/vertex_attrib_manager.cc
index fc3affe2cdcb5140dd3879f6e42f7e5c1c5023ef..2e18356ccae22edcaac6af37b76778a843901a03 100644
--- a/gpu/command_buffer/service/vertex_attrib_manager.cc
+++ b/gpu/command_buffer/service/vertex_attrib_manager.cc
@@ -131,10 +131,10 @@ void VertexAttribManager::Initialize(uint32_t max_vertex_attribs,
uint32_t packed_size = max_vertex_attribs_ / 16;
packed_size += (max_vertex_attribs_ % 16 == 0) ? 0 : 1;
attrib_base_type_mask_.resize(packed_size);
- attrib_type_written_mask_.resize(packed_size);
+ attrib_enabled_mask_.resize(packed_size);
for (uint32_t ii = 0; ii < packed_size; ++ii) {
- attrib_type_written_mask_[ii] = 0u;
+ attrib_enabled_mask_[ii] = 0u;
attrib_base_type_mask_[ii] = 0u;
}
@@ -160,9 +160,9 @@ bool VertexAttribManager::Enable(GLuint index, bool enable) {
DCHECK(index < max_vertex_attribs_);
GLuint shift_bits = (index % 16) * 2;
if (enable) {
- attrib_type_written_mask_[index / 16] |= (0x3 << shift_bits);
+ attrib_enabled_mask_[index / 16] |= (0x3 << shift_bits);
} else {
- attrib_type_written_mask_[index / 16] &= ~(0x3 << shift_bits);
+ attrib_enabled_mask_[index / 16] &= ~(0x3 << shift_bits);
}
VertexAttrib& info = vertex_attribs_[index];

Powered by Google App Engine
This is Rietveld 408576698