Re: [Mesa-dev] [PATCH 4/5] i965/vec4: use a custom envvar to decide to print the assembly on test_vec4_cmod_propagation

2015-10-15 Thread Matt Turner
On Sat, Oct 10, 2015 at 4:24 AM, Alejandro Piñeiro  wrote:
> The complete way to do this would be parse INTEL_DEBUG and
> print the output if DEBUG_VS (or a new one) is present
> (see intel_debug.c).
>
> But that seems like an overkill for the unit tests, that
> after all, the most common use case is being run when
> calling make check.

Seems like a fine idea. I wouldn't mind giving the fs version of the
test the same treatment.

Reviewed-by: Matt Turner 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 4/5] i965/vec4: use a custom envvar to decide to print the assembly on test_vec4_cmod_propagation

2015-10-10 Thread Alejandro Piñeiro
The complete way to do this would be parse INTEL_DEBUG and
print the output if DEBUG_VS (or a new one) is present
(see intel_debug.c).

But that seems like an overkill for the unit tests, that
after all, the most common use case is being run when
calling make check.
---

Just added the envvar because while working on the optimization
I didn't want to recompile if I wanted to see the instructions.


 src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp 
b/src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp
index d2fba1b..e840cb9 100644
--- a/src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp
@@ -125,7 +125,7 @@ instruction(bblock_t *block, int num)
 static bool
 cmod_propagation(vec4_visitor *v)
 {
-   const bool print = false;
+   const bool print = getenv("TEST_DEBUG");
 
if (print) {
   fprintf(stderr, "= Before =\n");
-- 
2.1.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev