Remove uniform memory copy from GL front-end.
This moves the uniform query to the back-end. In D3D, this requires
a bit more redesign, especially for matrix uniforms.
Gives about a 10% speed improvement in the GL/NULL uniforms stress
test on Windows (UniformsBenchmark.Run/gl_null_400_vec4).
BUG=angleproject:1390
Change-Id: Idac22a77118e9e94d2f28c585e31ff0bc785ba94
Reviewed-on: https://chromium-review.googlesource.com/623929
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/libANGLE/Program.h b/src/libANGLE/Program.h
index bc15ff8..e3e20bd 100644
--- a/src/libANGLE/Program.h
+++ b/src/libANGLE/Program.h
@@ -618,17 +618,16 @@
// Both these function update the cached uniform values and return a modified "count"
// so that the uniform update doesn't overflow the uniform.
template <typename T>
- GLsizei setUniformInternal(GLint location, GLsizei count, int vectorSize, const T *v);
- template <size_t cols, size_t rows, typename T>
- GLsizei setMatrixUniformInternal(GLint location,
- GLsizei count,
- GLboolean transpose,
- const T *v);
- template <typename T>
- void updateSamplerUniform(const VariableLocation &locationInfo,
- const uint8_t *destPointer,
- GLsizei clampedCount,
+ GLsizei clampUniformCount(const VariableLocation &locationInfo,
+ GLsizei count,
+ int vectorSize,
const T *v);
+ template <size_t cols, size_t rows, typename T>
+ GLsizei clampMatrixUniformCount(GLint location, GLsizei count, GLboolean transpose, const T *v);
+
+ void updateSamplerUniform(const VariableLocation &locationInfo,
+ GLsizei clampedCount,
+ const GLint *v);
template <typename DestT>
void getUniformInternal(const Context *context,