[Mesa-dev] [PATCH 22/42] compiler: add additional cs metadata fields to shader info

Timothy Arceri timothy.arceri at collabora.com
Wed Oct 19 23:09:39 UTC 2016


And copy values from GLSL.
---
 src/compiler/shader_info.c | 1 +
 src/compiler/shader_info.h | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/src/compiler/shader_info.c b/src/compiler/shader_info.c
index 22ea3a6..20422ef 100644
--- a/src/compiler/shader_info.c
+++ b/src/compiler/shader_info.c
@@ -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;
    }
 
diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h
index a44fcac..b449900 100644
--- a/src/compiler/shader_info.h
+++ b/src/compiler/shader_info.h
@@ -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 {
-- 
2.7.4



More information about the mesa-dev mailing list