{
memcpy(out, &((short *)in)[start], out_nr*sizeof(short));
}
-
+
static void translate_memcpy_uint( const void *in,
unsigned start,
unsigned in_nr,
for (i = 0; i < nr; i++)
out_us[i] = (ushort)(i + start);
}
-
+
static void generate_linear_uint( unsigned start,
unsigned nr,
void *out )
* needed to draw the primitive with fill mode = PIPE_POLYGON_MODE_LINE using
* separate lines (PIPE_PRIM_LINES).
*/
-static unsigned nr_lines( unsigned prim,
- unsigned nr )
+static unsigned
+nr_lines(unsigned prim, unsigned nr)
{
switch (prim) {
case PIPE_PRIM_TRIANGLES:
- return (nr / 3) * 6;
+ return (nr / 3) * 6;
case PIPE_PRIM_TRIANGLE_STRIP:
return (nr - 2) * 6;
case PIPE_PRIM_TRIANGLE_FAN:
return 0;
}
}
-
enum indices_mode
*out_index_size = (in_index_size == 4) ? 4 : 2;
out_idx = out_size_idx(*out_index_size);
- if (unfilled_mode == PIPE_POLYGON_MODE_POINT)
- {
+ if (unfilled_mode == PIPE_POLYGON_MODE_POINT) {
*out_prim = PIPE_PRIM_POINTS;
*out_nr = nr;
- switch (in_index_size)
- {
+ switch (in_index_size) {
case 1:
*out_translate = translate_ubyte_ushort;
return U_TRANSLATE_NORMAL;
out_idx = out_size_idx(*out_index_size);
if (unfilled_mode == PIPE_POLYGON_MODE_POINT) {
-
if (*out_index_size == 4)
*out_generate = generate_linear_uint;
else
return U_GENERATE_REUSABLE;
}
}
-