diff options
author | marha <marha@users.sourceforge.net> | 2013-07-16 08:53:23 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-07-16 08:53:23 +0200 |
commit | 06f4de23ace4de1fd628c37891214f0a4ecb77db (patch) | |
tree | 38ba52b20ef6060eab6e9b91e2c022e7a953e06b /mesalib/src/mesa/program | |
parent | ffce4319c2fb6f4f663cc5a9660e1d5837fcde87 (diff) | |
download | vcxsrv-06f4de23ace4de1fd628c37891214f0a4ecb77db.tar.gz vcxsrv-06f4de23ace4de1fd628c37891214f0a4ecb77db.tar.bz2 vcxsrv-06f4de23ace4de1fd628c37891214f0a4ecb77db.zip |
libxcb xcb-proto mesa xkbcomp git update 16 Jul 2013
libxcb commit 45619dc71e9411a526d7c69595cf615b1b1206cf
libxcb/xcb-proto commit 56a82005ac388fcb7a4d1c82e07c7e72eaf69a32
xkbcomp commit 1cd5c50c54b06de2238d6d7675d0a3c65a21414d
mesa commit e4fdf1b008ce29c5b5a52985c586b61f35d31e4c
Diffstat (limited to 'mesalib/src/mesa/program')
-rw-r--r-- | mesalib/src/mesa/program/prog_parameter.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/mesalib/src/mesa/program/prog_parameter.c b/mesalib/src/mesa/program/prog_parameter.c index 95b153e16..4d9cf08d2 100644 --- a/mesalib/src/mesa/program/prog_parameter.c +++ b/mesalib/src/mesa/program/prog_parameter.c @@ -155,7 +155,21 @@ _mesa_add_parameter(struct gl_program_parameter_list *paramList, p->Size = size; p->DataType = datatype; if (values) { - COPY_4V(paramList->ParameterValues[oldNum + i], values); + if (size >= 4) { + COPY_4V(paramList->ParameterValues[oldNum + i], values); + } + else { + /* copy 1, 2 or 3 values */ + GLuint remaining = size % 4; + assert(remaining < 4); + for (j = 0; j < remaining; j++) { + paramList->ParameterValues[oldNum + i][j].f = values[j].f; + } + /* fill in remaining positions with zeros */ + for (; j < 4; j++) { + paramList->ParameterValues[oldNum + i][j].f = 0.0f; + } + } values += 4; p->Initialized = GL_TRUE; } |