st/mesa: calculate buffer size correctly for packed uniforms

Fixes: edded12376 ("mesa: rework ParameterList to allow packing")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Timothy Arceri 2018-10-29 20:27:08 +11:00
parent fb02bd3d1c
commit 9ec4a5ef29

View file

@ -92,7 +92,7 @@ st_upload_constants(struct st_context *st, struct gl_program *prog)
/* update constants */
if (params && params->NumParameters) {
struct pipe_constant_buffer cb;
const uint paramBytes = params->NumParameters * sizeof(GLfloat) * 4;
const uint paramBytes = params->NumParameterValues * sizeof(GLfloat);
/* Update the constants which come from fixed-function state, such as
* transformation matrices, fog factors, etc. The rest of the values in