i965: get InfoLog and LinkStatus via the shader program data pointer in gl_program

This removes another dependency on gl_shader_program in the codegen
functions.

Reviewed-by: Eric Anholt <eric@anholt.net>
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c
index 805d88a..0df83e8 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_gs.c
@@ -155,7 +155,7 @@
                      &prog_data, gp->program.nir, prog,
                      st_index, &program_size, &error_str);
    if (program == NULL) {
-      ralloc_strcat(&prog->data->InfoLog, error_str);
+      ralloc_strcat(&gp->program.sh.data->InfoLog, error_str);
       _mesa_problem(NULL, "Failed to compile geometry shader: %s\n", error_str);
 
       ralloc_free(mem_ctx);
diff --git a/src/mesa/drivers/dri/i965/brw_tcs.c b/src/mesa/drivers/dri/i965/brw_tcs.c
index 03986a9..f890ccf 100644
--- a/src/mesa/drivers/dri/i965/brw_tcs.c
+++ b/src/mesa/drivers/dri/i965/brw_tcs.c
@@ -265,9 +265,9 @@
       brw_compile_tcs(compiler, brw, mem_ctx, key, &prog_data, nir, st_index,
                       &program_size, &error_str);
    if (program == NULL) {
-      if (shader_prog) {
-         shader_prog->data->LinkStatus = false;
-         ralloc_strcat(&shader_prog->data->InfoLog, error_str);
+      if (tep) {
+         tep->program.sh.data->LinkStatus = false;
+         ralloc_strcat(&tep->program.sh.data->InfoLog, error_str);
       }
 
       _mesa_problem(NULL, "Failed to compile tessellation control shader: "
diff --git a/src/mesa/drivers/dri/i965/brw_tes.c b/src/mesa/drivers/dri/i965/brw_tes.c
index ea4d7cf..2031366 100644
--- a/src/mesa/drivers/dri/i965/brw_tes.c
+++ b/src/mesa/drivers/dri/i965/brw_tes.c
@@ -182,10 +182,8 @@
       brw_compile_tes(compiler, brw, mem_ctx, key, &prog_data, nir,
                       shader_prog, st_index, &program_size, &error_str);
    if (program == NULL) {
-      if (shader_prog) {
-         shader_prog->data->LinkStatus = false;
-         ralloc_strcat(&shader_prog->data->InfoLog, error_str);
-      }
+      tep->program.sh.data->LinkStatus = false;
+      ralloc_strcat(&tep->program.sh.data->InfoLog, error_str);
 
       _mesa_problem(NULL, "Failed to compile tessellation evaluation shader: "
                     "%s\n", error_str);
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index bd020d8..ede6097 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -191,8 +191,8 @@
                             st_index, &program_size, &error_str);
    if (program == NULL) {
       if (prog) {
-         prog->data->LinkStatus = false;
-         ralloc_strcat(&prog->data->InfoLog, error_str);
+         vp->program.sh.data->LinkStatus = false;
+         ralloc_strcat(&vp->program.sh.data->InfoLog, error_str);
       }
 
       _mesa_problem(NULL, "Failed to compile vertex shader: %s\n", error_str);
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index 844c912..b0cd163 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -150,8 +150,8 @@
 
    if (program == NULL) {
       if (prog) {
-         prog->data->LinkStatus = false;
-         ralloc_strcat(&prog->data->InfoLog, error_str);
+         fp->program.sh.data->LinkStatus = false;
+         ralloc_strcat(&fp->program.sh.data->InfoLog, error_str);
       }
 
       _mesa_problem(NULL, "Failed to compile fragment shader: %s\n", error_str);