mesa: store shared size in gl_compute_program
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 3 Feb 2016 17:08:46 +0000 (18:08 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Sat, 13 Feb 2016 14:51:17 +0000 (15:51 +0100)
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 <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/main/mtypes.h
src/mesa/main/shaderapi.c

index 840e22664c5e0840299f907b1d7f7db4459b029a..432cda9caeeb914024a5cb1b51cf73ad86c9eb73 100644 (file)
@@ -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;
 };
 
 
index df92c0912afe34e23c0fbec47329078f8eb0426d..cdf15b48a0d233909b9fefc411502ed544f85a21 100644 (file)
@@ -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: