[Mesa-dev] [PATCH 24/42] mesa: set cs shader_info metadata directly

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


---
 src/compiler/shader_info.c | 9 ---------
 src/mesa/main/shaderapi.c  | 8 +++-----
 2 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/src/compiler/shader_info.c b/src/compiler/shader_info.c
index 20422ef..9329e51 100644
--- a/src/compiler/shader_info.c
+++ b/src/compiler/shader_info.c
@@ -51,15 +51,6 @@ copy_shader_info(const struct gl_shader_program *shader_prog,
       break;
    }
 
-   case MESA_SHADER_COMPUTE: {
-      struct gl_compute_program *cp = (struct gl_compute_program *)sh->Program;
-      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;
-   }
-
    default:
       break; /* No stage-specific info */
    }
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index b681534..bcf53bb 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -2201,11 +2201,9 @@ _mesa_copy_linked_program_data(const struct gl_shader_program *src,
       break;
    }
    case MESA_SHADER_COMPUTE: {
-      struct gl_compute_program *dst_cp = (struct gl_compute_program *) dst;
-      int i;
-      for (i = 0; i < 3; i++)
-         dst_cp->LocalSize[i] = src->Comp.LocalSize[i];
-      dst_cp->SharedSize = src->Comp.SharedSize;
+      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;
       break;
    }
    default:
-- 
2.7.4



More information about the mesa-dev mailing list