On 11/13/2013 03:32 PM, Jose Fonseca wrote:
----- Original Message -----
On 11/13/2013 10:37 AM, jfons...@vmware.com wrote:
From: José Fonseca <jfons...@vmware.com>

It is similar to tgsi_exec.c's DEBUG_EXECUTION compile flag.

I had prototyped this for a while while debugging an issue, but finally
cleaned this up and added a few more bells and whistles.

Here is a sample output.

CONST[0]:
    X: 0.006250 0.006250 0.006250 0.006250
    Y: -0.007143 -0.007143 -0.007143 -0.007143
    Z: -1.000000 -1.000000 -1.000000 -1.000000
    W: 1.000000 1.000000 1.000000 1.000000
IN[0]:
    X: 143.500000 175.500000 175.500000 143.500000
    Y: 123.500000 123.500000 155.500000 155.500000
    Z: 0.000000 0.000000 0.000000 0.000000
    W: 1.000000 1.000000 1.000000 1.000000
    1: RCP TEMP[0].w, IN[0].wwww
      TEMP[0].w =  1 1 1 1
    2: MAD TEMP[0].xy, IN[0], CONST[0], CONST[0].zwzw
      TEMP[0].x =  -0.103124976 0.0968750715 0.0968750715 -0.103124976
      TEMP[0].y =  0.117857158 0.117857158 -0.110714316 -0.110714316
    3: MUL OUT[0].xy, TEMP[0], TEMP[0].wwww
      OUT[0].x =  -0.103124976 0.0968750715 0.0968750715 -0.103124976
      OUT[0].y =  0.117857158 0.117857158 -0.110714316 -0.110714316
    4: MUL OUT[0].z, IN[0].zzzz, TEMP[0].wwww
      OUT[0].z =  0 0 0 0
    5: MOV OUT[0].w, TEMP[0]
      OUT[0].w =  1 1 1 1

Just a quick comment on the formatting above.  Can you get rid of the
'>' prefixing the instructions?  I imagine we'd want to sometimes use
diff to find the differences between two runs, so extra >s might be
confusing.

How about no prefix/indentation on the TGSI instructions but indent the
result lines a little bit?

Thanks for the review. Unfortunately tgsi_dump_* right-aligns the instructions numbers so 
they always appear indented .  I feel that some marker helps quickly spot the instructions, 
but you're right that the ">" will look confusing in diffs and quotes. Maybe 
another marker such as '$' or '#' would be a better compromise.

Sure, $ or # would be fine.

-Brian


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

Reply via email to