Move all uniform validation from ProgramBinary to API layer.
This will have the contract of having a successful API call once we
call into the ANGLE internals, having successfully passed valiation.
BUG=angle:571
Change-Id: Ia8d6eccc1e42bdf9e9cc5c10094a08729b42778a
Reviewed-on: https://chromium-review.googlesource.com/200075
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libGLESv2/libGLESv2.cpp b/src/libGLESv2/libGLESv2.cpp
index 6ed8bf6..49a60c9 100644
--- a/src/libGLESv2/libGLESv2.cpp
+++ b/src/libGLESv2/libGLESv2.cpp
@@ -5238,10 +5238,7 @@
}
gl::ProgramBinary *programBinary = context->getCurrentProgramBinary();
- if (!programBinary->setUniform1fv(location, count, v))
- {
- return gl::error(GL_INVALID_OPERATION);
- }
+ programBinary->setUniform1fv(location, count, v);
}
}
catch (...)
@@ -5271,10 +5268,7 @@
}
gl::ProgramBinary *programBinary = context->getCurrentProgramBinary();
- if (!programBinary->setUniform1iv(location, count, v))
- {
- return gl::error(GL_INVALID_OPERATION);
- }
+ programBinary->setUniform1iv(location, count, v);
}
}
catch (...)
@@ -5306,10 +5300,7 @@
}
gl::ProgramBinary *programBinary = context->getCurrentProgramBinary();
- if (!programBinary->setUniform2fv(location, count, v))
- {
- return gl::error(GL_INVALID_OPERATION);
- }
+ programBinary->setUniform2fv(location, count, v);
}
}
catch (...)
@@ -5341,10 +5332,7 @@
}
gl::ProgramBinary *programBinary = context->getCurrentProgramBinary();
- if (!programBinary->setUniform2iv(location, count, v))
- {
- return gl::error(GL_INVALID_OPERATION);
- }
+ programBinary->setUniform2iv(location, count, v);
}
}
catch (...)
@@ -5376,10 +5364,7 @@
}
gl::ProgramBinary *programBinary = context->getCurrentProgramBinary();
- if (!programBinary->setUniform3fv(location, count, v))
- {
- return gl::error(GL_INVALID_OPERATION);
- }
+ programBinary->setUniform3fv(location, count, v);
}
}
catch (...)
@@ -5411,10 +5396,7 @@
}
gl::ProgramBinary *programBinary = context->getCurrentProgramBinary();
- if (!programBinary->setUniform3iv(location, count, v))
- {
- return gl::error(GL_INVALID_OPERATION);
- }
+ programBinary->setUniform3iv(location, count, v);
}
}
catch (...)
@@ -5446,10 +5428,7 @@
}
gl::ProgramBinary *programBinary = context->getCurrentProgramBinary();
- if (!programBinary->setUniform4fv(location, count, v))
- {
- return gl::error(GL_INVALID_OPERATION);
- }
+ programBinary->setUniform4fv(location, count, v);
}
}
catch (...)
@@ -5481,10 +5460,7 @@
}
gl::ProgramBinary *programBinary = context->getCurrentProgramBinary();
- if (!programBinary->setUniform4iv(location, count, v))
- {
- return gl::error(GL_INVALID_OPERATION);
- }
+ programBinary->setUniform4iv(location, count, v);
}
}
catch (...)
@@ -5510,10 +5486,7 @@
}
gl::ProgramBinary *programBinary = context->getCurrentProgramBinary();
- if (!programBinary->setUniformMatrix2fv(location, count, transpose, value))
- {
- return gl::error(GL_INVALID_OPERATION);
- }
+ programBinary->setUniformMatrix2fv(location, count, transpose, value);
}
}
catch (...)
@@ -5539,10 +5512,7 @@
}
gl::ProgramBinary *programBinary = context->getCurrentProgramBinary();
- if (!programBinary->setUniformMatrix3fv(location, count, transpose, value))
- {
- return gl::error(GL_INVALID_OPERATION);
- }
+ programBinary->setUniformMatrix3fv(location, count, transpose, value);
}
}
catch (...)
@@ -5568,10 +5538,7 @@
}
gl::ProgramBinary *programBinary = context->getCurrentProgramBinary();
- if (!programBinary->setUniformMatrix4fv(location, count, transpose, value))
- {
- return gl::error(GL_INVALID_OPERATION);
- }
+ programBinary->setUniformMatrix4fv(location, count, transpose, value);
}
}
catch (...)
@@ -6639,10 +6606,7 @@
}
gl::ProgramBinary *programBinary = context->getCurrentProgramBinary();
- if (!programBinary->setUniformMatrix2x3fv(location, count, transpose, value))
- {
- return gl::error(GL_INVALID_OPERATION);
- }
+ programBinary->setUniformMatrix2x3fv(location, count, transpose, value);
}
}
catch (...)
@@ -6668,10 +6632,7 @@
}
gl::ProgramBinary *programBinary = context->getCurrentProgramBinary();
- if (!programBinary->setUniformMatrix3x2fv(location, count, transpose, value))
- {
- return gl::error(GL_INVALID_OPERATION);
- }
+ programBinary->setUniformMatrix3x2fv(location, count, transpose, value);
}
}
catch (...)
@@ -6697,10 +6658,7 @@
}
gl::ProgramBinary *programBinary = context->getCurrentProgramBinary();
- if (!programBinary->setUniformMatrix2x4fv(location, count, transpose, value))
- {
- return gl::error(GL_INVALID_OPERATION);
- }
+ programBinary->setUniformMatrix2x4fv(location, count, transpose, value);
}
}
catch (...)
@@ -6726,10 +6684,7 @@
}
gl::ProgramBinary *programBinary = context->getCurrentProgramBinary();
- if (!programBinary->setUniformMatrix4x2fv(location, count, transpose, value))
- {
- return gl::error(GL_INVALID_OPERATION);
- }
+ programBinary->setUniformMatrix4x2fv(location, count, transpose, value);
}
}
catch (...)
@@ -6755,10 +6710,7 @@
}
gl::ProgramBinary *programBinary = context->getCurrentProgramBinary();
- if (!programBinary->setUniformMatrix3x4fv(location, count, transpose, value))
- {
- return gl::error(GL_INVALID_OPERATION);
- }
+ programBinary->setUniformMatrix3x4fv(location, count, transpose, value);
}
}
catch (...)
@@ -6784,10 +6736,7 @@
}
gl::ProgramBinary *programBinary = context->getCurrentProgramBinary();
- if (!programBinary->setUniformMatrix4x3fv(location, count, transpose, value))
- {
- return gl::error(GL_INVALID_OPERATION);
- }
+ programBinary->setUniformMatrix4x3fv(location, count, transpose, value);
}
}
catch (...)
@@ -7900,10 +7849,7 @@
}
gl::ProgramBinary *programBinary = context->getCurrentProgramBinary();
- if (!programBinary->setUniform1uiv(location, count, value))
- {
- return gl::error(GL_INVALID_OPERATION);
- }
+ programBinary->setUniform1uiv(location, count, value);
}
}
catch (...)
@@ -7929,10 +7875,7 @@
}
gl::ProgramBinary *programBinary = context->getCurrentProgramBinary();
- if (!programBinary->setUniform2uiv(location, count, value))
- {
- return gl::error(GL_INVALID_OPERATION);
- }
+ programBinary->setUniform2uiv(location, count, value);
}
}
catch (...)
@@ -7958,10 +7901,7 @@
}
gl::ProgramBinary *programBinary = context->getCurrentProgramBinary();
- if (!programBinary->setUniform3uiv(location, count, value))
- {
- return gl::error(GL_INVALID_OPERATION);
- }
+ programBinary->setUniform3uiv(location, count, value);
}
}
catch (...)
@@ -7987,10 +7927,7 @@
}
gl::ProgramBinary *programBinary = context->getCurrentProgramBinary();
- if (!programBinary->setUniform4uiv(location, count, value))
- {
- return gl::error(GL_INVALID_OPERATION);
- }
+ programBinary->setUniform4uiv(location, count, value);
}
}
catch (...)