Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. /* File automatically generated by u_unfilled_gen.py */
  2.  
  3. /*
  4.  * Copyright 2009 VMware, Inc.
  5.  * All Rights Reserved.
  6.  *
  7.  * Permission is hereby granted, free of charge, to any person obtaining a
  8.  * copy of this software and associated documentation files (the "Software"),
  9.  * to deal in the Software without restriction, including without limitation
  10.  * on the rights to use, copy, modify, merge, publish, distribute, sub
  11.  * license, and/or sell copies of the Software, and to permit persons to whom
  12.  * the Software is furnished to do so, subject to the following conditions:
  13.  *
  14.  * The above copyright notice and this permission notice (including the next
  15.  * paragraph) shall be included in all copies or substantial portions of the
  16.  * Software.
  17.  *
  18.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  19.  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  20.  * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
  21.  * VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
  22.  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  23.  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  24.  * USE OR OTHER DEALINGS IN THE SOFTWARE.
  25.  */
  26.  
  27.  
  28.  
  29. /**
  30.  * @file
  31.  * Functions to translate and generate index lists
  32.  */
  33.  
  34. #include "indices/u_indices.h"
  35. #include "indices/u_indices_priv.h"
  36. #include "pipe/p_compiler.h"
  37. #include "util/u_debug.h"
  38. #include "pipe/p_defines.h"
  39. #include "util/u_memory.h"
  40.  
  41.  
  42. static unsigned out_size_idx( unsigned index_size )
  43. {
  44.    switch (index_size) {
  45.    case 4: return OUT_UINT;
  46.    case 2: return OUT_USHORT;
  47.    default: assert(0); return OUT_USHORT;
  48.    }
  49. }
  50.  
  51. static unsigned in_size_idx( unsigned index_size )
  52. {
  53.    switch (index_size) {
  54.    case 4: return IN_UINT;
  55.    case 2: return IN_USHORT;
  56.    case 1: return IN_UBYTE;
  57.    default: assert(0); return IN_UBYTE;
  58.    }
  59. }
  60.  
  61.  
  62. static u_generate_func generate_line[OUT_COUNT][PRIM_COUNT];
  63. static u_translate_func translate_line[IN_COUNT][OUT_COUNT][PRIM_COUNT];
  64.  
  65.  
  66. static void generate_tris_ushort(
  67.     unsigned start,
  68.     unsigned out_nr,
  69.     void *_out )
  70. {
  71.   ushort *out = (ushort*)_out;
  72.   unsigned i, j;
  73.   (void)j;
  74.   for (i = start, j = 0; j < out_nr; j+=6, i+=3) {
  75.       (out+j)[0] = (ushort)(i);
  76.       (out+j)[1] = (ushort)(i+1);
  77.       (out+j+2)[0] = (ushort)(i+1);
  78.       (out+j+2)[1] = (ushort)(i+2);
  79.       (out+j+4)[0] = (ushort)(i+2);
  80.       (out+j+4)[1] = (ushort)(i);
  81.    }
  82. }
  83. static void generate_tristrip_ushort(
  84.     unsigned start,
  85.     unsigned out_nr,
  86.     void *_out )
  87. {
  88.   ushort *out = (ushort*)_out;
  89.   unsigned i, j;
  90.   (void)j;
  91.   for (i = start, j = 0; j < out_nr; j+=6, i++) {
  92.       (out+j)[0] = (ushort)(i);
  93.       (out+j)[1] = (ushort)(i+1/*+(i&1)*/);
  94.       (out+j+2)[0] = (ushort)(i+1/*+(i&1)*/);
  95.       (out+j+2)[1] = (ushort)(i+2/*-(i&1)*/);
  96.       (out+j+4)[0] = (ushort)(i+2/*-(i&1)*/);
  97.       (out+j+4)[1] = (ushort)(i);
  98.    }
  99. }
  100. static void generate_trifan_ushort(
  101.     unsigned start,
  102.     unsigned out_nr,
  103.     void *_out )
  104. {
  105.   ushort *out = (ushort*)_out;
  106.   unsigned i, j;
  107.   (void)j;
  108.   for (i = start, j = 0; j < out_nr; j+=6, i++) {
  109.       (out+j)[0] = (ushort)(0);
  110.       (out+j)[1] = (ushort)(i+1);
  111.       (out+j+2)[0] = (ushort)(i+1);
  112.       (out+j+2)[1] = (ushort)(i+2);
  113.       (out+j+4)[0] = (ushort)(i+2);
  114.       (out+j+4)[1] = (ushort)(0);
  115.    }
  116. }
  117. static void generate_quads_ushort(
  118.     unsigned start,
  119.     unsigned out_nr,
  120.     void *_out )
  121. {
  122.   ushort *out = (ushort*)_out;
  123.   unsigned i, j;
  124.   (void)j;
  125.   for (i = start, j = 0; j < out_nr; j+=8, i+=4) {
  126.       (out+j)[0] = (ushort)(i+0);
  127.       (out+j)[1] = (ushort)(i+1);
  128.       (out+j+2)[0] = (ushort)(i+1);
  129.       (out+j+2)[1] = (ushort)(i+2);
  130.       (out+j+4)[0] = (ushort)(i+2);
  131.       (out+j+4)[1] = (ushort)(i+3);
  132.       (out+j+6)[0] = (ushort)(i+3);
  133.       (out+j+6)[1] = (ushort)(i+0);
  134.    }
  135. }
  136. static void generate_quadstrip_ushort(
  137.     unsigned start,
  138.     unsigned out_nr,
  139.     void *_out )
  140. {
  141.   ushort *out = (ushort*)_out;
  142.   unsigned i, j;
  143.   (void)j;
  144.   for (i = start, j = 0; j < out_nr; j+=8, i+=2) {
  145.       (out+j)[0] = (ushort)(i+2);
  146.       (out+j)[1] = (ushort)(i+0);
  147.       (out+j+2)[0] = (ushort)(i+0);
  148.       (out+j+2)[1] = (ushort)(i+1);
  149.       (out+j+4)[0] = (ushort)(i+1);
  150.       (out+j+4)[1] = (ushort)(i+3);
  151.       (out+j+6)[0] = (ushort)(i+3);
  152.       (out+j+6)[1] = (ushort)(i+2);
  153.    }
  154. }
  155. static void generate_polygon_ushort(
  156.     unsigned start,
  157.     unsigned out_nr,
  158.     void *_out )
  159. {
  160.   ushort *out = (ushort*)_out;
  161.   unsigned i, j;
  162.   (void)j;
  163.   for (i = start, j = 0; j < out_nr; j+=2, i++) {
  164.       (out+j)[0] = (ushort)(i);
  165.       (out+j)[1] = (ushort)((i+1)%(out_nr/2));
  166.    }
  167. }
  168. static void generate_tris_uint(
  169.     unsigned start,
  170.     unsigned out_nr,
  171.     void *_out )
  172. {
  173.   uint *out = (uint*)_out;
  174.   unsigned i, j;
  175.   (void)j;
  176.   for (i = start, j = 0; j < out_nr; j+=6, i+=3) {
  177.       (out+j)[0] = (uint)(i);
  178.       (out+j)[1] = (uint)(i+1);
  179.       (out+j+2)[0] = (uint)(i+1);
  180.       (out+j+2)[1] = (uint)(i+2);
  181.       (out+j+4)[0] = (uint)(i+2);
  182.       (out+j+4)[1] = (uint)(i);
  183.    }
  184. }
  185. static void generate_tristrip_uint(
  186.     unsigned start,
  187.     unsigned out_nr,
  188.     void *_out )
  189. {
  190.   uint *out = (uint*)_out;
  191.   unsigned i, j;
  192.   (void)j;
  193.   for (i = start, j = 0; j < out_nr; j+=6, i++) {
  194.       (out+j)[0] = (uint)(i);
  195.       (out+j)[1] = (uint)(i+1/*+(i&1)*/);
  196.       (out+j+2)[0] = (uint)(i+1/*+(i&1)*/);
  197.       (out+j+2)[1] = (uint)(i+2/*-(i&1)*/);
  198.       (out+j+4)[0] = (uint)(i+2/*-(i&1)*/);
  199.       (out+j+4)[1] = (uint)(i);
  200.    }
  201. }
  202. static void generate_trifan_uint(
  203.     unsigned start,
  204.     unsigned out_nr,
  205.     void *_out )
  206. {
  207.   uint *out = (uint*)_out;
  208.   unsigned i, j;
  209.   (void)j;
  210.   for (i = start, j = 0; j < out_nr; j+=6, i++) {
  211.       (out+j)[0] = (uint)(0);
  212.       (out+j)[1] = (uint)(i+1);
  213.       (out+j+2)[0] = (uint)(i+1);
  214.       (out+j+2)[1] = (uint)(i+2);
  215.       (out+j+4)[0] = (uint)(i+2);
  216.       (out+j+4)[1] = (uint)(0);
  217.    }
  218. }
  219. static void generate_quads_uint(
  220.     unsigned start,
  221.     unsigned out_nr,
  222.     void *_out )
  223. {
  224.   uint *out = (uint*)_out;
  225.   unsigned i, j;
  226.   (void)j;
  227.   for (i = start, j = 0; j < out_nr; j+=8, i+=4) {
  228.       (out+j)[0] = (uint)(i+0);
  229.       (out+j)[1] = (uint)(i+1);
  230.       (out+j+2)[0] = (uint)(i+1);
  231.       (out+j+2)[1] = (uint)(i+2);
  232.       (out+j+4)[0] = (uint)(i+2);
  233.       (out+j+4)[1] = (uint)(i+3);
  234.       (out+j+6)[0] = (uint)(i+3);
  235.       (out+j+6)[1] = (uint)(i+0);
  236.    }
  237. }
  238. static void generate_quadstrip_uint(
  239.     unsigned start,
  240.     unsigned out_nr,
  241.     void *_out )
  242. {
  243.   uint *out = (uint*)_out;
  244.   unsigned i, j;
  245.   (void)j;
  246.   for (i = start, j = 0; j < out_nr; j+=8, i+=2) {
  247.       (out+j)[0] = (uint)(i+2);
  248.       (out+j)[1] = (uint)(i+0);
  249.       (out+j+2)[0] = (uint)(i+0);
  250.       (out+j+2)[1] = (uint)(i+1);
  251.       (out+j+4)[0] = (uint)(i+1);
  252.       (out+j+4)[1] = (uint)(i+3);
  253.       (out+j+6)[0] = (uint)(i+3);
  254.       (out+j+6)[1] = (uint)(i+2);
  255.    }
  256. }
  257. static void generate_polygon_uint(
  258.     unsigned start,
  259.     unsigned out_nr,
  260.     void *_out )
  261. {
  262.   uint *out = (uint*)_out;
  263.   unsigned i, j;
  264.   (void)j;
  265.   for (i = start, j = 0; j < out_nr; j+=2, i++) {
  266.       (out+j)[0] = (uint)(i);
  267.       (out+j)[1] = (uint)((i+1)%(out_nr/2));
  268.    }
  269. }
  270. static void translate_tris_ubyte2ushort(
  271.     const void * _in,
  272.     unsigned start,
  273.     unsigned in_nr,
  274.     unsigned out_nr,
  275.     unsigned restart_index,
  276.     void *_out )
  277. {
  278.   const ubyte*in = (const ubyte*)_in;
  279.   ushort *out = (ushort*)_out;
  280.   unsigned i, j;
  281.   (void)j;
  282.   for (i = start, j = 0; j < out_nr; j+=6, i+=3) {
  283.       (out+j)[0] = (ushort)in[i];
  284.       (out+j)[1] = (ushort)in[i+1];
  285.       (out+j+2)[0] = (ushort)in[i+1];
  286.       (out+j+2)[1] = (ushort)in[i+2];
  287.       (out+j+4)[0] = (ushort)in[i+2];
  288.       (out+j+4)[1] = (ushort)in[i];
  289.    }
  290. }
  291. static void translate_tristrip_ubyte2ushort(
  292.     const void * _in,
  293.     unsigned start,
  294.     unsigned in_nr,
  295.     unsigned out_nr,
  296.     unsigned restart_index,
  297.     void *_out )
  298. {
  299.   const ubyte*in = (const ubyte*)_in;
  300.   ushort *out = (ushort*)_out;
  301.   unsigned i, j;
  302.   (void)j;
  303.   for (i = start, j = 0; j < out_nr; j+=6, i++) {
  304.       (out+j)[0] = (ushort)in[i];
  305.       (out+j)[1] = (ushort)in[i+1/*+(i&1)*/];
  306.       (out+j+2)[0] = (ushort)in[i+1/*+(i&1)*/];
  307.       (out+j+2)[1] = (ushort)in[i+2/*-(i&1)*/];
  308.       (out+j+4)[0] = (ushort)in[i+2/*-(i&1)*/];
  309.       (out+j+4)[1] = (ushort)in[i];
  310.    }
  311. }
  312. static void translate_trifan_ubyte2ushort(
  313.     const void * _in,
  314.     unsigned start,
  315.     unsigned in_nr,
  316.     unsigned out_nr,
  317.     unsigned restart_index,
  318.     void *_out )
  319. {
  320.   const ubyte*in = (const ubyte*)_in;
  321.   ushort *out = (ushort*)_out;
  322.   unsigned i, j;
  323.   (void)j;
  324.   for (i = start, j = 0; j < out_nr; j+=6, i++) {
  325.       (out+j)[0] = (ushort)in[0];
  326.       (out+j)[1] = (ushort)in[i+1];
  327.       (out+j+2)[0] = (ushort)in[i+1];
  328.       (out+j+2)[1] = (ushort)in[i+2];
  329.       (out+j+4)[0] = (ushort)in[i+2];
  330.       (out+j+4)[1] = (ushort)in[0];
  331.    }
  332. }
  333. static void translate_quads_ubyte2ushort(
  334.     const void * _in,
  335.     unsigned start,
  336.     unsigned in_nr,
  337.     unsigned out_nr,
  338.     unsigned restart_index,
  339.     void *_out )
  340. {
  341.   const ubyte*in = (const ubyte*)_in;
  342.   ushort *out = (ushort*)_out;
  343.   unsigned i, j;
  344.   (void)j;
  345.   for (i = start, j = 0; j < out_nr; j+=8, i+=4) {
  346.       (out+j)[0] = (ushort)in[i+0];
  347.       (out+j)[1] = (ushort)in[i+1];
  348.       (out+j+2)[0] = (ushort)in[i+1];
  349.       (out+j+2)[1] = (ushort)in[i+2];
  350.       (out+j+4)[0] = (ushort)in[i+2];
  351.       (out+j+4)[1] = (ushort)in[i+3];
  352.       (out+j+6)[0] = (ushort)in[i+3];
  353.       (out+j+6)[1] = (ushort)in[i+0];
  354.    }
  355. }
  356. static void translate_quadstrip_ubyte2ushort(
  357.     const void * _in,
  358.     unsigned start,
  359.     unsigned in_nr,
  360.     unsigned out_nr,
  361.     unsigned restart_index,
  362.     void *_out )
  363. {
  364.   const ubyte*in = (const ubyte*)_in;
  365.   ushort *out = (ushort*)_out;
  366.   unsigned i, j;
  367.   (void)j;
  368.   for (i = start, j = 0; j < out_nr; j+=8, i+=2) {
  369.       (out+j)[0] = (ushort)in[i+2];
  370.       (out+j)[1] = (ushort)in[i+0];
  371.       (out+j+2)[0] = (ushort)in[i+0];
  372.       (out+j+2)[1] = (ushort)in[i+1];
  373.       (out+j+4)[0] = (ushort)in[i+1];
  374.       (out+j+4)[1] = (ushort)in[i+3];
  375.       (out+j+6)[0] = (ushort)in[i+3];
  376.       (out+j+6)[1] = (ushort)in[i+2];
  377.    }
  378. }
  379. static void translate_polygon_ubyte2ushort(
  380.     const void * _in,
  381.     unsigned start,
  382.     unsigned in_nr,
  383.     unsigned out_nr,
  384.     unsigned restart_index,
  385.     void *_out )
  386. {
  387.   const ubyte*in = (const ubyte*)_in;
  388.   ushort *out = (ushort*)_out;
  389.   unsigned i, j;
  390.   (void)j;
  391.   for (i = start, j = 0; j < out_nr; j+=2, i++) {
  392.       (out+j)[0] = (ushort)in[i];
  393.       (out+j)[1] = (ushort)in[(i+1)%(out_nr/2)];
  394.    }
  395. }
  396. static void translate_tris_ubyte2uint(
  397.     const void * _in,
  398.     unsigned start,
  399.     unsigned in_nr,
  400.     unsigned out_nr,
  401.     unsigned restart_index,
  402.     void *_out )
  403. {
  404.   const ubyte*in = (const ubyte*)_in;
  405.   uint *out = (uint*)_out;
  406.   unsigned i, j;
  407.   (void)j;
  408.   for (i = start, j = 0; j < out_nr; j+=6, i+=3) {
  409.       (out+j)[0] = (uint)in[i];
  410.       (out+j)[1] = (uint)in[i+1];
  411.       (out+j+2)[0] = (uint)in[i+1];
  412.       (out+j+2)[1] = (uint)in[i+2];
  413.       (out+j+4)[0] = (uint)in[i+2];
  414.       (out+j+4)[1] = (uint)in[i];
  415.    }
  416. }
  417. static void translate_tristrip_ubyte2uint(
  418.     const void * _in,
  419.     unsigned start,
  420.     unsigned in_nr,
  421.     unsigned out_nr,
  422.     unsigned restart_index,
  423.     void *_out )
  424. {
  425.   const ubyte*in = (const ubyte*)_in;
  426.   uint *out = (uint*)_out;
  427.   unsigned i, j;
  428.   (void)j;
  429.   for (i = start, j = 0; j < out_nr; j+=6, i++) {
  430.       (out+j)[0] = (uint)in[i];
  431.       (out+j)[1] = (uint)in[i+1/*+(i&1)*/];
  432.       (out+j+2)[0] = (uint)in[i+1/*+(i&1)*/];
  433.       (out+j+2)[1] = (uint)in[i+2/*-(i&1)*/];
  434.       (out+j+4)[0] = (uint)in[i+2/*-(i&1)*/];
  435.       (out+j+4)[1] = (uint)in[i];
  436.    }
  437. }
  438. static void translate_trifan_ubyte2uint(
  439.     const void * _in,
  440.     unsigned start,
  441.     unsigned in_nr,
  442.     unsigned out_nr,
  443.     unsigned restart_index,
  444.     void *_out )
  445. {
  446.   const ubyte*in = (const ubyte*)_in;
  447.   uint *out = (uint*)_out;
  448.   unsigned i, j;
  449.   (void)j;
  450.   for (i = start, j = 0; j < out_nr; j+=6, i++) {
  451.       (out+j)[0] = (uint)in[0];
  452.       (out+j)[1] = (uint)in[i+1];
  453.       (out+j+2)[0] = (uint)in[i+1];
  454.       (out+j+2)[1] = (uint)in[i+2];
  455.       (out+j+4)[0] = (uint)in[i+2];
  456.       (out+j+4)[1] = (uint)in[0];
  457.    }
  458. }
  459. static void translate_quads_ubyte2uint(
  460.     const void * _in,
  461.     unsigned start,
  462.     unsigned in_nr,
  463.     unsigned out_nr,
  464.     unsigned restart_index,
  465.     void *_out )
  466. {
  467.   const ubyte*in = (const ubyte*)_in;
  468.   uint *out = (uint*)_out;
  469.   unsigned i, j;
  470.   (void)j;
  471.   for (i = start, j = 0; j < out_nr; j+=8, i+=4) {
  472.       (out+j)[0] = (uint)in[i+0];
  473.       (out+j)[1] = (uint)in[i+1];
  474.       (out+j+2)[0] = (uint)in[i+1];
  475.       (out+j+2)[1] = (uint)in[i+2];
  476.       (out+j+4)[0] = (uint)in[i+2];
  477.       (out+j+4)[1] = (uint)in[i+3];
  478.       (out+j+6)[0] = (uint)in[i+3];
  479.       (out+j+6)[1] = (uint)in[i+0];
  480.    }
  481. }
  482. static void translate_quadstrip_ubyte2uint(
  483.     const void * _in,
  484.     unsigned start,
  485.     unsigned in_nr,
  486.     unsigned out_nr,
  487.     unsigned restart_index,
  488.     void *_out )
  489. {
  490.   const ubyte*in = (const ubyte*)_in;
  491.   uint *out = (uint*)_out;
  492.   unsigned i, j;
  493.   (void)j;
  494.   for (i = start, j = 0; j < out_nr; j+=8, i+=2) {
  495.       (out+j)[0] = (uint)in[i+2];
  496.       (out+j)[1] = (uint)in[i+0];
  497.       (out+j+2)[0] = (uint)in[i+0];
  498.       (out+j+2)[1] = (uint)in[i+1];
  499.       (out+j+4)[0] = (uint)in[i+1];
  500.       (out+j+4)[1] = (uint)in[i+3];
  501.       (out+j+6)[0] = (uint)in[i+3];
  502.       (out+j+6)[1] = (uint)in[i+2];
  503.    }
  504. }
  505. static void translate_polygon_ubyte2uint(
  506.     const void * _in,
  507.     unsigned start,
  508.     unsigned in_nr,
  509.     unsigned out_nr,
  510.     unsigned restart_index,
  511.     void *_out )
  512. {
  513.   const ubyte*in = (const ubyte*)_in;
  514.   uint *out = (uint*)_out;
  515.   unsigned i, j;
  516.   (void)j;
  517.   for (i = start, j = 0; j < out_nr; j+=2, i++) {
  518.       (out+j)[0] = (uint)in[i];
  519.       (out+j)[1] = (uint)in[(i+1)%(out_nr/2)];
  520.    }
  521. }
  522. static void translate_tris_ushort2ushort(
  523.     const void * _in,
  524.     unsigned start,
  525.     unsigned in_nr,
  526.     unsigned out_nr,
  527.     unsigned restart_index,
  528.     void *_out )
  529. {
  530.   const ushort*in = (const ushort*)_in;
  531.   ushort *out = (ushort*)_out;
  532.   unsigned i, j;
  533.   (void)j;
  534.   for (i = start, j = 0; j < out_nr; j+=6, i+=3) {
  535.       (out+j)[0] = (ushort)in[i];
  536.       (out+j)[1] = (ushort)in[i+1];
  537.       (out+j+2)[0] = (ushort)in[i+1];
  538.       (out+j+2)[1] = (ushort)in[i+2];
  539.       (out+j+4)[0] = (ushort)in[i+2];
  540.       (out+j+4)[1] = (ushort)in[i];
  541.    }
  542. }
  543. static void translate_tristrip_ushort2ushort(
  544.     const void * _in,
  545.     unsigned start,
  546.     unsigned in_nr,
  547.     unsigned out_nr,
  548.     unsigned restart_index,
  549.     void *_out )
  550. {
  551.   const ushort*in = (const ushort*)_in;
  552.   ushort *out = (ushort*)_out;
  553.   unsigned i, j;
  554.   (void)j;
  555.   for (i = start, j = 0; j < out_nr; j+=6, i++) {
  556.       (out+j)[0] = (ushort)in[i];
  557.       (out+j)[1] = (ushort)in[i+1/*+(i&1)*/];
  558.       (out+j+2)[0] = (ushort)in[i+1/*+(i&1)*/];
  559.       (out+j+2)[1] = (ushort)in[i+2/*-(i&1)*/];
  560.       (out+j+4)[0] = (ushort)in[i+2/*-(i&1)*/];
  561.       (out+j+4)[1] = (ushort)in[i];
  562.    }
  563. }
  564. static void translate_trifan_ushort2ushort(
  565.     const void * _in,
  566.     unsigned start,
  567.     unsigned in_nr,
  568.     unsigned out_nr,
  569.     unsigned restart_index,
  570.     void *_out )
  571. {
  572.   const ushort*in = (const ushort*)_in;
  573.   ushort *out = (ushort*)_out;
  574.   unsigned i, j;
  575.   (void)j;
  576.   for (i = start, j = 0; j < out_nr; j+=6, i++) {
  577.       (out+j)[0] = (ushort)in[0];
  578.       (out+j)[1] = (ushort)in[i+1];
  579.       (out+j+2)[0] = (ushort)in[i+1];
  580.       (out+j+2)[1] = (ushort)in[i+2];
  581.       (out+j+4)[0] = (ushort)in[i+2];
  582.       (out+j+4)[1] = (ushort)in[0];
  583.    }
  584. }
  585. static void translate_quads_ushort2ushort(
  586.     const void * _in,
  587.     unsigned start,
  588.     unsigned in_nr,
  589.     unsigned out_nr,
  590.     unsigned restart_index,
  591.     void *_out )
  592. {
  593.   const ushort*in = (const ushort*)_in;
  594.   ushort *out = (ushort*)_out;
  595.   unsigned i, j;
  596.   (void)j;
  597.   for (i = start, j = 0; j < out_nr; j+=8, i+=4) {
  598.       (out+j)[0] = (ushort)in[i+0];
  599.       (out+j)[1] = (ushort)in[i+1];
  600.       (out+j+2)[0] = (ushort)in[i+1];
  601.       (out+j+2)[1] = (ushort)in[i+2];
  602.       (out+j+4)[0] = (ushort)in[i+2];
  603.       (out+j+4)[1] = (ushort)in[i+3];
  604.       (out+j+6)[0] = (ushort)in[i+3];
  605.       (out+j+6)[1] = (ushort)in[i+0];
  606.    }
  607. }
  608. static void translate_quadstrip_ushort2ushort(
  609.     const void * _in,
  610.     unsigned start,
  611.     unsigned in_nr,
  612.     unsigned out_nr,
  613.     unsigned restart_index,
  614.     void *_out )
  615. {
  616.   const ushort*in = (const ushort*)_in;
  617.   ushort *out = (ushort*)_out;
  618.   unsigned i, j;
  619.   (void)j;
  620.   for (i = start, j = 0; j < out_nr; j+=8, i+=2) {
  621.       (out+j)[0] = (ushort)in[i+2];
  622.       (out+j)[1] = (ushort)in[i+0];
  623.       (out+j+2)[0] = (ushort)in[i+0];
  624.       (out+j+2)[1] = (ushort)in[i+1];
  625.       (out+j+4)[0] = (ushort)in[i+1];
  626.       (out+j+4)[1] = (ushort)in[i+3];
  627.       (out+j+6)[0] = (ushort)in[i+3];
  628.       (out+j+6)[1] = (ushort)in[i+2];
  629.    }
  630. }
  631. static void translate_polygon_ushort2ushort(
  632.     const void * _in,
  633.     unsigned start,
  634.     unsigned in_nr,
  635.     unsigned out_nr,
  636.     unsigned restart_index,
  637.     void *_out )
  638. {
  639.   const ushort*in = (const ushort*)_in;
  640.   ushort *out = (ushort*)_out;
  641.   unsigned i, j;
  642.   (void)j;
  643.   for (i = start, j = 0; j < out_nr; j+=2, i++) {
  644.       (out+j)[0] = (ushort)in[i];
  645.       (out+j)[1] = (ushort)in[(i+1)%(out_nr/2)];
  646.    }
  647. }
  648. static void translate_tris_ushort2uint(
  649.     const void * _in,
  650.     unsigned start,
  651.     unsigned in_nr,
  652.     unsigned out_nr,
  653.     unsigned restart_index,
  654.     void *_out )
  655. {
  656.   const ushort*in = (const ushort*)_in;
  657.   uint *out = (uint*)_out;
  658.   unsigned i, j;
  659.   (void)j;
  660.   for (i = start, j = 0; j < out_nr; j+=6, i+=3) {
  661.       (out+j)[0] = (uint)in[i];
  662.       (out+j)[1] = (uint)in[i+1];
  663.       (out+j+2)[0] = (uint)in[i+1];
  664.       (out+j+2)[1] = (uint)in[i+2];
  665.       (out+j+4)[0] = (uint)in[i+2];
  666.       (out+j+4)[1] = (uint)in[i];
  667.    }
  668. }
  669. static void translate_tristrip_ushort2uint(
  670.     const void * _in,
  671.     unsigned start,
  672.     unsigned in_nr,
  673.     unsigned out_nr,
  674.     unsigned restart_index,
  675.     void *_out )
  676. {
  677.   const ushort*in = (const ushort*)_in;
  678.   uint *out = (uint*)_out;
  679.   unsigned i, j;
  680.   (void)j;
  681.   for (i = start, j = 0; j < out_nr; j+=6, i++) {
  682.       (out+j)[0] = (uint)in[i];
  683.       (out+j)[1] = (uint)in[i+1/*+(i&1)*/];
  684.       (out+j+2)[0] = (uint)in[i+1/*+(i&1)*/];
  685.       (out+j+2)[1] = (uint)in[i+2/*-(i&1)*/];
  686.       (out+j+4)[0] = (uint)in[i+2/*-(i&1)*/];
  687.       (out+j+4)[1] = (uint)in[i];
  688.    }
  689. }
  690. static void translate_trifan_ushort2uint(
  691.     const void * _in,
  692.     unsigned start,
  693.     unsigned in_nr,
  694.     unsigned out_nr,
  695.     unsigned restart_index,
  696.     void *_out )
  697. {
  698.   const ushort*in = (const ushort*)_in;
  699.   uint *out = (uint*)_out;
  700.   unsigned i, j;
  701.   (void)j;
  702.   for (i = start, j = 0; j < out_nr; j+=6, i++) {
  703.       (out+j)[0] = (uint)in[0];
  704.       (out+j)[1] = (uint)in[i+1];
  705.       (out+j+2)[0] = (uint)in[i+1];
  706.       (out+j+2)[1] = (uint)in[i+2];
  707.       (out+j+4)[0] = (uint)in[i+2];
  708.       (out+j+4)[1] = (uint)in[0];
  709.    }
  710. }
  711. static void translate_quads_ushort2uint(
  712.     const void * _in,
  713.     unsigned start,
  714.     unsigned in_nr,
  715.     unsigned out_nr,
  716.     unsigned restart_index,
  717.     void *_out )
  718. {
  719.   const ushort*in = (const ushort*)_in;
  720.   uint *out = (uint*)_out;
  721.   unsigned i, j;
  722.   (void)j;
  723.   for (i = start, j = 0; j < out_nr; j+=8, i+=4) {
  724.       (out+j)[0] = (uint)in[i+0];
  725.       (out+j)[1] = (uint)in[i+1];
  726.       (out+j+2)[0] = (uint)in[i+1];
  727.       (out+j+2)[1] = (uint)in[i+2];
  728.       (out+j+4)[0] = (uint)in[i+2];
  729.       (out+j+4)[1] = (uint)in[i+3];
  730.       (out+j+6)[0] = (uint)in[i+3];
  731.       (out+j+6)[1] = (uint)in[i+0];
  732.    }
  733. }
  734. static void translate_quadstrip_ushort2uint(
  735.     const void * _in,
  736.     unsigned start,
  737.     unsigned in_nr,
  738.     unsigned out_nr,
  739.     unsigned restart_index,
  740.     void *_out )
  741. {
  742.   const ushort*in = (const ushort*)_in;
  743.   uint *out = (uint*)_out;
  744.   unsigned i, j;
  745.   (void)j;
  746.   for (i = start, j = 0; j < out_nr; j+=8, i+=2) {
  747.       (out+j)[0] = (uint)in[i+2];
  748.       (out+j)[1] = (uint)in[i+0];
  749.       (out+j+2)[0] = (uint)in[i+0];
  750.       (out+j+2)[1] = (uint)in[i+1];
  751.       (out+j+4)[0] = (uint)in[i+1];
  752.       (out+j+4)[1] = (uint)in[i+3];
  753.       (out+j+6)[0] = (uint)in[i+3];
  754.       (out+j+6)[1] = (uint)in[i+2];
  755.    }
  756. }
  757. static void translate_polygon_ushort2uint(
  758.     const void * _in,
  759.     unsigned start,
  760.     unsigned in_nr,
  761.     unsigned out_nr,
  762.     unsigned restart_index,
  763.     void *_out )
  764. {
  765.   const ushort*in = (const ushort*)_in;
  766.   uint *out = (uint*)_out;
  767.   unsigned i, j;
  768.   (void)j;
  769.   for (i = start, j = 0; j < out_nr; j+=2, i++) {
  770.       (out+j)[0] = (uint)in[i];
  771.       (out+j)[1] = (uint)in[(i+1)%(out_nr/2)];
  772.    }
  773. }
  774. static void translate_tris_uint2ushort(
  775.     const void * _in,
  776.     unsigned start,
  777.     unsigned in_nr,
  778.     unsigned out_nr,
  779.     unsigned restart_index,
  780.     void *_out )
  781. {
  782.   const uint*in = (const uint*)_in;
  783.   ushort *out = (ushort*)_out;
  784.   unsigned i, j;
  785.   (void)j;
  786.   for (i = start, j = 0; j < out_nr; j+=6, i+=3) {
  787.       (out+j)[0] = (ushort)in[i];
  788.       (out+j)[1] = (ushort)in[i+1];
  789.       (out+j+2)[0] = (ushort)in[i+1];
  790.       (out+j+2)[1] = (ushort)in[i+2];
  791.       (out+j+4)[0] = (ushort)in[i+2];
  792.       (out+j+4)[1] = (ushort)in[i];
  793.    }
  794. }
  795. static void translate_tristrip_uint2ushort(
  796.     const void * _in,
  797.     unsigned start,
  798.     unsigned in_nr,
  799.     unsigned out_nr,
  800.     unsigned restart_index,
  801.     void *_out )
  802. {
  803.   const uint*in = (const uint*)_in;
  804.   ushort *out = (ushort*)_out;
  805.   unsigned i, j;
  806.   (void)j;
  807.   for (i = start, j = 0; j < out_nr; j+=6, i++) {
  808.       (out+j)[0] = (ushort)in[i];
  809.       (out+j)[1] = (ushort)in[i+1/*+(i&1)*/];
  810.       (out+j+2)[0] = (ushort)in[i+1/*+(i&1)*/];
  811.       (out+j+2)[1] = (ushort)in[i+2/*-(i&1)*/];
  812.       (out+j+4)[0] = (ushort)in[i+2/*-(i&1)*/];
  813.       (out+j+4)[1] = (ushort)in[i];
  814.    }
  815. }
  816. static void translate_trifan_uint2ushort(
  817.     const void * _in,
  818.     unsigned start,
  819.     unsigned in_nr,
  820.     unsigned out_nr,
  821.     unsigned restart_index,
  822.     void *_out )
  823. {
  824.   const uint*in = (const uint*)_in;
  825.   ushort *out = (ushort*)_out;
  826.   unsigned i, j;
  827.   (void)j;
  828.   for (i = start, j = 0; j < out_nr; j+=6, i++) {
  829.       (out+j)[0] = (ushort)in[0];
  830.       (out+j)[1] = (ushort)in[i+1];
  831.       (out+j+2)[0] = (ushort)in[i+1];
  832.       (out+j+2)[1] = (ushort)in[i+2];
  833.       (out+j+4)[0] = (ushort)in[i+2];
  834.       (out+j+4)[1] = (ushort)in[0];
  835.    }
  836. }
  837. static void translate_quads_uint2ushort(
  838.     const void * _in,
  839.     unsigned start,
  840.     unsigned in_nr,
  841.     unsigned out_nr,
  842.     unsigned restart_index,
  843.     void *_out )
  844. {
  845.   const uint*in = (const uint*)_in;
  846.   ushort *out = (ushort*)_out;
  847.   unsigned i, j;
  848.   (void)j;
  849.   for (i = start, j = 0; j < out_nr; j+=8, i+=4) {
  850.       (out+j)[0] = (ushort)in[i+0];
  851.       (out+j)[1] = (ushort)in[i+1];
  852.       (out+j+2)[0] = (ushort)in[i+1];
  853.       (out+j+2)[1] = (ushort)in[i+2];
  854.       (out+j+4)[0] = (ushort)in[i+2];
  855.       (out+j+4)[1] = (ushort)in[i+3];
  856.       (out+j+6)[0] = (ushort)in[i+3];
  857.       (out+j+6)[1] = (ushort)in[i+0];
  858.    }
  859. }
  860. static void translate_quadstrip_uint2ushort(
  861.     const void * _in,
  862.     unsigned start,
  863.     unsigned in_nr,
  864.     unsigned out_nr,
  865.     unsigned restart_index,
  866.     void *_out )
  867. {
  868.   const uint*in = (const uint*)_in;
  869.   ushort *out = (ushort*)_out;
  870.   unsigned i, j;
  871.   (void)j;
  872.   for (i = start, j = 0; j < out_nr; j+=8, i+=2) {
  873.       (out+j)[0] = (ushort)in[i+2];
  874.       (out+j)[1] = (ushort)in[i+0];
  875.       (out+j+2)[0] = (ushort)in[i+0];
  876.       (out+j+2)[1] = (ushort)in[i+1];
  877.       (out+j+4)[0] = (ushort)in[i+1];
  878.       (out+j+4)[1] = (ushort)in[i+3];
  879.       (out+j+6)[0] = (ushort)in[i+3];
  880.       (out+j+6)[1] = (ushort)in[i+2];
  881.    }
  882. }
  883. static void translate_polygon_uint2ushort(
  884.     const void * _in,
  885.     unsigned start,
  886.     unsigned in_nr,
  887.     unsigned out_nr,
  888.     unsigned restart_index,
  889.     void *_out )
  890. {
  891.   const uint*in = (const uint*)_in;
  892.   ushort *out = (ushort*)_out;
  893.   unsigned i, j;
  894.   (void)j;
  895.   for (i = start, j = 0; j < out_nr; j+=2, i++) {
  896.       (out+j)[0] = (ushort)in[i];
  897.       (out+j)[1] = (ushort)in[(i+1)%(out_nr/2)];
  898.    }
  899. }
  900. static void translate_tris_uint2uint(
  901.     const void * _in,
  902.     unsigned start,
  903.     unsigned in_nr,
  904.     unsigned out_nr,
  905.     unsigned restart_index,
  906.     void *_out )
  907. {
  908.   const uint*in = (const uint*)_in;
  909.   uint *out = (uint*)_out;
  910.   unsigned i, j;
  911.   (void)j;
  912.   for (i = start, j = 0; j < out_nr; j+=6, i+=3) {
  913.       (out+j)[0] = (uint)in[i];
  914.       (out+j)[1] = (uint)in[i+1];
  915.       (out+j+2)[0] = (uint)in[i+1];
  916.       (out+j+2)[1] = (uint)in[i+2];
  917.       (out+j+4)[0] = (uint)in[i+2];
  918.       (out+j+4)[1] = (uint)in[i];
  919.    }
  920. }
  921. static void translate_tristrip_uint2uint(
  922.     const void * _in,
  923.     unsigned start,
  924.     unsigned in_nr,
  925.     unsigned out_nr,
  926.     unsigned restart_index,
  927.     void *_out )
  928. {
  929.   const uint*in = (const uint*)_in;
  930.   uint *out = (uint*)_out;
  931.   unsigned i, j;
  932.   (void)j;
  933.   for (i = start, j = 0; j < out_nr; j+=6, i++) {
  934.       (out+j)[0] = (uint)in[i];
  935.       (out+j)[1] = (uint)in[i+1/*+(i&1)*/];
  936.       (out+j+2)[0] = (uint)in[i+1/*+(i&1)*/];
  937.       (out+j+2)[1] = (uint)in[i+2/*-(i&1)*/];
  938.       (out+j+4)[0] = (uint)in[i+2/*-(i&1)*/];
  939.       (out+j+4)[1] = (uint)in[i];
  940.    }
  941. }
  942. static void translate_trifan_uint2uint(
  943.     const void * _in,
  944.     unsigned start,
  945.     unsigned in_nr,
  946.     unsigned out_nr,
  947.     unsigned restart_index,
  948.     void *_out )
  949. {
  950.   const uint*in = (const uint*)_in;
  951.   uint *out = (uint*)_out;
  952.   unsigned i, j;
  953.   (void)j;
  954.   for (i = start, j = 0; j < out_nr; j+=6, i++) {
  955.       (out+j)[0] = (uint)in[0];
  956.       (out+j)[1] = (uint)in[i+1];
  957.       (out+j+2)[0] = (uint)in[i+1];
  958.       (out+j+2)[1] = (uint)in[i+2];
  959.       (out+j+4)[0] = (uint)in[i+2];
  960.       (out+j+4)[1] = (uint)in[0];
  961.    }
  962. }
  963. static void translate_quads_uint2uint(
  964.     const void * _in,
  965.     unsigned start,
  966.     unsigned in_nr,
  967.     unsigned out_nr,
  968.     unsigned restart_index,
  969.     void *_out )
  970. {
  971.   const uint*in = (const uint*)_in;
  972.   uint *out = (uint*)_out;
  973.   unsigned i, j;
  974.   (void)j;
  975.   for (i = start, j = 0; j < out_nr; j+=8, i+=4) {
  976.       (out+j)[0] = (uint)in[i+0];
  977.       (out+j)[1] = (uint)in[i+1];
  978.       (out+j+2)[0] = (uint)in[i+1];
  979.       (out+j+2)[1] = (uint)in[i+2];
  980.       (out+j+4)[0] = (uint)in[i+2];
  981.       (out+j+4)[1] = (uint)in[i+3];
  982.       (out+j+6)[0] = (uint)in[i+3];
  983.       (out+j+6)[1] = (uint)in[i+0];
  984.    }
  985. }
  986. static void translate_quadstrip_uint2uint(
  987.     const void * _in,
  988.     unsigned start,
  989.     unsigned in_nr,
  990.     unsigned out_nr,
  991.     unsigned restart_index,
  992.     void *_out )
  993. {
  994.   const uint*in = (const uint*)_in;
  995.   uint *out = (uint*)_out;
  996.   unsigned i, j;
  997.   (void)j;
  998.   for (i = start, j = 0; j < out_nr; j+=8, i+=2) {
  999.       (out+j)[0] = (uint)in[i+2];
  1000.       (out+j)[1] = (uint)in[i+0];
  1001.       (out+j+2)[0] = (uint)in[i+0];
  1002.       (out+j+2)[1] = (uint)in[i+1];
  1003.       (out+j+4)[0] = (uint)in[i+1];
  1004.       (out+j+4)[1] = (uint)in[i+3];
  1005.       (out+j+6)[0] = (uint)in[i+3];
  1006.       (out+j+6)[1] = (uint)in[i+2];
  1007.    }
  1008. }
  1009. static void translate_polygon_uint2uint(
  1010.     const void * _in,
  1011.     unsigned start,
  1012.     unsigned in_nr,
  1013.     unsigned out_nr,
  1014.     unsigned restart_index,
  1015.     void *_out )
  1016. {
  1017.   const uint*in = (const uint*)_in;
  1018.   uint *out = (uint*)_out;
  1019.   unsigned i, j;
  1020.   (void)j;
  1021.   for (i = start, j = 0; j < out_nr; j+=2, i++) {
  1022.       (out+j)[0] = (uint)in[i];
  1023.       (out+j)[1] = (uint)in[(i+1)%(out_nr/2)];
  1024.    }
  1025. }
  1026. void u_unfilled_init( void )
  1027. {
  1028.   static int firsttime = 1;
  1029.   if (!firsttime) return;
  1030.   firsttime = 0;
  1031. generate_line[OUT_USHORT][PIPE_PRIM_TRIANGLES] = generate_tris_ushort;
  1032. generate_line[OUT_USHORT][PIPE_PRIM_TRIANGLE_FAN] = generate_trifan_ushort;
  1033. generate_line[OUT_USHORT][PIPE_PRIM_TRIANGLE_STRIP] = generate_tristrip_ushort;
  1034. generate_line[OUT_USHORT][PIPE_PRIM_QUADS] = generate_quads_ushort;
  1035. generate_line[OUT_USHORT][PIPE_PRIM_QUAD_STRIP] = generate_quadstrip_ushort;
  1036. generate_line[OUT_USHORT][PIPE_PRIM_POLYGON] = generate_polygon_ushort;
  1037. generate_line[OUT_UINT][PIPE_PRIM_TRIANGLES] = generate_tris_uint;
  1038. generate_line[OUT_UINT][PIPE_PRIM_TRIANGLE_FAN] = generate_trifan_uint;
  1039. generate_line[OUT_UINT][PIPE_PRIM_TRIANGLE_STRIP] = generate_tristrip_uint;
  1040. generate_line[OUT_UINT][PIPE_PRIM_QUADS] = generate_quads_uint;
  1041. generate_line[OUT_UINT][PIPE_PRIM_QUAD_STRIP] = generate_quadstrip_uint;
  1042. generate_line[OUT_UINT][PIPE_PRIM_POLYGON] = generate_polygon_uint;
  1043. translate_line[IN_UBYTE][OUT_USHORT][PIPE_PRIM_TRIANGLES] = translate_tris_ubyte2ushort;
  1044. translate_line[IN_UBYTE][OUT_USHORT][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ubyte2ushort;
  1045. translate_line[IN_UBYTE][OUT_USHORT][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ubyte2ushort;
  1046. translate_line[IN_UBYTE][OUT_USHORT][PIPE_PRIM_QUADS] = translate_quads_ubyte2ushort;
  1047. translate_line[IN_UBYTE][OUT_USHORT][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ubyte2ushort;
  1048. translate_line[IN_UBYTE][OUT_USHORT][PIPE_PRIM_POLYGON] = translate_polygon_ubyte2ushort;
  1049. translate_line[IN_UBYTE][OUT_UINT][PIPE_PRIM_TRIANGLES] = translate_tris_ubyte2uint;
  1050. translate_line[IN_UBYTE][OUT_UINT][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ubyte2uint;
  1051. translate_line[IN_UBYTE][OUT_UINT][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ubyte2uint;
  1052. translate_line[IN_UBYTE][OUT_UINT][PIPE_PRIM_QUADS] = translate_quads_ubyte2uint;
  1053. translate_line[IN_UBYTE][OUT_UINT][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ubyte2uint;
  1054. translate_line[IN_UBYTE][OUT_UINT][PIPE_PRIM_POLYGON] = translate_polygon_ubyte2uint;
  1055. translate_line[IN_USHORT][OUT_USHORT][PIPE_PRIM_TRIANGLES] = translate_tris_ushort2ushort;
  1056. translate_line[IN_USHORT][OUT_USHORT][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ushort2ushort;
  1057. translate_line[IN_USHORT][OUT_USHORT][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ushort2ushort;
  1058. translate_line[IN_USHORT][OUT_USHORT][PIPE_PRIM_QUADS] = translate_quads_ushort2ushort;
  1059. translate_line[IN_USHORT][OUT_USHORT][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ushort2ushort;
  1060. translate_line[IN_USHORT][OUT_USHORT][PIPE_PRIM_POLYGON] = translate_polygon_ushort2ushort;
  1061. translate_line[IN_USHORT][OUT_UINT][PIPE_PRIM_TRIANGLES] = translate_tris_ushort2uint;
  1062. translate_line[IN_USHORT][OUT_UINT][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ushort2uint;
  1063. translate_line[IN_USHORT][OUT_UINT][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ushort2uint;
  1064. translate_line[IN_USHORT][OUT_UINT][PIPE_PRIM_QUADS] = translate_quads_ushort2uint;
  1065. translate_line[IN_USHORT][OUT_UINT][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ushort2uint;
  1066. translate_line[IN_USHORT][OUT_UINT][PIPE_PRIM_POLYGON] = translate_polygon_ushort2uint;
  1067. translate_line[IN_UINT][OUT_USHORT][PIPE_PRIM_TRIANGLES] = translate_tris_uint2ushort;
  1068. translate_line[IN_UINT][OUT_USHORT][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_uint2ushort;
  1069. translate_line[IN_UINT][OUT_USHORT][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_uint2ushort;
  1070. translate_line[IN_UINT][OUT_USHORT][PIPE_PRIM_QUADS] = translate_quads_uint2ushort;
  1071. translate_line[IN_UINT][OUT_USHORT][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_uint2ushort;
  1072. translate_line[IN_UINT][OUT_USHORT][PIPE_PRIM_POLYGON] = translate_polygon_uint2ushort;
  1073. translate_line[IN_UINT][OUT_UINT][PIPE_PRIM_TRIANGLES] = translate_tris_uint2uint;
  1074. translate_line[IN_UINT][OUT_UINT][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_uint2uint;
  1075. translate_line[IN_UINT][OUT_UINT][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_uint2uint;
  1076. translate_line[IN_UINT][OUT_UINT][PIPE_PRIM_QUADS] = translate_quads_uint2uint;
  1077. translate_line[IN_UINT][OUT_UINT][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_uint2uint;
  1078. translate_line[IN_UINT][OUT_UINT][PIPE_PRIM_POLYGON] = translate_polygon_uint2uint;
  1079. }
  1080. #include "indices/u_unfilled_indices.c"
  1081.