diff options
author | Brian Paul <brianp@vmware.com> | 2009-02-10 16:44:02 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-02-10 16:44:02 -0700 |
commit | 5340b6dff73a0a23531ce2a5f28fba8303adab6e (patch) | |
tree | b141fc3648568dd8b941c966059e6ed32a8bd0ad /src/mesa/shader/prog_print.c | |
parent | 9fd26daec24f21dbe17afcb2e2ab272667ee9a69 (diff) | |
parent | ee4c921b65fb76998711f3c40330505cbc49a0e0 (diff) |
Merge commit 'origin/gallium-master-merge'
This is the big merge of the gallium-0.2 branch into master.
gallium-master-merge was just the staging area for it.
Both gallium-0.2 and gallium-master-merge are considered closed now.
Conflicts:
progs/demos/Makefile
src/mesa/main/state.c
src/mesa/main/texenvprogram.c
Diffstat (limited to 'src/mesa/shader/prog_print.c')
-rw-r--r-- | src/mesa/shader/prog_print.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 8b0f16e688..d0ed22e98e 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -253,7 +253,9 @@ reg_string(enum register_file f, GLint index, gl_prog_print_mode mode, { struct gl_program_parameter *param = prog->Parameters->Parameters + index; - sprintf(str, _mesa_program_state_string(param->StateIndexes)); + char *state = _mesa_program_state_string(param->StateIndexes); + sprintf(str, state); + _mesa_free(state); } break; case PROGRAM_ADDRESS: @@ -359,6 +361,19 @@ _mesa_swizzle_string(GLuint swizzle, GLuint negateBase, GLboolean extended) } +void +_mesa_print_swizzle(GLuint swizzle) +{ + if (swizzle == SWIZZLE_XYZW) { + _mesa_printf(".xyzw\n"); + } + else { + const char *s = _mesa_swizzle_string(swizzle, 0, 0); + _mesa_printf("%s\n", s); + } +} + + const char * _mesa_writemask_string(GLuint writeMask) { |