summaryrefslogtreecommitdiff
path: root/src/compiler/glsl/link_varyings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl/link_varyings.cpp')
-rw-r--r--src/compiler/glsl/link_varyings.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp
index 767672b200..6cd75aa350 100644
--- a/src/compiler/glsl/link_varyings.cpp
+++ b/src/compiler/glsl/link_varyings.cpp
@@ -2511,6 +2511,16 @@ link_varyings(struct gl_shader_program *prog, unsigned first, unsigned last,
return false;
}
+ if (ctx->_Shader->Flags & GLSL_DUMP) {
+ printf("Before bottom of link_varyings\n");
+ for (unsigned i = MESA_SHADER_VERTEX; i <= MESA_SHADER_FRAGMENT; i++) {
+ if (prog->_LinkedShaders[i] != NULL) {
+ printf("Stage: %s\n", _mesa_shader_stage_to_string(i));
+ _mesa_print_ir(stdout, prog->_LinkedShaders[i]->ir, NULL);
+ }
+ }
+ }
+
if (last <= MESA_SHADER_FRAGMENT) {
/* Remove unused varyings from the first/last stage unless SSO */
remove_unused_shader_inputs_and_outputs(prog->SeparateShader,
@@ -2520,6 +2530,16 @@ link_varyings(struct gl_shader_program *prog, unsigned first, unsigned last,
prog->_LinkedShaders[last],
ir_var_shader_out);
+ if (ctx->_Shader->Flags & GLSL_DUMP) {
+ printf("After remove_unused_shader_inputs_and_outputs\n");
+ for (unsigned i = MESA_SHADER_VERTEX; i <= MESA_SHADER_FRAGMENT; i++) {
+ if (prog->_LinkedShaders[i] != NULL) {
+ printf("Stage: %s\n", _mesa_shader_stage_to_string(i));
+ _mesa_print_ir(stdout, prog->_LinkedShaders[i]->ir, NULL);
+ }
+ }
+ }
+
/* If the program is made up of only a single stage */
if (first == last) {
gl_linked_shader *const sh = prog->_LinkedShaders[last];
@@ -2572,6 +2592,16 @@ link_varyings(struct gl_shader_program *prog, unsigned first, unsigned last,
reserved_out_slots | reserved_in_slots))
return false;
+ if (ctx->_Shader->Flags & GLSL_DUMP) {
+ printf("After assign_varying_locations, stage %s\n", _mesa_shader_stage_to_string(i));
+ for (unsigned i = MESA_SHADER_VERTEX; i <= MESA_SHADER_FRAGMENT; i++) {
+ if (prog->_LinkedShaders[i] != NULL) {
+ printf("Stage: %s\n", _mesa_shader_stage_to_string(i));
+ _mesa_print_ir(stdout, prog->_LinkedShaders[i]->ir, NULL);
+ }
+ }
+ }
+
/* This must be done after all dead varyings are eliminated. */
if (sh_i != NULL) {
unsigned slots_used = _mesa_bitcount_64(reserved_out_slots);