Mesa (master): mesa/compiler: add local_size_variable to shader_info

Timothy Arceri tarceri at kemper.freedesktop.org
Thu Dec 29 23:57:41 UTC 2016


Module: Mesa
Branch: master
Commit: 8a69ae5345045af4642145ad0bcfd1314d4d949e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8a69ae5345045af4642145ad0bcfd1314d4d949e

Author: Timothy Arceri <timothy.arceri at collabora.com>
Date:   Mon Oct 31 22:06:37 2016 +1100

mesa/compiler: add local_size_variable to shader_info

This will be used in api_validate.c in a following patch when we
switch to using gl_program pointers for the pipelines CurrentProgram
array.

Reviewed-by: Eric Anholt <eric at anholt.net>

---

 src/compiler/shader_info.h | 2 ++
 src/mesa/main/shaderapi.c  | 1 +
 2 files changed, 3 insertions(+)

diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h
index 6c05f38..181f85f 100644
--- a/src/compiler/shader_info.h
+++ b/src/compiler/shader_info.h
@@ -134,6 +134,8 @@ typedef struct shader_info {
       struct {
          unsigned local_size[3];
 
+         bool local_size_variable;
+
          /**
           * Size of shared variables accessed by the compute shader.
           */
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index c1e67f3..f910614 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -2203,6 +2203,7 @@ _mesa_copy_linked_program_data(const struct gl_shader_program *src,
       for (int i = 0; i < 3; i++)
          dst->info.cs.local_size[i] = src->Comp.LocalSize[i];
       dst->info.cs.shared_size = src->Comp.SharedSize;
+      dst->info.cs.local_size_variable = src->Comp.LocalSizeVariable;
       break;
    }
    default:




More information about the mesa-commit mailing list