We can just call it once. Also a following patch will also introduce
link time component packing which modifies the outputs_written
bit mask, we want to avoid calling update_xfb_info() until after
packing is completed.
---
src/mesa/drivers/dri/i965/brw_link.cpp | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp
b/src/mesa/drivers/dri/i965/brw_link.cpp
index 1a28e63fcae..b6c5362a1ee 100644
--- a/src/mesa/drivers/dri/i965/brw_link.cpp
+++ b/src/mesa/drivers/dri/i965/brw_link.cpp
@@ -325,8 +325,6 @@ brw_link_shader(struct gl_context *ctx, struct
gl_shader_program *shProg)
infos[stage] = &prog->nir->info;
- update_xfb_info(prog->sh.LinkedTransformFeedback, infos[stage]);
-
/* Make a pass over the IR to add state references for any built-in
* uniforms that are used. This has to be done now (during linking).
* Code generation doesn't happen until the first time this shader is
@@ -347,6 +345,11 @@ brw_link_shader(struct gl_context *ctx, struct
gl_shader_program *shProg)
}
}
+ if (shProg->last_vert_prog) {
+ update_xfb_info(shProg->last_vert_prog->sh.LinkedTransformFeedback,
+ &shProg->last_vert_prog->nir->info);
+ }
+
/* The linker tries to dead code eliminate unused varying components,
* and make sure interfaces match. But it isn't able to do so in all
* cases. So, explicitly make the interfaces match by OR'ing together
--
2.13.6
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev