[Mesa-dev] [PATCH 46/70] i965: get InfoLog and LinkStatus via the shader program data pointer in gl_program
Timothy Arceri
timothy.arceri at collabora.com
Fri Nov 11 00:46:28 UTC 2016
This removes another dependency on gl_shader_program in the codegen
functions.
---
src/mesa/drivers/dri/i965/brw_gs.c | 2 +-
src/mesa/drivers/dri/i965/brw_tcs.c | 6 ++----
src/mesa/drivers/dri/i965/brw_tes.c | 6 ++----
src/mesa/drivers/dri/i965/brw_vs.c | 4 ++--
src/mesa/drivers/dri/i965/brw_wm.c | 4 ++--
5 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c
index e9d101d..5dde0db 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_gs.c
@@ -155,7 +155,7 @@ brw_codegen_gs_prog(struct brw_context *brw,
&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 30e6e9b..766d0fc 100644
--- a/src/mesa/drivers/dri/i965/brw_tcs.c
+++ b/src/mesa/drivers/dri/i965/brw_tcs.c
@@ -262,10 +262,8 @@ brw_codegen_tcs_prog(struct brw_context *brw,
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);
- }
+ tcp->program.sh.data->LinkStatus = false;
+ ralloc_strcat(&tcp->program.sh.data->InfoLog, error_str);
_mesa_problem(NULL, "Failed to compile tessellation control shader: "
"%s\n", error_str);
diff --git a/src/mesa/drivers/dri/i965/brw_tes.c b/src/mesa/drivers/dri/i965/brw_tes.c
index 2090a0e..ccd1ffb 100644
--- a/src/mesa/drivers/dri/i965/brw_tes.c
+++ b/src/mesa/drivers/dri/i965/brw_tes.c
@@ -184,10 +184,8 @@ brw_codegen_tes_prog(struct brw_context *brw,
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 f0795cb..3612385 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -250,8 +250,8 @@ brw_codegen_vs_prog(struct brw_context *brw,
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 fd6a622..87c3507 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -209,8 +209,8 @@ brw_codegen_wm_prog(struct brw_context *brw,
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);
--
2.7.4
More information about the mesa-dev
mailing list