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>
This commit is contained in:
Timothy Arceri
2016-11-08 10:25:57 +11:00
parent 340b22c217
commit b880281f0b
5 changed files with 10 additions and 12 deletions

View File

@@ -155,7 +155,7 @@ brw_codegen_gs_prog(struct brw_context *brw,
&prog_data, gp->program.nir, prog, &prog_data, gp->program.nir, prog,
st_index, &program_size, &error_str); st_index, &program_size, &error_str);
if (program == NULL) { 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); _mesa_problem(NULL, "Failed to compile geometry shader: %s\n", error_str);
ralloc_free(mem_ctx); ralloc_free(mem_ctx);

View File

@@ -265,9 +265,9 @@ brw_codegen_tcs_prog(struct brw_context *brw,
brw_compile_tcs(compiler, brw, mem_ctx, key, &prog_data, nir, st_index, brw_compile_tcs(compiler, brw, mem_ctx, key, &prog_data, nir, st_index,
&program_size, &error_str); &program_size, &error_str);
if (program == NULL) { if (program == NULL) {
if (shader_prog) { if (tep) {
shader_prog->data->LinkStatus = false; tep->program.sh.data->LinkStatus = false;
ralloc_strcat(&shader_prog->data->InfoLog, error_str); ralloc_strcat(&tep->program.sh.data->InfoLog, error_str);
} }
_mesa_problem(NULL, "Failed to compile tessellation control shader: " _mesa_problem(NULL, "Failed to compile tessellation control shader: "

View File

@@ -182,10 +182,8 @@ brw_codegen_tes_prog(struct brw_context *brw,
brw_compile_tes(compiler, brw, mem_ctx, key, &prog_data, nir, brw_compile_tes(compiler, brw, mem_ctx, key, &prog_data, nir,
shader_prog, st_index, &program_size, &error_str); shader_prog, st_index, &program_size, &error_str);
if (program == NULL) { if (program == NULL) {
if (shader_prog) { tep->program.sh.data->LinkStatus = false;
shader_prog->data->LinkStatus = false; ralloc_strcat(&tep->program.sh.data->InfoLog, error_str);
ralloc_strcat(&shader_prog->data->InfoLog, error_str);
}
_mesa_problem(NULL, "Failed to compile tessellation evaluation shader: " _mesa_problem(NULL, "Failed to compile tessellation evaluation shader: "
"%s\n", error_str); "%s\n", error_str);

View File

@@ -191,8 +191,8 @@ brw_codegen_vs_prog(struct brw_context *brw,
st_index, &program_size, &error_str); st_index, &program_size, &error_str);
if (program == NULL) { if (program == NULL) {
if (prog) { if (prog) {
prog->data->LinkStatus = false; vp->program.sh.data->LinkStatus = false;
ralloc_strcat(&prog->data->InfoLog, error_str); ralloc_strcat(&vp->program.sh.data->InfoLog, error_str);
} }
_mesa_problem(NULL, "Failed to compile vertex shader: %s\n", error_str); _mesa_problem(NULL, "Failed to compile vertex shader: %s\n", error_str);

View File

@@ -150,8 +150,8 @@ brw_codegen_wm_prog(struct brw_context *brw,
if (program == NULL) { if (program == NULL) {
if (prog) { if (prog) {
prog->data->LinkStatus = false; fp->program.sh.data->LinkStatus = false;
ralloc_strcat(&prog->data->InfoLog, error_str); ralloc_strcat(&fp->program.sh.data->InfoLog, error_str);
} }
_mesa_problem(NULL, "Failed to compile fragment shader: %s\n", error_str); _mesa_problem(NULL, "Failed to compile fragment shader: %s\n", error_str);