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

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

Issue 4862001: Fix bool issues.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
===================================================================
--- gpu/command_buffer/service/gles2_cmd_decoder.cc (revision 65890)
+++ gpu/command_buffer/service/gles2_cmd_decoder.cc (working copy)
@@ -3660,7 +3660,7 @@
if (type == GL_BOOL) {
scoped_array<GLint> temp(new GLint[count]);
for (GLsizei ii = 0; ii < count; ++ii) {
- temp[ii] = static_cast<GLint>(value[ii]);
+ temp[ii] = static_cast<GLint>(value[ii] != 0.0f);
}
DoUniform1iv(location, count, temp.get());
} else {
@@ -3678,7 +3678,7 @@
GLsizei num_values = count * 2;
scoped_array<GLint> temp(new GLint[num_values]);
for (GLsizei ii = 0; ii < num_values; ++ii) {
- temp[ii] = static_cast<GLint>(value[ii]);
+ temp[ii] = static_cast<GLint>(value[ii] != 0.0f);
}
glUniform2iv(location, count, temp.get());
} else {
@@ -3696,7 +3696,7 @@
GLsizei num_values = count * 3;
scoped_array<GLint> temp(new GLint[num_values]);
for (GLsizei ii = 0; ii < num_values; ++ii) {
- temp[ii] = static_cast<GLint>(value[ii]);
+ temp[ii] = static_cast<GLint>(value[ii] != 0.0f);
}
glUniform3iv(location, count, temp.get());
} else {
@@ -3714,7 +3714,7 @@
GLsizei num_values = count * 4;
scoped_array<GLint> temp(new GLint[num_values]);
for (GLsizei ii = 0; ii < num_values; ++ii) {
- temp[ii] = static_cast<GLint>(value[ii]);
+ temp[ii] = static_cast<GLint>(value[ii] != 0.0f);
}
glUniform4iv(location, count, temp.get());
} else {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698