From 5fb30e5ad3615c0b0e9e67a94542dbb110e9ed95 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 11 Nov 2016 09:37:45 -0500 Subject: MAINT-6913 - (Via Sovereign Engineer and Shyotl Kuhr) Pack the skinned matrix and translation into a single mat3x4 for optimal data transfer to reduce uniform slot usage. --- indra/llrender/llglslshader.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'indra/llrender/llglslshader.cpp') diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 58c1186a3e..5d669fb955 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -1257,6 +1257,23 @@ void LLGLSLShader::uniformMatrix3fv(U32 index, U32 count, GLboolean transpose, c } } +void LLGLSLShader::uniformMatrix3x4fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v) +{ + if (mProgramObject > 0) + { + if (mUniform.size() <= index) + { + UNIFORM_ERRS << "Uniform index out of bounds." << LL_ENDL; + return; + } + + if (mUniform[index] >= 0) + { + glUniformMatrix3x4fv(mUniform[index], count, transpose, v); + } + } +} + void LLGLSLShader::uniformMatrix4fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v) { if (mProgramObject > 0) -- cgit v1.2.3