aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-10-29 20:27:08 +1100
committerTimothy Arceri <[email protected]>2018-10-31 09:32:41 +1100
commit9ec4a5ef29cd94c7d810cad5aa58c0c59148c88f (patch)
treed3b5c360e89e9e039d0757ea4a95a65e1e739aab /src/mesa/state_tracker
parentfb02bd3d1cbfdacabc6403f2da7b5d0a9aa527e6 (diff)
st/mesa: calculate buffer size correctly for packed uniforms
Fixes: edded1237607 ("mesa: rework ParameterList to allow packing") Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_atom_constbuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c
index 6455e612e4e..fa147b89688 100644
--- a/src/mesa/state_tracker/st_atom_constbuf.c
+++ b/src/mesa/state_tracker/st_atom_constbuf.c
@@ -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