From: Samuel Pitoiset Date: Wed, 3 Feb 2016 17:08:46 +0000 (+0100) Subject: mesa: store shared size in gl_compute_program X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a9eb1327be6932aae972532dbd87cd2fc50e846a;p=mesa.git mesa: store shared size in gl_compute_program The size of shared variables needs to be stored in gl_compute_program in order to set up pipe_compute_state::req_local_mem. Signed-off-by: Samuel Pitoiset Reviewed-by: Ilia Mirkin Reviewed-by: Marek Olšák --- diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 840e22664c5..432cda9caee 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2044,6 +2044,11 @@ struct gl_compute_program * Size specified using local_size_{x,y,z}. */ unsigned LocalSize[3]; + + /** + * Size of shared variables accessed by the compute shader. + */ + unsigned SharedSize; }; diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index df92c0912af..cdf15b48a0d 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -2124,6 +2124,7 @@ _mesa_copy_linked_program_data(gl_shader_stage type, int i; for (i = 0; i < 3; i++) dst_cp->LocalSize[i] = src->Comp.LocalSize[i]; + dst_cp->SharedSize = src->Comp.SharedSize; break; } default: