From edded1237607348683f492db313e823dc2e380c3 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Fri, 16 Jun 2017 10:17:56 +1000 Subject: mesa: rework ParameterList to allow packing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently everything is padded to 4 components. Making the list more flexible will allow us to do uniform packing. V2 (suggestions from Nicolai): - always pass existing calls to _mesa_add_parameter() true for padd_and_align - fix bindless param value offsets - remove left over wip logic from pad and align code - zero out param value padding - whitespace fix Reviewed-by: Marek Olšák --- src/mesa/program/prog_print.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mesa/program/prog_print.c') diff --git a/src/mesa/program/prog_print.c b/src/mesa/program/prog_print.c index b273bbf4c86..e8d087c506b 100644 --- a/src/mesa/program/prog_print.c +++ b/src/mesa/program/prog_print.c @@ -931,7 +931,9 @@ _mesa_fprint_parameter_list(FILE *f, fprintf(f, "dirty state flags: 0x%x\n", list->StateFlags); for (i = 0; i < list->NumParameters; i++){ struct gl_program_parameter *param = list->Parameters + i; - const GLfloat *v = (GLfloat *) list->ParameterValues[i]; + unsigned pvo = list->ParameterValueOffset[i]; + const GLfloat *v = (GLfloat *) list->ParameterValues + pvo; + fprintf(f, "param[%d] sz=%d %s %s = {%.3g, %.3g, %.3g, %.3g}", i, param->Size, _mesa_register_file_name(list->Parameters[i].Type), -- cgit v1.2.3