i965: get shared_size from shader_info rather than gl_shader_program
authorTimothy Arceri <timothy.arceri@collabora.com>
Mon, 7 Nov 2016 05:43:39 +0000 (16:43 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Fri, 6 Jan 2017 00:21:40 +0000 (11:21 +1100)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/mesa/drivers/dri/i965/brw_cs.c

index e4d82cf..522ddb9 100644 (file)
@@ -68,7 +68,7 @@ brw_codegen_cs_prog(struct brw_context *brw,
 
    memset(&prog_data, 0, sizeof(prog_data));
 
-   if (prog->Comp.SharedSize > 64 * 1024) {
+   if (cp->program.info.cs.shared_size > 64 * 1024) {
       prog->data->LinkStatus = false;
       const char *error_str =
          "Compute shader used more than 64KB of shared variables";
@@ -78,7 +78,7 @@ brw_codegen_cs_prog(struct brw_context *brw,
       ralloc_free(mem_ctx);
       return false;
    } else {
-      prog_data.base.total_shared = prog->Comp.SharedSize;
+      prog_data.base.total_shared = cp->program.info.cs.shared_size;
    }
 
    assign_cs_binding_table_offsets(devinfo, prog, &cp->program, &prog_data);