mesa: set cs shader_info metadata directly
authorTimothy Arceri <timothy.arceri@collabora.com>
Wed, 19 Oct 2016 01:09:09 +0000 (12:09 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Wed, 26 Oct 2016 03:29:36 +0000 (14:29 +1100)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/shader_info.c
src/mesa/main/shaderapi.c

index 20422eff0d990a7c3800a810fb8b38186949aaa8..9329e518a379c78efe1bc64ee2fb158af9502799 100644 (file)
@@ -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 */
    }
index b681534ddbf29cd0c373aee15def70e033d0d75f..bcf53bb679f772c76994a475cbaf35788ab53272 100644 (file)
@@ -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: