diff options
author | Brian Paul <[email protected]> | 2008-11-24 08:43:38 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-01-06 08:52:08 -0700 |
commit | 36f9d3fa9a4a7b5c25821c5099824c8e3b6ebc95 (patch) | |
tree | da9a0ecb1ff8081cec6b7ada57389691fd656855 /src/mesa | |
parent | ee3da89b197fa0aa063be6fcabddec284cc00bec (diff) |
mesa: added PROG_PARAM_ bits for invariant, flat/linear interpolation
Plus, update the print/debug code.
(cherry picked from commit 777a5c4f2e7c6c6ec0227a239b1af6c6b86dfab2)
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/shader/prog_parameter.h | 5 | ||||
-rw-r--r-- | src/mesa/shader/prog_print.c | 11 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/mesa/shader/prog_parameter.h b/src/mesa/shader/prog_parameter.h index 829fd25d55f..a8ef0561f7a 100644 --- a/src/mesa/shader/prog_parameter.h +++ b/src/mesa/shader/prog_parameter.h @@ -39,7 +39,10 @@ * Program parameter flags */ /*@{*/ -#define PROG_PARAM_CENTROID_BIT 0x1 +#define PROG_PARAM_CENTROID_BIT 0x1 /**< for varying vars (GLSL 1.20) */ +#define PROG_PARAM_INVARIANT_BIT 0x2 /**< for varying vars (GLSL 1.20) */ +#define PROG_PARAM_FLAT_BIT 0x4 /**< for varying vars (GLSL 1.30) */ +#define PROG_PARAM_LINEAR_BIT 0x8 /**< for varying vars (GLSL 1.30) */ /*@}*/ diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index db6eac4fd98..7049c3c9d06 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -814,9 +814,18 @@ _mesa_print_parameter_list(const struct gl_program_parameter_list *list) for (i = 0; i < list->NumParameters; i++){ struct gl_program_parameter *param = list->Parameters + i; const GLfloat *v = list->ParameterValues[i]; - _mesa_printf("param[%d] sz=%d %s %s = {%.3g, %.3g, %.3g, %.3g};\n", + _mesa_printf("param[%d] sz=%d %s %s = {%.3g, %.3g, %.3g, %.3g}", i, param->Size, file_string(list->Parameters[i].Type, mode), param->Name, v[0], v[1], v[2], v[3]); + if (param->Flags & PROG_PARAM_CENTROID_BIT) + _mesa_printf(" Centroid"); + if (param->Flags & PROG_PARAM_INVARIANT_BIT) + _mesa_printf(" Invariant"); + if (param->Flags & PROG_PARAM_FLAT_BIT) + _mesa_printf(" Flat"); + if (param->Flags & PROG_PARAM_LINEAR_BIT) + _mesa_printf(" Linear"); + _mesa_printf("\n"); } } |