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

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

Issue 1335243002: Improve Uniform*ui{v} command handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index c9edcdd4ff31dc7e7c7c11b41cf96b93089e7fa5..2f20c8d806377cdb95c1f9d6c5a942e4a083b6dd 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -1627,6 +1627,12 @@ class GLES2DecoderImpl : public GLES2Decoder,
void DoUniform3iv(GLint fake_location, GLsizei count, const GLint* value);
void DoUniform4iv(GLint fake_location, GLsizei count, const GLint* value);
+ void DoUniform1ui(GLint fake_location, GLuint v0);
+ void DoUniform1uiv(GLint fake_location, GLsizei count, const GLuint* value);
+ void DoUniform2uiv(GLint fake_location, GLsizei count, const GLuint* value);
+ void DoUniform3uiv(GLint fake_location, GLsizei count, const GLuint* value);
+ void DoUniform4uiv(GLint fake_location, GLsizei count, const GLuint* value);
+
// Wrappers for glUniformfv because some drivers don't correctly accept
// bool uniforms.
void DoUniform1fv(GLint fake_location, GLsizei count, const GLfloat* value);
@@ -6966,6 +6972,21 @@ void GLES2DecoderImpl::DoUniform1iv(
glUniform1iv(real_location, count, value);
}
+void GLES2DecoderImpl::DoUniform1uiv(
+ GLint fake_location, GLsizei count, const GLuint *value) {
+ GLenum type = 0;
+ GLint real_location = -1;
+ if (!PrepForSetUniformByLocation(fake_location,
+ "glUniform1uiv",
+ Program::kUniform1ui,
+ &real_location,
+ &type,
+ &count)) {
+ return;
+ }
+ glUniform1uiv(real_location, count, value);
+}
+
void GLES2DecoderImpl::DoUniform1fv(
GLint fake_location, GLsizei count, const GLfloat* value) {
GLenum type = 0;
@@ -7076,6 +7097,21 @@ void GLES2DecoderImpl::DoUniform2iv(
glUniform2iv(real_location, count, value);
}
+void GLES2DecoderImpl::DoUniform2uiv(
+ GLint fake_location, GLsizei count, const GLuint* value) {
+ GLenum type = 0;
+ GLint real_location = -1;
+ if (!PrepForSetUniformByLocation(fake_location,
+ "glUniform2uiv",
+ Program::kUniform2ui,
+ &real_location,
+ &type,
+ &count)) {
+ return;
+ }
+ glUniform2uiv(real_location, count, value);
+}
+
void GLES2DecoderImpl::DoUniform3iv(
GLint fake_location, GLsizei count, const GLint* value) {
GLenum type = 0;
@@ -7091,6 +7127,21 @@ void GLES2DecoderImpl::DoUniform3iv(
glUniform3iv(real_location, count, value);
}
+void GLES2DecoderImpl::DoUniform3uiv(
+ GLint fake_location, GLsizei count, const GLuint* value) {
+ GLenum type = 0;
+ GLint real_location = -1;
+ if (!PrepForSetUniformByLocation(fake_location,
+ "glUniform3uiv",
+ Program::kUniform3ui,
+ &real_location,
+ &type,
+ &count)) {
+ return;
+ }
+ glUniform3uiv(real_location, count, value);
+}
+
void GLES2DecoderImpl::DoUniform4iv(
GLint fake_location, GLsizei count, const GLint* value) {
GLenum type = 0;
@@ -7106,6 +7157,21 @@ void GLES2DecoderImpl::DoUniform4iv(
glUniform4iv(real_location, count, value);
}
+void GLES2DecoderImpl::DoUniform4uiv(
+ GLint fake_location, GLsizei count, const GLuint* value) {
+ GLenum type = 0;
+ GLint real_location = -1;
+ if (!PrepForSetUniformByLocation(fake_location,
+ "glUniform4uiv",
+ Program::kUniform4ui,
+ &real_location,
+ &type,
+ &count)) {
+ return;
+ }
+ glUniform4uiv(real_location, count, value);
+}
+
void GLES2DecoderImpl::DoUniformMatrix2fv(
GLint fake_location, GLsizei count, GLboolean transpose,
const GLfloat* value) {
« no previous file with comments | « gpu/command_buffer/build_gles2_cmd_buffer.py ('k') | gpu/command_buffer/service/gles2_cmd_decoder_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698