From 3120894c6d33a26cda642246344e8945db200ac2 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Thu, 5 Feb 2009 14:44:17 +0000 Subject: gallium: add new aux lib for index list translations Could this be the ultimate index list translating utility? Maybe, but it doesn't yet include support for splitting primitives. Unlike previous attempts, this captures all possible combinations of API and hardware provoking vertex, supports generated list reuse and various other tricks. Relies on python-generated code. --- src/gallium/auxiliary/indices/Makefile | 16 + src/gallium/auxiliary/indices/SConscript | 17 + src/gallium/auxiliary/indices/u_indices.c | 253 ++ src/gallium/auxiliary/indices/u_indices.h | 83 + src/gallium/auxiliary/indices/u_indices_gen.c | 5129 ++++++++++++++++++++++++ src/gallium/auxiliary/indices/u_indices_gen.py | 318 ++ src/gallium/auxiliary/indices/u_indices_priv.h | 43 + 7 files changed, 5859 insertions(+) create mode 100644 src/gallium/auxiliary/indices/Makefile create mode 100644 src/gallium/auxiliary/indices/SConscript create mode 100644 src/gallium/auxiliary/indices/u_indices.c create mode 100644 src/gallium/auxiliary/indices/u_indices.h create mode 100644 src/gallium/auxiliary/indices/u_indices_gen.c create mode 100644 src/gallium/auxiliary/indices/u_indices_gen.py create mode 100644 src/gallium/auxiliary/indices/u_indices_priv.h (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/indices/Makefile b/src/gallium/auxiliary/indices/Makefile new file mode 100644 index 0000000000..8fa61d265e --- /dev/null +++ b/src/gallium/auxiliary/indices/Makefile @@ -0,0 +1,16 @@ +TOP = ../../../.. +include $(TOP)/configs/current + +LIBNAME = indices + +C_SOURCES = \ + u_indices_gen.c + +include ../../Makefile.template + +u_indices_gen.c: u_indices_gen.py + python $< > $@ + + +symlinks: + diff --git a/src/gallium/auxiliary/indices/SConscript b/src/gallium/auxiliary/indices/SConscript new file mode 100644 index 0000000000..65a43a9f64 --- /dev/null +++ b/src/gallium/auxiliary/indices/SConscript @@ -0,0 +1,17 @@ +Import('*') + +env.CodeGenerate( + target = 'u_indices_gen.c', + script = 'u_indices_gen.py', + source = [], + command = 'python $SCRIPT > $TARGET' +) + +indices = env.ConvenienceLibrary( + target = 'indices', + source = [ +# 'u_indices.c', + 'u_indices_gen.c', + ]) + +auxiliaries.insert(0, indices) diff --git a/src/gallium/auxiliary/indices/u_indices.c b/src/gallium/auxiliary/indices/u_indices.c new file mode 100644 index 0000000000..0cf7d88653 --- /dev/null +++ b/src/gallium/auxiliary/indices/u_indices.c @@ -0,0 +1,253 @@ +/* + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#include "u_indices.h" +#include "u_indices_priv.h" + +static void translate_memcpy_ushort( const void *in, + unsigned nr, + void *out ) +{ + memcpy(out, in, nr*sizeof(short)); +} + +static void translate_memcpy_uint( const void *in, + unsigned nr, + void *out ) +{ + memcpy(out, in, nr*sizeof(int)); +} + + +int u_index_translator( unsigned hw_mask, + unsigned prim, + unsigned in_index_size, + unsigned nr, + unsigned in_pv, + unsigned out_pv, + unsigned *out_prim, + unsigned *out_index_size, + unsigned *out_nr, + u_translate_func *out_translate ) +{ + unsigned in_idx; + unsigned out_idx; + int ret = U_TRANSLATE_NORMAL; + + u_index_init(); + + in_idx = in_size_idx(in_index_size); + *out_index_size = (in_index_size == 4) ? 4 : 2; + out_idx = out_size_idx(*out_index_size); + + if ((hw_mask & (1< 0xfffe) ? 4 : 2; + out_idx = out_size_idx(*out_index_size); + + if ((hw_mask & (1< Date: Thu, 5 Feb 2009 16:04:13 +0000 Subject: indices: quad fixes --- src/gallium/auxiliary/indices/u_indices_gen.c | 256 ++++++++++++------------- src/gallium/auxiliary/indices/u_indices_gen.py | 9 +- 2 files changed, 133 insertions(+), 132 deletions(-) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/indices/u_indices_gen.c b/src/gallium/auxiliary/indices/u_indices_gen.c index 00b99804f2..01953c3244 100644 --- a/src/gallium/auxiliary/indices/u_indices_gen.c +++ b/src/gallium/auxiliary/indices/u_indices_gen.c @@ -176,11 +176,11 @@ static void generate_quadstrip_ushort_first2first( unsigned i, j; (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)(i+0); - (out+j+0)[1] = (ushort)(i+1); + (out+j+0)[0] = (ushort)(i+2); + (out+j+0)[1] = (ushort)(i+0); (out+j+0)[2] = (ushort)(i+3); - (out+j+3)[0] = (ushort)(i+1); - (out+j+3)[1] = (ushort)(i+2); + (out+j+3)[0] = (ushort)(i+0); + (out+j+3)[1] = (ushort)(i+1); (out+j+3)[2] = (ushort)(i+3); } } @@ -309,12 +309,12 @@ static void generate_quadstrip_ushort_first2last( unsigned i, j; (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)(i+1); + (out+j+0)[0] = (ushort)(i+0); (out+j+0)[1] = (ushort)(i+3); - (out+j+0)[2] = (ushort)(i+0); - (out+j+3)[0] = (ushort)(i+2); + (out+j+0)[2] = (ushort)(i+2); + (out+j+3)[0] = (ushort)(i+1); (out+j+3)[1] = (ushort)(i+3); - (out+j+3)[2] = (ushort)(i+1); + (out+j+3)[2] = (ushort)(i+0); } } static void generate_polygon_ushort_first2last( @@ -443,11 +443,11 @@ static void generate_quadstrip_ushort_last2first( (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { (out+j+0)[0] = (ushort)(i+3); - (out+j+0)[1] = (ushort)(i+0); - (out+j+0)[2] = (ushort)(i+1); + (out+j+0)[1] = (ushort)(i+2); + (out+j+0)[2] = (ushort)(i+0); (out+j+3)[0] = (ushort)(i+3); - (out+j+3)[1] = (ushort)(i+1); - (out+j+3)[2] = (ushort)(i+2); + (out+j+3)[1] = (ushort)(i+0); + (out+j+3)[2] = (ushort)(i+1); } } static void generate_polygon_ushort_last2first( @@ -575,11 +575,11 @@ static void generate_quadstrip_ushort_last2last( unsigned i, j; (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)(i+0); - (out+j+0)[1] = (ushort)(i+1); + (out+j+0)[0] = (ushort)(i+2); + (out+j+0)[1] = (ushort)(i+0); (out+j+0)[2] = (ushort)(i+3); - (out+j+3)[0] = (ushort)(i+1); - (out+j+3)[1] = (ushort)(i+2); + (out+j+3)[0] = (ushort)(i+0); + (out+j+3)[1] = (ushort)(i+1); (out+j+3)[2] = (ushort)(i+3); } } @@ -708,11 +708,11 @@ static void generate_quadstrip_uint_first2first( unsigned i, j; (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)(i+0); - (out+j+0)[1] = (uint)(i+1); + (out+j+0)[0] = (uint)(i+2); + (out+j+0)[1] = (uint)(i+0); (out+j+0)[2] = (uint)(i+3); - (out+j+3)[0] = (uint)(i+1); - (out+j+3)[1] = (uint)(i+2); + (out+j+3)[0] = (uint)(i+0); + (out+j+3)[1] = (uint)(i+1); (out+j+3)[2] = (uint)(i+3); } } @@ -841,12 +841,12 @@ static void generate_quadstrip_uint_first2last( unsigned i, j; (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)(i+1); + (out+j+0)[0] = (uint)(i+0); (out+j+0)[1] = (uint)(i+3); - (out+j+0)[2] = (uint)(i+0); - (out+j+3)[0] = (uint)(i+2); + (out+j+0)[2] = (uint)(i+2); + (out+j+3)[0] = (uint)(i+1); (out+j+3)[1] = (uint)(i+3); - (out+j+3)[2] = (uint)(i+1); + (out+j+3)[2] = (uint)(i+0); } } static void generate_polygon_uint_first2last( @@ -975,11 +975,11 @@ static void generate_quadstrip_uint_last2first( (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { (out+j+0)[0] = (uint)(i+3); - (out+j+0)[1] = (uint)(i+0); - (out+j+0)[2] = (uint)(i+1); + (out+j+0)[1] = (uint)(i+2); + (out+j+0)[2] = (uint)(i+0); (out+j+3)[0] = (uint)(i+3); - (out+j+3)[1] = (uint)(i+1); - (out+j+3)[2] = (uint)(i+2); + (out+j+3)[1] = (uint)(i+0); + (out+j+3)[2] = (uint)(i+1); } } static void generate_polygon_uint_last2first( @@ -1107,11 +1107,11 @@ static void generate_quadstrip_uint_last2last( unsigned i, j; (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)(i+0); - (out+j+0)[1] = (uint)(i+1); + (out+j+0)[0] = (uint)(i+2); + (out+j+0)[1] = (uint)(i+0); (out+j+0)[2] = (uint)(i+3); - (out+j+3)[0] = (uint)(i+1); - (out+j+3)[1] = (uint)(i+2); + (out+j+3)[0] = (uint)(i+0); + (out+j+3)[1] = (uint)(i+1); (out+j+3)[2] = (uint)(i+3); } } @@ -1258,11 +1258,11 @@ static void translate_quadstrip_ubyte2ushort_first2first( unsigned i, j; (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)in[i+0]; - (out+j+0)[1] = (ushort)in[i+1]; + (out+j+0)[0] = (ushort)in[i+2]; + (out+j+0)[1] = (ushort)in[i+0]; (out+j+0)[2] = (ushort)in[i+3]; - (out+j+3)[0] = (ushort)in[i+1]; - (out+j+3)[1] = (ushort)in[i+2]; + (out+j+3)[0] = (ushort)in[i+0]; + (out+j+3)[1] = (ushort)in[i+1]; (out+j+3)[2] = (ushort)in[i+3]; } } @@ -1411,12 +1411,12 @@ static void translate_quadstrip_ubyte2ushort_first2last( unsigned i, j; (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)in[i+1]; + (out+j+0)[0] = (ushort)in[i+0]; (out+j+0)[1] = (ushort)in[i+3]; - (out+j+0)[2] = (ushort)in[i+0]; - (out+j+3)[0] = (ushort)in[i+2]; + (out+j+0)[2] = (ushort)in[i+2]; + (out+j+3)[0] = (ushort)in[i+1]; (out+j+3)[1] = (ushort)in[i+3]; - (out+j+3)[2] = (ushort)in[i+1]; + (out+j+3)[2] = (ushort)in[i+0]; } } static void translate_polygon_ubyte2ushort_first2last( @@ -1565,11 +1565,11 @@ static void translate_quadstrip_ubyte2ushort_last2first( (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { (out+j+0)[0] = (ushort)in[i+3]; - (out+j+0)[1] = (ushort)in[i+0]; - (out+j+0)[2] = (ushort)in[i+1]; + (out+j+0)[1] = (ushort)in[i+2]; + (out+j+0)[2] = (ushort)in[i+0]; (out+j+3)[0] = (ushort)in[i+3]; - (out+j+3)[1] = (ushort)in[i+1]; - (out+j+3)[2] = (ushort)in[i+2]; + (out+j+3)[1] = (ushort)in[i+0]; + (out+j+3)[2] = (ushort)in[i+1]; } } static void translate_polygon_ubyte2ushort_last2first( @@ -1717,11 +1717,11 @@ static void translate_quadstrip_ubyte2ushort_last2last( unsigned i, j; (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)in[i+0]; - (out+j+0)[1] = (ushort)in[i+1]; + (out+j+0)[0] = (ushort)in[i+2]; + (out+j+0)[1] = (ushort)in[i+0]; (out+j+0)[2] = (ushort)in[i+3]; - (out+j+3)[0] = (ushort)in[i+1]; - (out+j+3)[1] = (ushort)in[i+2]; + (out+j+3)[0] = (ushort)in[i+0]; + (out+j+3)[1] = (ushort)in[i+1]; (out+j+3)[2] = (ushort)in[i+3]; } } @@ -1870,11 +1870,11 @@ static void translate_quadstrip_ubyte2uint_first2first( unsigned i, j; (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)in[i+0]; - (out+j+0)[1] = (uint)in[i+1]; + (out+j+0)[0] = (uint)in[i+2]; + (out+j+0)[1] = (uint)in[i+0]; (out+j+0)[2] = (uint)in[i+3]; - (out+j+3)[0] = (uint)in[i+1]; - (out+j+3)[1] = (uint)in[i+2]; + (out+j+3)[0] = (uint)in[i+0]; + (out+j+3)[1] = (uint)in[i+1]; (out+j+3)[2] = (uint)in[i+3]; } } @@ -2023,12 +2023,12 @@ static void translate_quadstrip_ubyte2uint_first2last( unsigned i, j; (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)in[i+1]; + (out+j+0)[0] = (uint)in[i+0]; (out+j+0)[1] = (uint)in[i+3]; - (out+j+0)[2] = (uint)in[i+0]; - (out+j+3)[0] = (uint)in[i+2]; + (out+j+0)[2] = (uint)in[i+2]; + (out+j+3)[0] = (uint)in[i+1]; (out+j+3)[1] = (uint)in[i+3]; - (out+j+3)[2] = (uint)in[i+1]; + (out+j+3)[2] = (uint)in[i+0]; } } static void translate_polygon_ubyte2uint_first2last( @@ -2177,11 +2177,11 @@ static void translate_quadstrip_ubyte2uint_last2first( (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { (out+j+0)[0] = (uint)in[i+3]; - (out+j+0)[1] = (uint)in[i+0]; - (out+j+0)[2] = (uint)in[i+1]; + (out+j+0)[1] = (uint)in[i+2]; + (out+j+0)[2] = (uint)in[i+0]; (out+j+3)[0] = (uint)in[i+3]; - (out+j+3)[1] = (uint)in[i+1]; - (out+j+3)[2] = (uint)in[i+2]; + (out+j+3)[1] = (uint)in[i+0]; + (out+j+3)[2] = (uint)in[i+1]; } } static void translate_polygon_ubyte2uint_last2first( @@ -2329,11 +2329,11 @@ static void translate_quadstrip_ubyte2uint_last2last( unsigned i, j; (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)in[i+0]; - (out+j+0)[1] = (uint)in[i+1]; + (out+j+0)[0] = (uint)in[i+2]; + (out+j+0)[1] = (uint)in[i+0]; (out+j+0)[2] = (uint)in[i+3]; - (out+j+3)[0] = (uint)in[i+1]; - (out+j+3)[1] = (uint)in[i+2]; + (out+j+3)[0] = (uint)in[i+0]; + (out+j+3)[1] = (uint)in[i+1]; (out+j+3)[2] = (uint)in[i+3]; } } @@ -2482,11 +2482,11 @@ static void translate_quadstrip_ushort2ushort_first2first( unsigned i, j; (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)in[i+0]; - (out+j+0)[1] = (ushort)in[i+1]; + (out+j+0)[0] = (ushort)in[i+2]; + (out+j+0)[1] = (ushort)in[i+0]; (out+j+0)[2] = (ushort)in[i+3]; - (out+j+3)[0] = (ushort)in[i+1]; - (out+j+3)[1] = (ushort)in[i+2]; + (out+j+3)[0] = (ushort)in[i+0]; + (out+j+3)[1] = (ushort)in[i+1]; (out+j+3)[2] = (ushort)in[i+3]; } } @@ -2635,12 +2635,12 @@ static void translate_quadstrip_ushort2ushort_first2last( unsigned i, j; (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)in[i+1]; + (out+j+0)[0] = (ushort)in[i+0]; (out+j+0)[1] = (ushort)in[i+3]; - (out+j+0)[2] = (ushort)in[i+0]; - (out+j+3)[0] = (ushort)in[i+2]; + (out+j+0)[2] = (ushort)in[i+2]; + (out+j+3)[0] = (ushort)in[i+1]; (out+j+3)[1] = (ushort)in[i+3]; - (out+j+3)[2] = (ushort)in[i+1]; + (out+j+3)[2] = (ushort)in[i+0]; } } static void translate_polygon_ushort2ushort_first2last( @@ -2789,11 +2789,11 @@ static void translate_quadstrip_ushort2ushort_last2first( (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { (out+j+0)[0] = (ushort)in[i+3]; - (out+j+0)[1] = (ushort)in[i+0]; - (out+j+0)[2] = (ushort)in[i+1]; + (out+j+0)[1] = (ushort)in[i+2]; + (out+j+0)[2] = (ushort)in[i+0]; (out+j+3)[0] = (ushort)in[i+3]; - (out+j+3)[1] = (ushort)in[i+1]; - (out+j+3)[2] = (ushort)in[i+2]; + (out+j+3)[1] = (ushort)in[i+0]; + (out+j+3)[2] = (ushort)in[i+1]; } } static void translate_polygon_ushort2ushort_last2first( @@ -2941,11 +2941,11 @@ static void translate_quadstrip_ushort2ushort_last2last( unsigned i, j; (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)in[i+0]; - (out+j+0)[1] = (ushort)in[i+1]; + (out+j+0)[0] = (ushort)in[i+2]; + (out+j+0)[1] = (ushort)in[i+0]; (out+j+0)[2] = (ushort)in[i+3]; - (out+j+3)[0] = (ushort)in[i+1]; - (out+j+3)[1] = (ushort)in[i+2]; + (out+j+3)[0] = (ushort)in[i+0]; + (out+j+3)[1] = (ushort)in[i+1]; (out+j+3)[2] = (ushort)in[i+3]; } } @@ -3094,11 +3094,11 @@ static void translate_quadstrip_ushort2uint_first2first( unsigned i, j; (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)in[i+0]; - (out+j+0)[1] = (uint)in[i+1]; + (out+j+0)[0] = (uint)in[i+2]; + (out+j+0)[1] = (uint)in[i+0]; (out+j+0)[2] = (uint)in[i+3]; - (out+j+3)[0] = (uint)in[i+1]; - (out+j+3)[1] = (uint)in[i+2]; + (out+j+3)[0] = (uint)in[i+0]; + (out+j+3)[1] = (uint)in[i+1]; (out+j+3)[2] = (uint)in[i+3]; } } @@ -3247,12 +3247,12 @@ static void translate_quadstrip_ushort2uint_first2last( unsigned i, j; (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)in[i+1]; + (out+j+0)[0] = (uint)in[i+0]; (out+j+0)[1] = (uint)in[i+3]; - (out+j+0)[2] = (uint)in[i+0]; - (out+j+3)[0] = (uint)in[i+2]; + (out+j+0)[2] = (uint)in[i+2]; + (out+j+3)[0] = (uint)in[i+1]; (out+j+3)[1] = (uint)in[i+3]; - (out+j+3)[2] = (uint)in[i+1]; + (out+j+3)[2] = (uint)in[i+0]; } } static void translate_polygon_ushort2uint_first2last( @@ -3401,11 +3401,11 @@ static void translate_quadstrip_ushort2uint_last2first( (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { (out+j+0)[0] = (uint)in[i+3]; - (out+j+0)[1] = (uint)in[i+0]; - (out+j+0)[2] = (uint)in[i+1]; + (out+j+0)[1] = (uint)in[i+2]; + (out+j+0)[2] = (uint)in[i+0]; (out+j+3)[0] = (uint)in[i+3]; - (out+j+3)[1] = (uint)in[i+1]; - (out+j+3)[2] = (uint)in[i+2]; + (out+j+3)[1] = (uint)in[i+0]; + (out+j+3)[2] = (uint)in[i+1]; } } static void translate_polygon_ushort2uint_last2first( @@ -3553,11 +3553,11 @@ static void translate_quadstrip_ushort2uint_last2last( unsigned i, j; (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)in[i+0]; - (out+j+0)[1] = (uint)in[i+1]; + (out+j+0)[0] = (uint)in[i+2]; + (out+j+0)[1] = (uint)in[i+0]; (out+j+0)[2] = (uint)in[i+3]; - (out+j+3)[0] = (uint)in[i+1]; - (out+j+3)[1] = (uint)in[i+2]; + (out+j+3)[0] = (uint)in[i+0]; + (out+j+3)[1] = (uint)in[i+1]; (out+j+3)[2] = (uint)in[i+3]; } } @@ -3706,11 +3706,11 @@ static void translate_quadstrip_uint2ushort_first2first( unsigned i, j; (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)in[i+0]; - (out+j+0)[1] = (ushort)in[i+1]; + (out+j+0)[0] = (ushort)in[i+2]; + (out+j+0)[1] = (ushort)in[i+0]; (out+j+0)[2] = (ushort)in[i+3]; - (out+j+3)[0] = (ushort)in[i+1]; - (out+j+3)[1] = (ushort)in[i+2]; + (out+j+3)[0] = (ushort)in[i+0]; + (out+j+3)[1] = (ushort)in[i+1]; (out+j+3)[2] = (ushort)in[i+3]; } } @@ -3859,12 +3859,12 @@ static void translate_quadstrip_uint2ushort_first2last( unsigned i, j; (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)in[i+1]; + (out+j+0)[0] = (ushort)in[i+0]; (out+j+0)[1] = (ushort)in[i+3]; - (out+j+0)[2] = (ushort)in[i+0]; - (out+j+3)[0] = (ushort)in[i+2]; + (out+j+0)[2] = (ushort)in[i+2]; + (out+j+3)[0] = (ushort)in[i+1]; (out+j+3)[1] = (ushort)in[i+3]; - (out+j+3)[2] = (ushort)in[i+1]; + (out+j+3)[2] = (ushort)in[i+0]; } } static void translate_polygon_uint2ushort_first2last( @@ -4013,11 +4013,11 @@ static void translate_quadstrip_uint2ushort_last2first( (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { (out+j+0)[0] = (ushort)in[i+3]; - (out+j+0)[1] = (ushort)in[i+0]; - (out+j+0)[2] = (ushort)in[i+1]; + (out+j+0)[1] = (ushort)in[i+2]; + (out+j+0)[2] = (ushort)in[i+0]; (out+j+3)[0] = (ushort)in[i+3]; - (out+j+3)[1] = (ushort)in[i+1]; - (out+j+3)[2] = (ushort)in[i+2]; + (out+j+3)[1] = (ushort)in[i+0]; + (out+j+3)[2] = (ushort)in[i+1]; } } static void translate_polygon_uint2ushort_last2first( @@ -4165,11 +4165,11 @@ static void translate_quadstrip_uint2ushort_last2last( unsigned i, j; (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)in[i+0]; - (out+j+0)[1] = (ushort)in[i+1]; + (out+j+0)[0] = (ushort)in[i+2]; + (out+j+0)[1] = (ushort)in[i+0]; (out+j+0)[2] = (ushort)in[i+3]; - (out+j+3)[0] = (ushort)in[i+1]; - (out+j+3)[1] = (ushort)in[i+2]; + (out+j+3)[0] = (ushort)in[i+0]; + (out+j+3)[1] = (ushort)in[i+1]; (out+j+3)[2] = (ushort)in[i+3]; } } @@ -4318,11 +4318,11 @@ static void translate_quadstrip_uint2uint_first2first( unsigned i, j; (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)in[i+0]; - (out+j+0)[1] = (uint)in[i+1]; + (out+j+0)[0] = (uint)in[i+2]; + (out+j+0)[1] = (uint)in[i+0]; (out+j+0)[2] = (uint)in[i+3]; - (out+j+3)[0] = (uint)in[i+1]; - (out+j+3)[1] = (uint)in[i+2]; + (out+j+3)[0] = (uint)in[i+0]; + (out+j+3)[1] = (uint)in[i+1]; (out+j+3)[2] = (uint)in[i+3]; } } @@ -4471,12 +4471,12 @@ static void translate_quadstrip_uint2uint_first2last( unsigned i, j; (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)in[i+1]; + (out+j+0)[0] = (uint)in[i+0]; (out+j+0)[1] = (uint)in[i+3]; - (out+j+0)[2] = (uint)in[i+0]; - (out+j+3)[0] = (uint)in[i+2]; + (out+j+0)[2] = (uint)in[i+2]; + (out+j+3)[0] = (uint)in[i+1]; (out+j+3)[1] = (uint)in[i+3]; - (out+j+3)[2] = (uint)in[i+1]; + (out+j+3)[2] = (uint)in[i+0]; } } static void translate_polygon_uint2uint_first2last( @@ -4625,11 +4625,11 @@ static void translate_quadstrip_uint2uint_last2first( (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { (out+j+0)[0] = (uint)in[i+3]; - (out+j+0)[1] = (uint)in[i+0]; - (out+j+0)[2] = (uint)in[i+1]; + (out+j+0)[1] = (uint)in[i+2]; + (out+j+0)[2] = (uint)in[i+0]; (out+j+3)[0] = (uint)in[i+3]; - (out+j+3)[1] = (uint)in[i+1]; - (out+j+3)[2] = (uint)in[i+2]; + (out+j+3)[1] = (uint)in[i+0]; + (out+j+3)[2] = (uint)in[i+1]; } } static void translate_polygon_uint2uint_last2first( @@ -4777,11 +4777,11 @@ static void translate_quadstrip_uint2uint_last2last( unsigned i, j; (void)j; for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)in[i+0]; - (out+j+0)[1] = (uint)in[i+1]; + (out+j+0)[0] = (uint)in[i+2]; + (out+j+0)[1] = (uint)in[i+0]; (out+j+0)[2] = (uint)in[i+3]; - (out+j+3)[0] = (uint)in[i+1]; - (out+j+3)[1] = (uint)in[i+2]; + (out+j+3)[0] = (uint)in[i+0]; + (out+j+3)[1] = (uint)in[i+1]; (out+j+3)[2] = (uint)in[i+3]; } } diff --git a/src/gallium/auxiliary/indices/u_indices_gen.py b/src/gallium/auxiliary/indices/u_indices_gen.py index 397eea306b..40b047bb58 100644 --- a/src/gallium/auxiliary/indices/u_indices_gen.py +++ b/src/gallium/auxiliary/indices/u_indices_gen.py @@ -139,6 +139,9 @@ def do_tri( intype, outtype, ptr, v0, v1, v2, inpv, outpv ): else: tri( intype, outtype, ptr, v2, v0, v1 ) +def do_quad( intype, outtype, ptr, v0, v1, v2, v3, inpv, outpv ): + do_tri( intype, outtype, ptr+'+0', v0, v1, v3, inpv, outpv ); + do_tri( intype, outtype, ptr+'+3', v1, v2, v3, inpv, outpv ); def name(intype, outtype, inpv, outpv, prim): if intype == GENERATE: @@ -234,8 +237,7 @@ def polygon(intype, outtype, inpv, outpv): def quads(intype, outtype, inpv, outpv): preamble(intype, outtype, inpv, outpv, prim='quads') print ' for (j = i = 0; j < nr; j+=6, i+=4) { ' - do_tri( intype, outtype, 'out+j+0', 'i+0', 'i+1', 'i+3', inpv, outpv ); - do_tri( intype, outtype, 'out+j+3', 'i+1', 'i+2', 'i+3', inpv, outpv ); + do_quad( intype, outtype, 'out+j', 'i+0', 'i+1', 'i+2', 'i+3', inpv, outpv ); print ' }' postamble() @@ -243,8 +245,7 @@ def quads(intype, outtype, inpv, outpv): def quadstrip(intype, outtype, inpv, outpv): preamble(intype, outtype, inpv, outpv, prim='quadstrip') print ' for (j = i = 0; j < nr; j+=6, i+=2) { ' - do_tri( intype, outtype, 'out+j+0', 'i+0', 'i+1', 'i+3', inpv, outpv ); - do_tri( intype, outtype, 'out+j+3', 'i+1', 'i+2', 'i+3', inpv, outpv ); + do_quad( intype, outtype, 'out+j', 'i+2', 'i+0', 'i+1', 'i+3', inpv, outpv ); print ' }' postamble() -- cgit v1.2.3 From 123299546fccc0814d08c6258ed9e64a356f7607 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Mon, 9 Feb 2009 18:11:05 +0000 Subject: indices: Fix typo. --- src/gallium/auxiliary/indices/u_indices_gen.c | 480 ++++++++++++------------- src/gallium/auxiliary/indices/u_indices_gen.py | 2 +- 2 files changed, 241 insertions(+), 241 deletions(-) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/indices/u_indices_gen.c b/src/gallium/auxiliary/indices/u_indices_gen.c index 01953c3244..4c05b3eedb 100644 --- a/src/gallium/auxiliary/indices/u_indices_gen.c +++ b/src/gallium/auxiliary/indices/u_indices_gen.c @@ -1133,7 +1133,7 @@ static void translate_points_ubyte2ushort_first2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1146,7 +1146,7 @@ static void translate_lines_ubyte2ushort_first2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1160,7 +1160,7 @@ static void translate_linestrip_ubyte2ushort_first2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1174,7 +1174,7 @@ static void translate_lineloop_ubyte2ushort_first2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1190,7 +1190,7 @@ static void translate_tris_ubyte2ushort_first2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1205,7 +1205,7 @@ static void translate_tristrip_ubyte2ushort_first2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1220,7 +1220,7 @@ static void translate_trifan_ubyte2ushort_first2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1235,7 +1235,7 @@ static void translate_quads_ubyte2ushort_first2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1253,7 +1253,7 @@ static void translate_quadstrip_ubyte2ushort_first2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1271,7 +1271,7 @@ static void translate_polygon_ubyte2ushort_first2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1286,7 +1286,7 @@ static void translate_points_ubyte2ushort_first2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1299,7 +1299,7 @@ static void translate_lines_ubyte2ushort_first2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1313,7 +1313,7 @@ static void translate_linestrip_ubyte2ushort_first2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1327,7 +1327,7 @@ static void translate_lineloop_ubyte2ushort_first2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1343,7 +1343,7 @@ static void translate_tris_ubyte2ushort_first2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1358,7 +1358,7 @@ static void translate_tristrip_ubyte2ushort_first2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1373,7 +1373,7 @@ static void translate_trifan_ubyte2ushort_first2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1388,7 +1388,7 @@ static void translate_quads_ubyte2ushort_first2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1406,7 +1406,7 @@ static void translate_quadstrip_ubyte2ushort_first2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1424,7 +1424,7 @@ static void translate_polygon_ubyte2ushort_first2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1439,7 +1439,7 @@ static void translate_points_ubyte2ushort_last2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1452,7 +1452,7 @@ static void translate_lines_ubyte2ushort_last2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1466,7 +1466,7 @@ static void translate_linestrip_ubyte2ushort_last2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1480,7 +1480,7 @@ static void translate_lineloop_ubyte2ushort_last2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1496,7 +1496,7 @@ static void translate_tris_ubyte2ushort_last2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1511,7 +1511,7 @@ static void translate_tristrip_ubyte2ushort_last2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1526,7 +1526,7 @@ static void translate_trifan_ubyte2ushort_last2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1541,7 +1541,7 @@ static void translate_quads_ubyte2ushort_last2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1559,7 +1559,7 @@ static void translate_quadstrip_ubyte2ushort_last2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1577,7 +1577,7 @@ static void translate_polygon_ubyte2ushort_last2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1592,7 +1592,7 @@ static void translate_points_ubyte2ushort_last2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1605,7 +1605,7 @@ static void translate_lines_ubyte2ushort_last2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1619,7 +1619,7 @@ static void translate_linestrip_ubyte2ushort_last2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1633,7 +1633,7 @@ static void translate_lineloop_ubyte2ushort_last2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1649,7 +1649,7 @@ static void translate_tris_ubyte2ushort_last2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1664,7 +1664,7 @@ static void translate_tristrip_ubyte2ushort_last2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1679,7 +1679,7 @@ static void translate_trifan_ubyte2ushort_last2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1694,7 +1694,7 @@ static void translate_quads_ubyte2ushort_last2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1712,7 +1712,7 @@ static void translate_quadstrip_ubyte2ushort_last2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1730,7 +1730,7 @@ static void translate_polygon_ubyte2ushort_last2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -1745,7 +1745,7 @@ static void translate_points_ubyte2uint_first2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -1758,7 +1758,7 @@ static void translate_lines_ubyte2uint_first2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -1772,7 +1772,7 @@ static void translate_linestrip_ubyte2uint_first2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -1786,7 +1786,7 @@ static void translate_lineloop_ubyte2uint_first2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -1802,7 +1802,7 @@ static void translate_tris_ubyte2uint_first2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -1817,7 +1817,7 @@ static void translate_tristrip_ubyte2uint_first2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -1832,7 +1832,7 @@ static void translate_trifan_ubyte2uint_first2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -1847,7 +1847,7 @@ static void translate_quads_ubyte2uint_first2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -1865,7 +1865,7 @@ static void translate_quadstrip_ubyte2uint_first2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -1883,7 +1883,7 @@ static void translate_polygon_ubyte2uint_first2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -1898,7 +1898,7 @@ static void translate_points_ubyte2uint_first2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -1911,7 +1911,7 @@ static void translate_lines_ubyte2uint_first2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -1925,7 +1925,7 @@ static void translate_linestrip_ubyte2uint_first2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -1939,7 +1939,7 @@ static void translate_lineloop_ubyte2uint_first2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -1955,7 +1955,7 @@ static void translate_tris_ubyte2uint_first2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -1970,7 +1970,7 @@ static void translate_tristrip_ubyte2uint_first2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -1985,7 +1985,7 @@ static void translate_trifan_ubyte2uint_first2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2000,7 +2000,7 @@ static void translate_quads_ubyte2uint_first2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2018,7 +2018,7 @@ static void translate_quadstrip_ubyte2uint_first2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2036,7 +2036,7 @@ static void translate_polygon_ubyte2uint_first2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2051,7 +2051,7 @@ static void translate_points_ubyte2uint_last2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2064,7 +2064,7 @@ static void translate_lines_ubyte2uint_last2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2078,7 +2078,7 @@ static void translate_linestrip_ubyte2uint_last2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2092,7 +2092,7 @@ static void translate_lineloop_ubyte2uint_last2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2108,7 +2108,7 @@ static void translate_tris_ubyte2uint_last2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2123,7 +2123,7 @@ static void translate_tristrip_ubyte2uint_last2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2138,7 +2138,7 @@ static void translate_trifan_ubyte2uint_last2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2153,7 +2153,7 @@ static void translate_quads_ubyte2uint_last2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2171,7 +2171,7 @@ static void translate_quadstrip_ubyte2uint_last2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2189,7 +2189,7 @@ static void translate_polygon_ubyte2uint_last2first( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2204,7 +2204,7 @@ static void translate_points_ubyte2uint_last2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2217,7 +2217,7 @@ static void translate_lines_ubyte2uint_last2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2231,7 +2231,7 @@ static void translate_linestrip_ubyte2uint_last2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2245,7 +2245,7 @@ static void translate_lineloop_ubyte2uint_last2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2261,7 +2261,7 @@ static void translate_tris_ubyte2uint_last2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2276,7 +2276,7 @@ static void translate_tristrip_ubyte2uint_last2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2291,7 +2291,7 @@ static void translate_trifan_ubyte2uint_last2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2306,7 +2306,7 @@ static void translate_quads_ubyte2uint_last2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2324,7 +2324,7 @@ static void translate_quadstrip_ubyte2uint_last2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2342,7 +2342,7 @@ static void translate_polygon_ubyte2uint_last2last( unsigned nr, void *_out ) { - const ubyte*in = (const ubyte*)in; + const ubyte*in = (const ubyte*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2357,7 +2357,7 @@ static void translate_points_ushort2ushort_first2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2370,7 +2370,7 @@ static void translate_lines_ushort2ushort_first2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2384,7 +2384,7 @@ static void translate_linestrip_ushort2ushort_first2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2398,7 +2398,7 @@ static void translate_lineloop_ushort2ushort_first2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2414,7 +2414,7 @@ static void translate_tris_ushort2ushort_first2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2429,7 +2429,7 @@ static void translate_tristrip_ushort2ushort_first2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2444,7 +2444,7 @@ static void translate_trifan_ushort2ushort_first2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2459,7 +2459,7 @@ static void translate_quads_ushort2ushort_first2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2477,7 +2477,7 @@ static void translate_quadstrip_ushort2ushort_first2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2495,7 +2495,7 @@ static void translate_polygon_ushort2ushort_first2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2510,7 +2510,7 @@ static void translate_points_ushort2ushort_first2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2523,7 +2523,7 @@ static void translate_lines_ushort2ushort_first2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2537,7 +2537,7 @@ static void translate_linestrip_ushort2ushort_first2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2551,7 +2551,7 @@ static void translate_lineloop_ushort2ushort_first2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2567,7 +2567,7 @@ static void translate_tris_ushort2ushort_first2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2582,7 +2582,7 @@ static void translate_tristrip_ushort2ushort_first2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2597,7 +2597,7 @@ static void translate_trifan_ushort2ushort_first2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2612,7 +2612,7 @@ static void translate_quads_ushort2ushort_first2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2630,7 +2630,7 @@ static void translate_quadstrip_ushort2ushort_first2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2648,7 +2648,7 @@ static void translate_polygon_ushort2ushort_first2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2663,7 +2663,7 @@ static void translate_points_ushort2ushort_last2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2676,7 +2676,7 @@ static void translate_lines_ushort2ushort_last2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2690,7 +2690,7 @@ static void translate_linestrip_ushort2ushort_last2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2704,7 +2704,7 @@ static void translate_lineloop_ushort2ushort_last2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2720,7 +2720,7 @@ static void translate_tris_ushort2ushort_last2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2735,7 +2735,7 @@ static void translate_tristrip_ushort2ushort_last2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2750,7 +2750,7 @@ static void translate_trifan_ushort2ushort_last2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2765,7 +2765,7 @@ static void translate_quads_ushort2ushort_last2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2783,7 +2783,7 @@ static void translate_quadstrip_ushort2ushort_last2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2801,7 +2801,7 @@ static void translate_polygon_ushort2ushort_last2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2816,7 +2816,7 @@ static void translate_points_ushort2ushort_last2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2829,7 +2829,7 @@ static void translate_lines_ushort2ushort_last2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2843,7 +2843,7 @@ static void translate_linestrip_ushort2ushort_last2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2857,7 +2857,7 @@ static void translate_lineloop_ushort2ushort_last2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2873,7 +2873,7 @@ static void translate_tris_ushort2ushort_last2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2888,7 +2888,7 @@ static void translate_tristrip_ushort2ushort_last2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2903,7 +2903,7 @@ static void translate_trifan_ushort2ushort_last2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2918,7 +2918,7 @@ static void translate_quads_ushort2ushort_last2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2936,7 +2936,7 @@ static void translate_quadstrip_ushort2ushort_last2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2954,7 +2954,7 @@ static void translate_polygon_ushort2ushort_last2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -2969,7 +2969,7 @@ static void translate_points_ushort2uint_first2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2982,7 +2982,7 @@ static void translate_lines_ushort2uint_first2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -2996,7 +2996,7 @@ static void translate_linestrip_ushort2uint_first2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3010,7 +3010,7 @@ static void translate_lineloop_ushort2uint_first2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3026,7 +3026,7 @@ static void translate_tris_ushort2uint_first2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3041,7 +3041,7 @@ static void translate_tristrip_ushort2uint_first2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3056,7 +3056,7 @@ static void translate_trifan_ushort2uint_first2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3071,7 +3071,7 @@ static void translate_quads_ushort2uint_first2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3089,7 +3089,7 @@ static void translate_quadstrip_ushort2uint_first2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3107,7 +3107,7 @@ static void translate_polygon_ushort2uint_first2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3122,7 +3122,7 @@ static void translate_points_ushort2uint_first2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3135,7 +3135,7 @@ static void translate_lines_ushort2uint_first2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3149,7 +3149,7 @@ static void translate_linestrip_ushort2uint_first2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3163,7 +3163,7 @@ static void translate_lineloop_ushort2uint_first2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3179,7 +3179,7 @@ static void translate_tris_ushort2uint_first2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3194,7 +3194,7 @@ static void translate_tristrip_ushort2uint_first2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3209,7 +3209,7 @@ static void translate_trifan_ushort2uint_first2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3224,7 +3224,7 @@ static void translate_quads_ushort2uint_first2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3242,7 +3242,7 @@ static void translate_quadstrip_ushort2uint_first2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3260,7 +3260,7 @@ static void translate_polygon_ushort2uint_first2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3275,7 +3275,7 @@ static void translate_points_ushort2uint_last2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3288,7 +3288,7 @@ static void translate_lines_ushort2uint_last2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3302,7 +3302,7 @@ static void translate_linestrip_ushort2uint_last2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3316,7 +3316,7 @@ static void translate_lineloop_ushort2uint_last2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3332,7 +3332,7 @@ static void translate_tris_ushort2uint_last2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3347,7 +3347,7 @@ static void translate_tristrip_ushort2uint_last2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3362,7 +3362,7 @@ static void translate_trifan_ushort2uint_last2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3377,7 +3377,7 @@ static void translate_quads_ushort2uint_last2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3395,7 +3395,7 @@ static void translate_quadstrip_ushort2uint_last2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3413,7 +3413,7 @@ static void translate_polygon_ushort2uint_last2first( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3428,7 +3428,7 @@ static void translate_points_ushort2uint_last2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3441,7 +3441,7 @@ static void translate_lines_ushort2uint_last2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3455,7 +3455,7 @@ static void translate_linestrip_ushort2uint_last2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3469,7 +3469,7 @@ static void translate_lineloop_ushort2uint_last2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3485,7 +3485,7 @@ static void translate_tris_ushort2uint_last2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3500,7 +3500,7 @@ static void translate_tristrip_ushort2uint_last2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3515,7 +3515,7 @@ static void translate_trifan_ushort2uint_last2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3530,7 +3530,7 @@ static void translate_quads_ushort2uint_last2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3548,7 +3548,7 @@ static void translate_quadstrip_ushort2uint_last2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3566,7 +3566,7 @@ static void translate_polygon_ushort2uint_last2last( unsigned nr, void *_out ) { - const ushort*in = (const ushort*)in; + const ushort*in = (const ushort*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -3581,7 +3581,7 @@ static void translate_points_uint2ushort_first2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3594,7 +3594,7 @@ static void translate_lines_uint2ushort_first2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3608,7 +3608,7 @@ static void translate_linestrip_uint2ushort_first2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3622,7 +3622,7 @@ static void translate_lineloop_uint2ushort_first2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3638,7 +3638,7 @@ static void translate_tris_uint2ushort_first2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3653,7 +3653,7 @@ static void translate_tristrip_uint2ushort_first2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3668,7 +3668,7 @@ static void translate_trifan_uint2ushort_first2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3683,7 +3683,7 @@ static void translate_quads_uint2ushort_first2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3701,7 +3701,7 @@ static void translate_quadstrip_uint2ushort_first2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3719,7 +3719,7 @@ static void translate_polygon_uint2ushort_first2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3734,7 +3734,7 @@ static void translate_points_uint2ushort_first2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3747,7 +3747,7 @@ static void translate_lines_uint2ushort_first2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3761,7 +3761,7 @@ static void translate_linestrip_uint2ushort_first2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3775,7 +3775,7 @@ static void translate_lineloop_uint2ushort_first2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3791,7 +3791,7 @@ static void translate_tris_uint2ushort_first2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3806,7 +3806,7 @@ static void translate_tristrip_uint2ushort_first2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3821,7 +3821,7 @@ static void translate_trifan_uint2ushort_first2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3836,7 +3836,7 @@ static void translate_quads_uint2ushort_first2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3854,7 +3854,7 @@ static void translate_quadstrip_uint2ushort_first2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3872,7 +3872,7 @@ static void translate_polygon_uint2ushort_first2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3887,7 +3887,7 @@ static void translate_points_uint2ushort_last2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3900,7 +3900,7 @@ static void translate_lines_uint2ushort_last2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3914,7 +3914,7 @@ static void translate_linestrip_uint2ushort_last2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3928,7 +3928,7 @@ static void translate_lineloop_uint2ushort_last2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3944,7 +3944,7 @@ static void translate_tris_uint2ushort_last2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3959,7 +3959,7 @@ static void translate_tristrip_uint2ushort_last2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3974,7 +3974,7 @@ static void translate_trifan_uint2ushort_last2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -3989,7 +3989,7 @@ static void translate_quads_uint2ushort_last2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -4007,7 +4007,7 @@ static void translate_quadstrip_uint2ushort_last2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -4025,7 +4025,7 @@ static void translate_polygon_uint2ushort_last2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -4040,7 +4040,7 @@ static void translate_points_uint2ushort_last2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -4053,7 +4053,7 @@ static void translate_lines_uint2ushort_last2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -4067,7 +4067,7 @@ static void translate_linestrip_uint2ushort_last2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -4081,7 +4081,7 @@ static void translate_lineloop_uint2ushort_last2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -4097,7 +4097,7 @@ static void translate_tris_uint2ushort_last2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -4112,7 +4112,7 @@ static void translate_tristrip_uint2ushort_last2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -4127,7 +4127,7 @@ static void translate_trifan_uint2ushort_last2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -4142,7 +4142,7 @@ static void translate_quads_uint2ushort_last2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -4160,7 +4160,7 @@ static void translate_quadstrip_uint2ushort_last2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -4178,7 +4178,7 @@ static void translate_polygon_uint2ushort_last2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; ushort *out = (ushort*)_out; unsigned i, j; (void)j; @@ -4193,7 +4193,7 @@ static void translate_points_uint2uint_first2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4206,7 +4206,7 @@ static void translate_lines_uint2uint_first2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4220,7 +4220,7 @@ static void translate_linestrip_uint2uint_first2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4234,7 +4234,7 @@ static void translate_lineloop_uint2uint_first2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4250,7 +4250,7 @@ static void translate_tris_uint2uint_first2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4265,7 +4265,7 @@ static void translate_tristrip_uint2uint_first2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4280,7 +4280,7 @@ static void translate_trifan_uint2uint_first2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4295,7 +4295,7 @@ static void translate_quads_uint2uint_first2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4313,7 +4313,7 @@ static void translate_quadstrip_uint2uint_first2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4331,7 +4331,7 @@ static void translate_polygon_uint2uint_first2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4346,7 +4346,7 @@ static void translate_points_uint2uint_first2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4359,7 +4359,7 @@ static void translate_lines_uint2uint_first2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4373,7 +4373,7 @@ static void translate_linestrip_uint2uint_first2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4387,7 +4387,7 @@ static void translate_lineloop_uint2uint_first2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4403,7 +4403,7 @@ static void translate_tris_uint2uint_first2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4418,7 +4418,7 @@ static void translate_tristrip_uint2uint_first2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4433,7 +4433,7 @@ static void translate_trifan_uint2uint_first2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4448,7 +4448,7 @@ static void translate_quads_uint2uint_first2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4466,7 +4466,7 @@ static void translate_quadstrip_uint2uint_first2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4484,7 +4484,7 @@ static void translate_polygon_uint2uint_first2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4499,7 +4499,7 @@ static void translate_points_uint2uint_last2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4512,7 +4512,7 @@ static void translate_lines_uint2uint_last2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4526,7 +4526,7 @@ static void translate_linestrip_uint2uint_last2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4540,7 +4540,7 @@ static void translate_lineloop_uint2uint_last2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4556,7 +4556,7 @@ static void translate_tris_uint2uint_last2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4571,7 +4571,7 @@ static void translate_tristrip_uint2uint_last2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4586,7 +4586,7 @@ static void translate_trifan_uint2uint_last2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4601,7 +4601,7 @@ static void translate_quads_uint2uint_last2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4619,7 +4619,7 @@ static void translate_quadstrip_uint2uint_last2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4637,7 +4637,7 @@ static void translate_polygon_uint2uint_last2first( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4652,7 +4652,7 @@ static void translate_points_uint2uint_last2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4665,7 +4665,7 @@ static void translate_lines_uint2uint_last2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4679,7 +4679,7 @@ static void translate_linestrip_uint2uint_last2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4693,7 +4693,7 @@ static void translate_lineloop_uint2uint_last2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4709,7 +4709,7 @@ static void translate_tris_uint2uint_last2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4724,7 +4724,7 @@ static void translate_tristrip_uint2uint_last2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4739,7 +4739,7 @@ static void translate_trifan_uint2uint_last2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4754,7 +4754,7 @@ static void translate_quads_uint2uint_last2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4772,7 +4772,7 @@ static void translate_quadstrip_uint2uint_last2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; @@ -4790,7 +4790,7 @@ static void translate_polygon_uint2uint_last2last( unsigned nr, void *_out ) { - const uint*in = (const uint*)in; + const uint*in = (const uint*)_in; uint *out = (uint*)_out; unsigned i, j; (void)j; diff --git a/src/gallium/auxiliary/indices/u_indices_gen.py b/src/gallium/auxiliary/indices/u_indices_gen.py index 40b047bb58..0dc58d0cd0 100644 --- a/src/gallium/auxiliary/indices/u_indices_gen.py +++ b/src/gallium/auxiliary/indices/u_indices_gen.py @@ -157,7 +157,7 @@ def preamble(intype, outtype, inpv, outpv, prim): print ' void *_out )' print '{' if intype != GENERATE: - print ' const ' + intype + '*in = (const ' + intype + '*)in;' + print ' const ' + intype + '*in = (const ' + intype + '*)_in;' print ' ' + outtype + ' *out = (' + outtype + '*)_out;' print ' unsigned i, j;' print ' (void)j;' -- cgit v1.2.3 From 5ecd0b0890fd48656e46c017830a9f5d6b906aae Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Tue, 10 Feb 2009 15:14:31 +0100 Subject: tgsi: Fix build -- rename Size to NrTokens. --- src/gallium/auxiliary/tgsi/tgsi_build.c | 20 ++++++++++---------- src/gallium/auxiliary/tgsi/tgsi_dump.c | 4 ++-- src/gallium/auxiliary/tgsi/tgsi_dump_c.c | 4 ++-- src/gallium/auxiliary/tgsi/tgsi_exec.c | 2 +- src/gallium/auxiliary/tgsi/tgsi_parse.c | 4 ++-- src/gallium/auxiliary/tgsi/tgsi_ppc.c | 2 +- src/gallium/auxiliary/tgsi/tgsi_sse2.c | 2 +- src/gallium/auxiliary/tgsi/tgsi_text.c | 2 +- 8 files changed, 20 insertions(+), 20 deletions(-) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliary/tgsi/tgsi_build.c index fd02c2c87c..17886540cf 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_build.c +++ b/src/gallium/auxiliary/tgsi/tgsi_build.c @@ -114,7 +114,7 @@ tgsi_default_declaration( void ) struct tgsi_declaration declaration; declaration.Type = TGSI_TOKEN_TYPE_DECLARATION; - declaration.Size = 1; + declaration.NrTokens = 1; declaration.File = TGSI_FILE_NULL; declaration.UsageMask = TGSI_WRITEMASK_XYZW; declaration.Interpolate = TGSI_INTERPOLATE_CONSTANT; @@ -160,9 +160,9 @@ declaration_grow( struct tgsi_declaration *declaration, struct tgsi_header *header ) { - assert( declaration->Size < 0xFF ); + assert( declaration->NrTokens < 0xFF ); - declaration->Size++; + declaration->NrTokens++; header_bodysize_grow( header ); } @@ -308,7 +308,7 @@ tgsi_default_immediate( void ) struct tgsi_immediate immediate; immediate.Type = TGSI_TOKEN_TYPE_IMMEDIATE; - immediate.Size = 1; + immediate.NrTokens = 1; immediate.DataType = TGSI_IMM_FLOAT32; immediate.Padding = 0; immediate.Extended = 0; @@ -345,9 +345,9 @@ immediate_grow( struct tgsi_immediate *immediate, struct tgsi_header *header ) { - assert( immediate->Size < 0xFF ); + assert( immediate->NrTokens < 0xFF ); - immediate->Size++; + immediate->NrTokens++; header_bodysize_grow( header ); } @@ -384,7 +384,7 @@ tgsi_build_full_immediate( *immediate = tgsi_build_immediate( header ); - for( i = 0; i < full_imm->Immediate.Size - 1; i++ ) { + for( i = 0; i < full_imm->Immediate.NrTokens - 1; i++ ) { struct tgsi_immediate_float32 *if32; if( maxsize <= size ) @@ -411,7 +411,7 @@ tgsi_default_instruction( void ) struct tgsi_instruction instruction; instruction.Type = TGSI_TOKEN_TYPE_INSTRUCTION; - instruction.Size = 1; + instruction.NrTokens = 1; instruction.Opcode = TGSI_OPCODE_MOV; instruction.Saturate = TGSI_SAT_NONE; instruction.NumDstRegs = 1; @@ -453,9 +453,9 @@ instruction_grow( struct tgsi_instruction *instruction, struct tgsi_header *header ) { - assert (instruction->Size < 0xFF); + assert (instruction->NrTokens < 0xFF); - instruction->Size++; + instruction->NrTokens++; header_bodysize_grow( header ); } diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c index 2ed8c2bf07..ab2b1f2c58 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_dump.c +++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c @@ -285,7 +285,7 @@ iter_immediate( ENM( imm->Immediate.DataType, immediate_type_names ); TXT( " { " ); - for (i = 0; i < imm->Immediate.Size - 1; i++) { + for (i = 0; i < imm->Immediate.NrTokens - 1; i++) { switch (imm->Immediate.DataType) { case TGSI_IMM_FLOAT32: FLT( imm->u.ImmediateFloat32[i].Float ); @@ -294,7 +294,7 @@ iter_immediate( assert( 0 ); } - if (i < imm->Immediate.Size - 2) + if (i < imm->Immediate.NrTokens - 2) TXT( ", " ); } TXT( " }" ); diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump_c.c b/src/gallium/auxiliary/tgsi/tgsi_dump_c.c index c575b6c3e1..2ecf1e2f14 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_dump_c.c +++ b/src/gallium/auxiliary/tgsi/tgsi_dump_c.c @@ -283,7 +283,7 @@ dump_immediate_verbose( UIX( imm->Immediate.Padding ); } - for( i = 0; i < imm->Immediate.Size - 1; i++ ) { + for( i = 0; i < imm->Immediate.NrTokens - 1; i++ ) { EOL(); switch( imm->Immediate.DataType ) { case TGSI_IMM_FLOAT32: @@ -675,7 +675,7 @@ tgsi_dump_c( ENM( parse.FullToken.Token.Type, TGSI_TOKEN_TYPES ); if( ignored ) { TXT( "\nSize : " ); - UID( parse.FullToken.Token.Size ); + UID( parse.FullToken.Token.NrTokens ); if( deflt || parse.FullToken.Token.Extended ) { TXT( "\nExtended : " ); UID( parse.FullToken.Token.Extended ); diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c index a182e679da..ab641efb60 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c @@ -202,7 +202,7 @@ tgsi_exec_machine_bind_shader( case TGSI_TOKEN_TYPE_IMMEDIATE: { - uint size = parse.FullToken.FullImmediate.Immediate.Size - 1; + uint size = parse.FullToken.FullImmediate.Immediate.NrTokens - 1; assert( size % 4 == 0 ); assert( mach->ImmLimit + size / 4 <= TGSI_EXEC_NUM_IMMEDIATES ); diff --git a/src/gallium/auxiliary/tgsi/tgsi_parse.c b/src/gallium/auxiliary/tgsi/tgsi_parse.c index 2cd56e413a..d374b16f9a 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_parse.c +++ b/src/gallium/auxiliary/tgsi/tgsi_parse.c @@ -155,8 +155,8 @@ tgsi_parse_token( switch (imm->Immediate.DataType) { case TGSI_IMM_FLOAT32: imm->u.Pointer = MALLOC( - sizeof( struct tgsi_immediate_float32 ) * (imm->Immediate.Size - 1) ); - for( i = 0; i < imm->Immediate.Size - 1; i++ ) { + sizeof( struct tgsi_immediate_float32 ) * (imm->Immediate.NrTokens - 1) ); + for( i = 0; i < imm->Immediate.NrTokens - 1; i++ ) { next_token( ctx, (struct tgsi_immediate_float32 *) &imm->u.ImmediateFloat32[i] ); } break; diff --git a/src/gallium/auxiliary/tgsi/tgsi_ppc.c b/src/gallium/auxiliary/tgsi/tgsi_ppc.c index 1a4db47501..f365030e52 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_ppc.c +++ b/src/gallium/auxiliary/tgsi/tgsi_ppc.c @@ -1327,7 +1327,7 @@ tgsi_emit_ppc(const struct tgsi_token *tokens, case TGSI_TOKEN_TYPE_IMMEDIATE: /* splat each immediate component into a float[4] vector for SoA */ { - const uint size = parse.FullToken.FullImmediate.Immediate.Size - 1; + const uint size = parse.FullToken.FullImmediate.Immediate.NrTokens - 1; uint i; assert(size <= 4); assert(num_immediates < TGSI_EXEC_NUM_IMMEDIATES); diff --git a/src/gallium/auxiliary/tgsi/tgsi_sse2.c b/src/gallium/auxiliary/tgsi/tgsi_sse2.c index cac44af7f4..481ba89c5e 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_sse2.c +++ b/src/gallium/auxiliary/tgsi/tgsi_sse2.c @@ -2671,7 +2671,7 @@ tgsi_emit_sse2( case TGSI_TOKEN_TYPE_IMMEDIATE: /* simply copy the immediate values into the next immediates[] slot */ { - const uint size = parse.FullToken.FullImmediate.Immediate.Size - 1; + const uint size = parse.FullToken.FullImmediate.Immediate.NrTokens - 1; uint i; assert(size <= 4); assert(num_immediates < TGSI_EXEC_NUM_IMMEDIATES); diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c index 9454563361..1e822fbbea 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_text.c +++ b/src/gallium/auxiliary/tgsi/tgsi_text.c @@ -1023,7 +1023,7 @@ static boolean parse_immediate( struct translate_ctx *ctx ) ctx->cur++; imm = tgsi_default_full_immediate(); - imm.Immediate.Size += 4; + imm.Immediate.NrTokens += 4; imm.Immediate.DataType = TGSI_IMM_FLOAT32; imm.u.Pointer = values; -- cgit v1.2.3 From e3028baff2a313baac4a5aea494532605bb8f37a Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Tue, 10 Feb 2009 15:16:00 +0100 Subject: draw: Fix build -- rename Size to NrTokens. --- src/gallium/auxiliary/draw/draw_pipe_pstipple.c | 2 +- src/gallium/auxiliary/draw/draw_vs_aos.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c index b764d9c518..a0f9716dac 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c +++ b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c @@ -256,7 +256,7 @@ pstip_transform_inst(struct tgsi_transform_context *ctx, struct tgsi_full_immediate immed; uint size = 4; immed = tgsi_default_full_immediate(); - immed.Immediate.Size = 1 + size; /* one for the token itself */ + immed.Immediate.NrTokens = 1 + size; /* one for the token itself */ immed.u.Pointer = (void *) value; ctx->emit_immediate(ctx, &immed); } diff --git a/src/gallium/auxiliary/draw/draw_vs_aos.c b/src/gallium/auxiliary/draw/draw_vs_aos.c index 6817f29c2a..0c693a4a65 100644 --- a/src/gallium/auxiliary/draw/draw_vs_aos.c +++ b/src/gallium/auxiliary/draw/draw_vs_aos.c @@ -1870,7 +1870,7 @@ static boolean note_immediate( struct aos_compilation *cp, unsigned pos = cp->num_immediates++; unsigned j; - for (j = 0; j < imm->Immediate.Size; j++) { + for (j = 0; j < imm->Immediate.NrTokens - 1; j++) { cp->vaos->machine->immediate[pos][j] = imm->u.ImmediateFloat32[j].Float; } -- cgit v1.2.3 From a872b518c9179f7ee639feb4de81c62fbf25f4f6 Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Tue, 10 Feb 2009 15:16:35 +0100 Subject: gallivm: Fix build -- rename Size to NrTokens. --- src/gallium/auxiliary/gallivm/tgsitollvm.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/gallivm/tgsitollvm.cpp b/src/gallium/auxiliary/gallivm/tgsitollvm.cpp index 6b18a68fe6..5b08200d14 100644 --- a/src/gallium/auxiliary/gallivm/tgsitollvm.cpp +++ b/src/gallium/auxiliary/gallivm/tgsitollvm.cpp @@ -160,7 +160,7 @@ translate_immediate(Storage *storage, { float vec[4]; int i; - for (i = 0; i < imm->Immediate.Size - 1; ++i) { + for (i = 0; i < imm->Immediate.NrTokens - 1; ++i) { switch (imm->Immediate.DataType) { case TGSI_IMM_FLOAT32: vec[i] = imm->u.ImmediateFloat32[i].Float; @@ -179,7 +179,7 @@ translate_immediateir(StorageSoa *storage, { float vec[4]; int i; - for (i = 0; i < imm->Immediate.Size - 1; ++i) { + for (i = 0; i < imm->Immediate.NrTokens - 1; ++i) { switch (imm->Immediate.DataType) { case TGSI_IMM_FLOAT32: vec[i] = imm->u.ImmediateFloat32[i].Float; -- cgit v1.2.3 From 00ee308ab3e7da2a2939845e0f0a24b8a0925025 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Tue, 10 Feb 2009 16:18:22 +0000 Subject: pipebuffer: Drop reliance on pipe_winsys. --- .../auxiliary/pipebuffer/pb_buffer_fenced.c | 37 +++++++++++----------- .../auxiliary/pipebuffer/pb_buffer_fenced.h | 32 +++++++++++++++++-- src/gallium/auxiliary/pipebuffer/pb_bufmgr.h | 5 +-- .../auxiliary/pipebuffer/pb_bufmgr_fenced.c | 4 +-- 4 files changed, 54 insertions(+), 24 deletions(-) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c index 61afdfe82a..f9e6226436 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c +++ b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c @@ -44,7 +44,6 @@ #include "pipe/p_compiler.h" #include "pipe/p_error.h" #include "pipe/p_debug.h" -#include "pipe/internal/p_winsys_screen.h" #include "pipe/p_thread.h" #include "util/u_memory.h" #include "util/u_double_list.h" @@ -64,7 +63,7 @@ struct fenced_buffer_list { pipe_mutex mutex; - struct pipe_winsys *winsys; + struct pb_fence_ops *ops; size_t numDelayed; @@ -140,12 +139,12 @@ static INLINE void _fenced_buffer_remove(struct fenced_buffer_list *fenced_list, struct fenced_buffer *fenced_buf) { - struct pipe_winsys *winsys = fenced_list->winsys; + struct pb_fence_ops *ops = fenced_list->ops; assert(fenced_buf->fence); assert(fenced_buf->list == fenced_list); - winsys->fence_reference(winsys, &fenced_buf->fence, NULL); + ops->fence_reference(ops, &fenced_buf->fence, NULL); fenced_buf->flags &= ~PIPE_BUFFER_USAGE_GPU_READ_WRITE; assert(fenced_buf->head.prev); @@ -168,7 +167,7 @@ static INLINE enum pipe_error _fenced_buffer_finish(struct fenced_buffer *fenced_buf) { struct fenced_buffer_list *fenced_list = fenced_buf->list; - struct pipe_winsys *winsys = fenced_list->winsys; + struct pb_fence_ops *ops = fenced_list->ops; #if 0 debug_warning("waiting for GPU"); @@ -176,7 +175,7 @@ _fenced_buffer_finish(struct fenced_buffer *fenced_buf) assert(fenced_buf->fence); if(fenced_buf->fence) { - if(winsys->fence_finish(winsys, fenced_buf->fence, 0) != 0) { + if(ops->fence_finish(ops, fenced_buf->fence, 0) != 0) { return PIPE_ERROR; } /* Remove from the fenced list */ @@ -196,7 +195,7 @@ static void _fenced_buffer_list_check_free(struct fenced_buffer_list *fenced_list, int wait) { - struct pipe_winsys *winsys = fenced_list->winsys; + struct pb_fence_ops *ops = fenced_list->ops; struct list_head *curr, *next; struct fenced_buffer *fenced_buf; struct pipe_fence_handle *prev_fence = NULL; @@ -209,15 +208,15 @@ _fenced_buffer_list_check_free(struct fenced_buffer_list *fenced_list, if(fenced_buf->fence != prev_fence) { int signaled; if (wait) - signaled = winsys->fence_finish(winsys, fenced_buf->fence, 0); + signaled = ops->fence_finish(ops, fenced_buf->fence, 0); else - signaled = winsys->fence_signalled(winsys, fenced_buf->fence, 0); + signaled = ops->fence_signalled(ops, fenced_buf->fence, 0); if (signaled != 0) break; prev_fence = fenced_buf->fence; } else { - assert(winsys->fence_signalled(winsys, fenced_buf->fence, 0) == 0); + assert(ops->fence_signalled(ops, fenced_buf->fence, 0) == 0); } _fenced_buffer_remove(fenced_list, fenced_buf); @@ -237,14 +236,14 @@ fenced_buffer_destroy(struct pb_buffer *buf) pipe_mutex_lock(fenced_list->mutex); assert(fenced_buf->base.base.refcount == 0); if (fenced_buf->fence) { - struct pipe_winsys *winsys = fenced_list->winsys; - if(winsys->fence_signalled(winsys, fenced_buf->fence, 0) == 0) { + struct pb_fence_ops *ops = fenced_list->ops; + if(ops->fence_signalled(ops, fenced_buf->fence, 0) == 0) { struct list_head *curr, *prev; curr = &fenced_buf->head; prev = curr->prev; do { fenced_buf = LIST_ENTRY(struct fenced_buffer, curr, head); - assert(winsys->fence_signalled(winsys, fenced_buf->fence, 0) == 0); + assert(ops->fence_signalled(ops, fenced_buf->fence, 0) == 0); _fenced_buffer_remove(fenced_list, fenced_buf); curr = prev; prev = curr->prev; @@ -366,11 +365,11 @@ fenced_buffer_fence(struct pb_buffer *buf, { struct fenced_buffer *fenced_buf; struct fenced_buffer_list *fenced_list; - struct pipe_winsys *winsys; + struct pb_fence_ops *ops; fenced_buf = fenced_buffer(buf); fenced_list = fenced_buf->list; - winsys = fenced_list->winsys; + ops = fenced_list->ops; if(fence == fenced_buf->fence) { /* Nothing to do */ @@ -384,7 +383,7 @@ fenced_buffer_fence(struct pb_buffer *buf, if (fenced_buf->fence) _fenced_buffer_remove(fenced_list, fenced_buf); if (fence) { - winsys->fence_reference(winsys, &fenced_buf->fence, fence); + ops->fence_reference(ops, &fenced_buf->fence, fence); fenced_buf->flags |= fenced_buf->validation_flags; _fenced_buffer_add(fenced_buf); } @@ -447,7 +446,7 @@ fenced_buffer_create(struct fenced_buffer_list *fenced_list, struct fenced_buffer_list * -fenced_buffer_list_create(struct pipe_winsys *winsys) +fenced_buffer_list_create(struct pb_fence_ops *ops) { struct fenced_buffer_list *fenced_list; @@ -455,7 +454,7 @@ fenced_buffer_list_create(struct pipe_winsys *winsys) if (!fenced_list) return NULL; - fenced_list->winsys = winsys; + fenced_list->ops = ops; LIST_INITHEAD(&fenced_list->delayed); @@ -494,6 +493,8 @@ fenced_buffer_list_destroy(struct fenced_buffer_list *fenced_list) pipe_mutex_unlock(fenced_list->mutex); + fenced_list->ops->destroy(fenced_list->ops); + FREE(fenced_list); } diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.h b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.h index b15c676194..d1c9d4c17d 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.h +++ b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.h @@ -59,7 +59,6 @@ extern "C" { #endif -struct pipe_winsys; struct pipe_buffer; struct pipe_fence_handle; @@ -70,13 +69,42 @@ struct pipe_fence_handle; struct fenced_buffer_list; +struct pb_fence_ops +{ + void (*destroy)( struct pb_fence_ops *ops ); + + /** Set ptr = fence, with reference counting */ + void (*fence_reference)( struct pb_fence_ops *ops, + struct pipe_fence_handle **ptr, + struct pipe_fence_handle *fence ); + + /** + * Checks whether the fence has been signalled. + * \param flags driver-specific meaning + * \return zero on success. + */ + int (*fence_signalled)( struct pb_fence_ops *ops, + struct pipe_fence_handle *fence, + unsigned flag ); + + /** + * Wait for the fence to finish. + * \param flags driver-specific meaning + * \return zero on success. + */ + int (*fence_finish)( struct pb_fence_ops *ops, + struct pipe_fence_handle *fence, + unsigned flag ); +}; + + /** * Create a fenced buffer list. * * See also fenced_bufmgr_create for a more convenient way to use this. */ struct fenced_buffer_list * -fenced_buffer_list_create(struct pipe_winsys *winsys); +fenced_buffer_list_create(struct pb_fence_ops *ops); /** diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h b/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h index 0a8264a924..fec8db91c7 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h @@ -61,7 +61,6 @@ extern "C" { struct pb_desc; struct pipe_buffer; -struct pipe_winsys; /** @@ -163,6 +162,8 @@ pb_cache_manager_create(struct pb_manager *provider, unsigned usecs); +struct pb_fence_ops; + /** * Fenced buffer manager. * @@ -174,7 +175,7 @@ pb_cache_manager_create(struct pb_manager *provider, */ struct pb_manager * fenced_bufmgr_create(struct pb_manager *provider, - struct pipe_winsys *winsys); + struct pb_fence_ops *ops); struct pb_manager * diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_fenced.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_fenced.c index 513ed28ca6..47e9fee533 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_fenced.c +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_fenced.c @@ -122,7 +122,7 @@ fenced_bufmgr_destroy(struct pb_manager *mgr) struct pb_manager * fenced_bufmgr_create(struct pb_manager *provider, - struct pipe_winsys *winsys) + struct pb_fence_ops *ops) { struct fenced_pb_manager *fenced_mgr; @@ -138,7 +138,7 @@ fenced_bufmgr_create(struct pb_manager *provider, fenced_mgr->base.flush = fenced_bufmgr_flush; fenced_mgr->provider = provider; - fenced_mgr->fenced_list = fenced_buffer_list_create(winsys); + fenced_mgr->fenced_list = fenced_buffer_list_create(ops); if(!fenced_mgr->fenced_list) { FREE(fenced_mgr); return NULL; -- cgit v1.2.3 From 874f364e9ea3a03d29ae4b6e1c7e2843ef8b9e79 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Wed, 11 Feb 2009 16:35:12 +0000 Subject: draw: Cap max vertices instead of failing assert. --- src/gallium/auxiliary/draw/draw_pipe_vbuf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/draw/draw_pipe_vbuf.c b/src/gallium/auxiliary/draw/draw_pipe_vbuf.c index 5ead25efff..9153bc2f86 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_vbuf.c +++ b/src/gallium/auxiliary/draw/draw_pipe_vbuf.c @@ -394,13 +394,14 @@ vbuf_alloc_vertices( struct vbuf_stage *vbuf ) /* even number */ vbuf->max_vertices = vbuf->max_vertices & ~1; + if(vbuf->max_vertices >= UNDEFINED_VERTEX_ID) + vbuf->max_vertices = UNDEFINED_VERTEX_ID - 1; + /* Must always succeed -- driver gives us a * 'max_vertex_buffer_bytes' which it guarantees it can allocate, * and it will flush itself if necessary to do so. If this does * fail, we are basically without usable hardware. */ - assert(vbuf->max_vertices < UNDEFINED_VERTEX_ID); - vbuf->vertices = (uint *) vbuf->render->allocate_vertices(vbuf->render, (ushort) vbuf->vertex_size, (ushort) vbuf->max_vertices); -- cgit v1.2.3 From 81374d1ebed16aa3eed336295e80be0dfebfad75 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 11 Feb 2009 14:09:22 -0700 Subject: gallium: silence warnings about void ptr arithmetic --- src/gallium/auxiliary/util/u_linear.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/util/u_linear.c b/src/gallium/auxiliary/util/u_linear.c index a76704ffc7..ba6204d6f7 100644 --- a/src/gallium/auxiliary/util/u_linear.c +++ b/src/gallium/auxiliary/util/u_linear.c @@ -9,7 +9,7 @@ pipe_linear_to_tile(size_t src_stride, void *src_ptr, int x, y, z; char *ptr; size_t bytes = t->cols * t->block.size; - + char *dst_ptr2 = (char *) dst_ptr; assert(pipe_linear_check_tile(t)); @@ -19,8 +19,8 @@ pipe_linear_to_tile(size_t src_stride, void *src_ptr, /* this inner loop could be replace with SSE magic */ ptr = (char*)src_ptr + src_stride * t->rows * y + bytes * x; for (z = 0; z < t->rows; z++) { - memcpy(dst_ptr, ptr, bytes); - dst_ptr += bytes; + memcpy(dst_ptr2, ptr, bytes); + dst_ptr2 += bytes; ptr += src_stride; } } @@ -33,6 +33,7 @@ void pipe_linear_from_tile(struct pipe_tile_info *t, void *src_ptr, int x, y, z; char *ptr; size_t bytes = t->cols * t->block.size; + const char *src_ptr2 = (const char *) src_ptr; /* lets read lineary from the tiled buffer */ for (y = 0; y < t->tiles_y; y++) { @@ -40,8 +41,8 @@ void pipe_linear_from_tile(struct pipe_tile_info *t, void *src_ptr, /* this inner loop could be replace with SSE magic */ ptr = (char*)dst_ptr + dst_stride * t->rows * y + bytes * x; for (z = 0; z < t->rows; z++) { - memcpy(ptr, src_ptr, bytes); - src_ptr += bytes; + memcpy(ptr, src_ptr2, bytes); + src_ptr2 += bytes; ptr += dst_stride; } } -- cgit v1.2.3 From 6b06a6b929aa742f92653728254255f1867d6210 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 11 Feb 2009 14:11:48 -0700 Subject: gallium: const-correctness for u_linear.c functions --- src/gallium/auxiliary/util/u_linear.c | 6 +++--- src/gallium/auxiliary/util/u_linear.h | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/util/u_linear.c b/src/gallium/auxiliary/util/u_linear.c index ba6204d6f7..e999cefe74 100644 --- a/src/gallium/auxiliary/util/u_linear.c +++ b/src/gallium/auxiliary/util/u_linear.c @@ -3,7 +3,7 @@ #include "u_linear.h" void -pipe_linear_to_tile(size_t src_stride, void *src_ptr, +pipe_linear_to_tile(size_t src_stride, const void *src_ptr, struct pipe_tile_info *t, void *dst_ptr) { int x, y, z; @@ -27,7 +27,7 @@ pipe_linear_to_tile(size_t src_stride, void *src_ptr, } } -void pipe_linear_from_tile(struct pipe_tile_info *t, void *src_ptr, +void pipe_linear_from_tile(struct pipe_tile_info *t, const void *src_ptr, size_t dst_stride, void *dst_ptr) { int x, y, z; @@ -51,7 +51,7 @@ void pipe_linear_from_tile(struct pipe_tile_info *t, void *src_ptr, void pipe_linear_fill_info(struct pipe_tile_info *t, - struct pipe_format_block *block, + const struct pipe_format_block *block, unsigned tile_width, unsigned tile_height, unsigned tiles_x, unsigned tiles_y) { diff --git a/src/gallium/auxiliary/util/u_linear.h b/src/gallium/auxiliary/util/u_linear.h index e337cfd770..1589f029bc 100644 --- a/src/gallium/auxiliary/util/u_linear.h +++ b/src/gallium/auxiliary/util/u_linear.h @@ -3,6 +3,7 @@ #define U_LINEAR_H #include "pipe/p_format.h" + struct pipe_tile_info { unsigned size; @@ -23,10 +24,10 @@ struct pipe_tile_info struct pipe_format_block block; }; -void pipe_linear_to_tile(size_t src_stride, void *src_ptr, +void pipe_linear_to_tile(size_t src_stride, const void *src_ptr, struct pipe_tile_info *t, void *dst_ptr); -void pipe_linear_from_tile(struct pipe_tile_info *t, void *src_ptr, +void pipe_linear_from_tile(struct pipe_tile_info *t, const void *src_ptr, size_t dst_stride, void *dst_ptr); /** @@ -39,11 +40,11 @@ void pipe_linear_from_tile(struct pipe_tile_info *t, void *src_ptr, * @tiles_y number of tiles in y axis */ void pipe_linear_fill_info(struct pipe_tile_info *t, - struct pipe_format_block *block, + const struct pipe_format_block *block, unsigned tile_width, unsigned tile_height, unsigned tiles_x, unsigned tiles_y); -static INLINE boolean pipe_linear_check_tile(struct pipe_tile_info *t) +static INLINE boolean pipe_linear_check_tile(const struct pipe_tile_info *t) { if (t->tile.size != t->block.size * t->cols * t->rows) return FALSE; -- cgit v1.2.3 From f5cca127b0ddcfe36b8dc98a5f405979e8afe673 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Thu, 12 Feb 2009 13:30:01 +0000 Subject: tgsi: keep immediate file info uptodate Make sure the stats for TGSI_FILE_IMMEDIATE are uptodate. Previously we just had immediate_count, but file_*[TGSI_FILE_IMMEDIATE] were bogus. --- src/gallium/auxiliary/tgsi/tgsi_scan.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index d02205a63e..c535788819 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -151,7 +151,14 @@ tgsi_scan_shader(const struct tgsi_token *tokens, break; case TGSI_TOKEN_TYPE_IMMEDIATE: - info->immediate_count++; + { + uint reg = info->immediate_count++; + uint file = TGSI_FILE_IMMEDIATE; + + info->file_mask[file] |= (1 << reg); + info->file_count[file]++; + info->file_max[file] = MAX2(info->file_max[file], (int)reg); + } break; default: -- cgit v1.2.3