compiler: add additional cs metadata fields to shader info
authorTimothy Arceri <timothy.arceri@collabora.com>
Thu, 13 Oct 2016 04:18:53 +0000 (15:18 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Wed, 26 Oct 2016 03:29:36 +0000 (14:29 +1100)
And copy values from GLSL.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/shader_info.c
src/compiler/shader_info.h

index 22ea3a616982f299031e0c29ff078fabbdee76b4..20422eff0d990a7c3800a810fb8b38186949aaa8 100644 (file)
@@ -56,6 +56,7 @@ copy_shader_info(const struct gl_shader_program *shader_prog,
       info->cs.local_size[0] = cp->LocalSize[0];
       info->cs.local_size[1] = cp->LocalSize[1];
       info->cs.local_size[2] = cp->LocalSize[2];
+      info->cs.shared_size = cp->SharedSize;
       break;
    }
 
index a44fcac23886eb427e5c5a9ccdabc72a5fa2429d..b4499006f86372867af2671f8f67e78eae32c28c 100644 (file)
@@ -118,6 +118,11 @@ typedef struct shader_info {
 
       struct {
          unsigned local_size[3];
+
+         /**
+          * Size of shared variables accessed by the compute shader.
+          */
+         unsigned shared_size;
       } cs;
 
       struct {