summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shaderapi.c
diff options
context:
space:
mode:
authorTimothy Arceri <t_arceri@yahoo.com.au>2015-09-30 11:00:02 +1000
committerTimothy Arceri <t_arceri@yahoo.com.au>2015-10-05 10:53:24 +1100
commit763cd8c080353482cb41da578cb3d6f7892a0c9f (patch)
treedff9ba9c0e6a4ebc0e706d578fe5313bc1cbda4f /src/mesa/main/shaderapi.c
parentb85757bc72350df609f50e000512bc80d07f1497 (diff)
downloadexternal_mesa3d-763cd8c080353482cb41da578cb3d6f7892a0c9f.zip
external_mesa3d-763cd8c080353482cb41da578cb3d6f7892a0c9f.tar.gz
external_mesa3d-763cd8c080353482cb41da578cb3d6f7892a0c9f.tar.bz2
glsl: reduce memory footprint of uniform_storage struct
The uniform will only be of a single type so store the data for opaque types in a single array. Cc: Francisco Jerez <currojerez@riseup.net> Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Diffstat (limited to 'src/mesa/main/shaderapi.c')
-rw-r--r--src/mesa/main/shaderapi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 13fdf8c..9dd1054 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -2597,7 +2597,7 @@ _mesa_GetUniformSubroutineuiv(GLenum shadertype, GLint location,
{
struct gl_uniform_storage *uni = sh->SubroutineUniformRemapTable[location];
- int offset = location - uni->subroutine[stage].index;
+ int offset = location - uni->opaque[stage].index;
memcpy(params, &uni->storage[offset],
sizeof(GLuint));
}