Mesa (master): i965: Complain about variable index lowering when INTEL_DEBUG=perf.
Kenneth Graunke
kwg at kemper.freedesktop.org
Sat Sep 29 07:40:31 UTC 2012
Module: Mesa
Branch: master
Commit: 225276c696341f6bf9c97969b977ffdebc3c920a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=225276c696341f6bf9c97969b977ffdebc3c920a
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Wed Sep 19 13:27:59 2012 -0700
i965: Complain about variable index lowering when INTEL_DEBUG=perf.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Eric Anholt <eric at anholt.net>
---
src/mesa/drivers/dri/i965/brw_shader.cpp | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index 1cd9095..f8482e1 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -143,8 +143,14 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
bool temp = stage == MESA_SHADER_FRAGMENT;
bool uniform = stage == MESA_SHADER_FRAGMENT;
- lower_variable_index_to_cond_assign(shader->ir,
- input, output, temp, uniform);
+ bool lowered_variable_indexing =
+ lower_variable_index_to_cond_assign(shader->ir,
+ input, output, temp, uniform);
+
+ if (unlikely((INTEL_DEBUG & DEBUG_PERF) && lowered_variable_indexing)) {
+ perf_debug("Unsupported form of variable indexing in FS; falling "
+ "back to very inefficient code generation\n");
+ }
/* FINISHME: Do this before the variable index lowering. */
lower_ubo_reference(&shader->base, shader->ir);
More information about the mesa-commit
mailing list