diff options
author | Brian Paul <brianp@vmware.com> | 2009-12-27 10:24:21 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-12-27 10:24:21 -0700 |
commit | b46bcd8e7b37aa2e9159e126c1cc88234a3c2790 (patch) | |
tree | 440d291cc787c2b951a6581d0bb3cc60c13bc87f /src/mesa/shader | |
parent | cb504a026cbad317c6af1888bfcc616182e0c826 (diff) | |
parent | 7831515e69ac875b1ac0b1b248ab10c6cf37bf52 (diff) | |
download | external_mesa3d-b46bcd8e7b37aa2e9159e126c1cc88234a3c2790.zip external_mesa3d-b46bcd8e7b37aa2e9159e126c1cc88234a3c2790.tar.gz external_mesa3d-b46bcd8e7b37aa2e9159e126c1cc88234a3c2790.tar.bz2 |
Merge branch 'mesa_7_7_branch'
Diffstat (limited to 'src/mesa/shader')
-rw-r--r-- | src/mesa/shader/prog_print.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 52c102c..9f9789e 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -821,8 +821,10 @@ _mesa_print_program(const struct gl_program *prog) /** - * Return binary representation of value (as a string). + * Return binary representation of 64-bit value (as a string). * Insert a comma to separate each group of 8 bits. + * Note we return a pointer to local static storage so this is not + * re-entrant, etc. * XXX move to imports.[ch] if useful elsewhere. */ static const char * @@ -831,7 +833,7 @@ binary(GLbitfield64 val) static char buf[80]; GLint i, len = 0; for (i = 63; i >= 0; --i) { - if (val & (1 << i)) + if (val & (1ULL << i)) buf[len++] = '1'; else if (len > 0 || i == 0) buf[len++] = '0'; @@ -855,7 +857,7 @@ _mesa_fprint_program_parameters(FILE *f, _mesa_fprintf(f, "InputsRead: 0x%x (0b%s)\n", prog->InputsRead, binary(prog->InputsRead)); - _mesa_fprintf(f, "OutputsWritten: 0x%x (0b%s)\n", + _mesa_fprintf(f, "OutputsWritten: 0x%llx (0b%s)\n", prog->OutputsWritten, binary(prog->OutputsWritten)); _mesa_fprintf(f, "NumInstructions=%d\n", prog->NumInstructions); _mesa_fprintf(f, "NumTemporaries=%d\n", prog->NumTemporaries); |