[Mesa-dev] [PATCH] st/mesa: calculate buffer size correctly for packed uniforms
Marek Olšák
maraeo at gmail.com
Tue Oct 30 20:22:25 UTC 2018
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Mon, Oct 29, 2018 at 5:27 AM Timothy Arceri <tarceri at itsqueeze.com>
wrote:
> Fixes: edded1237607 ("mesa: rework ParameterList to allow packing")
> ---
> src/mesa/state_tracker/st_atom_constbuf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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
> --
> 2.17.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20181030/be84b9e2/attachment-0001.html>
More information about the mesa-dev
mailing list