~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/gallium/drivers/svga/svga_draw_arrays.c

  • Committer: mmach
  • Date: 2023-11-02 21:31:35 UTC
  • Revision ID: netbit73@gmail.com-20231102213135-18d4tzh7tj0uz752
2023-11-02 22:11:57

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
}
79
79
 
80
80
 
81
 
static boolean
 
81
static bool
82
82
compare(unsigned cached_nr, unsigned nr, unsigned type)
83
83
{
84
84
   if (type == U_GENERATE_REUSABLE)
90
90
 
91
91
static enum pipe_error
92
92
retrieve_or_generate_indices(struct svga_hwtnl *hwtnl,
93
 
                             enum pipe_prim_type prim,
 
93
                             enum mesa_prim prim,
94
94
                             unsigned gen_type,
95
95
                             unsigned gen_nr,
96
96
                             unsigned gen_size,
174
174
 
175
175
static enum pipe_error
176
176
simple_draw_arrays(struct svga_hwtnl *hwtnl,
177
 
                   enum pipe_prim_type prim, unsigned start, unsigned count,
 
177
                   enum mesa_prim prim, unsigned start, unsigned count,
178
178
                   unsigned start_instance, unsigned instance_count,
179
 
                   ubyte vertices_per_patch)
 
179
                   uint8_t vertices_per_patch)
180
180
{
181
181
   SVGA3dPrimitiveRange range;
182
182
   unsigned hw_prim;
208
208
 
209
209
enum pipe_error
210
210
svga_hwtnl_draw_arrays(struct svga_hwtnl *hwtnl,
211
 
                       enum pipe_prim_type prim, unsigned start, unsigned count,
 
211
                       enum mesa_prim prim, unsigned start, unsigned count,
212
212
                       unsigned start_instance, unsigned instance_count,
213
 
                       ubyte vertices_per_patch)
 
213
                       uint8_t vertices_per_patch)
214
214
{
215
 
   enum pipe_prim_type gen_prim;
 
215
   enum mesa_prim gen_prim;
216
216
   unsigned gen_size, gen_nr;
217
217
   enum indices_mode gen_type;
218
218
   u_generate_func gen_func;
242
242
          * supported by the svga device.  Also note, we can only do this
243
243
          * for flat/constant-colored rendering because of provoking vertex.
244
244
          */
245
 
         if (prim == PIPE_PRIM_POLYGON) {
246
 
            prim = PIPE_PRIM_TRIANGLE_FAN;
 
245
         if (prim == MESA_PRIM_POLYGON) {
 
246
            prim = MESA_PRIM_TRIANGLE_FAN;
247
247
         }
248
 
         else if (prim == PIPE_PRIM_QUADS && count == 4) {
249
 
            prim = PIPE_PRIM_TRIANGLE_FAN;
 
248
         else if (prim == MESA_PRIM_QUADS && count == 4) {
 
249
            prim = MESA_PRIM_TRIANGLE_FAN;
250
250
         }
251
251
      }
252
252
   }
261
261
                                      &gen_size, &gen_nr, &gen_func);
262
262
   }
263
263
   else {
264
 
      /* Convert PIPE_PRIM_LINE_LOOP to PIPE_PRIM_LINESTRIP,
265
 
       * convert PIPE_PRIM_POLYGON to PIPE_PRIM_TRIANGLE_FAN,
 
264
      /* Convert MESA_PRIM_LINE_LOOP to MESA_PRIM_LINESTRIP,
 
265
       * convert MESA_PRIM_POLYGON to MESA_PRIM_TRIANGLE_FAN,
266
266
       * etc, if needed (as determined by svga_hw_prims mask).
267
267
       */
268
268
      gen_type = u_index_generator(svga_hw_prims,