~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/gallium/frontends/d3d10umd/Draw.cpp

  • 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:
66
66
       pDevice->bound_vs->state.tokens) {
67
67
      Shader *gs = pDevice->bound_empty_gs;
68
68
      Shader *vs = pDevice->bound_vs;
69
 
      boolean remapped = FALSE;
 
69
      bool remapped = false;
70
70
      struct pipe_context *pipe = pDevice->pipe;
71
71
      if (!gs->output_resolved) {
72
72
         for (unsigned i = 0; i < gs->state.stream_output.num_outputs; ++i) {
74
74
               ShaderFindOutputMapping(vs, gs->state.stream_output.output[i].register_index);
75
75
            if (mapping != gs->state.stream_output.output[i].register_index) {
76
76
               gs->state.stream_output.output[i].register_index = mapping;
77
 
               remapped = TRUE;
 
77
               remapped = true;
78
78
            }
79
79
         }
80
80
         if (remapped) {
81
81
            pipe->delete_gs_state(pipe, gs->handle);
82
82
            gs->handle = pipe->create_gs_state(pipe, &gs->state);
83
83
         }
84
 
         gs->output_resolved = TRUE;
 
84
         gs->output_resolved = true;
85
85
      }
86
86
      pipe->bind_gs_state(pipe, gs->handle);
87
87
   }
133
133
 
134
134
   ResolveState(pDevice);
135
135
 
136
 
   assert(pDevice->primitive < PIPE_PRIM_MAX);
 
136
   assert(pDevice->primitive < MESA_PRIM_COUNT);
137
137
   util_draw_arrays(pDevice->pipe,
138
138
                    pDevice->primitive,
139
139
                    StartVertexLocation,
167
167
   unsigned index_size = pDevice->index_size;
168
168
   unsigned ib_offset = pDevice->ib_offset;
169
169
 
170
 
   assert(pDevice->primitive < PIPE_PRIM_MAX);
 
170
   assert(pDevice->primitive < MESA_PRIM_COUNT);
171
171
 
172
172
   /* XXX I don't think draw still needs this? */
173
173
   if (!pDevice->index_buffer) {
186
186
   draw.count = IndexCount;
187
187
   info.index.resource = null_ib ? null_ib : pDevice->index_buffer;
188
188
   draw.index_bias = BaseVertexLocation;
189
 
   info.primitive_restart = TRUE;
 
189
   info.primitive_restart = true;
190
190
   info.restart_index = restart_index;
191
191
 
192
192
   pDevice->pipe->draw_vbo(pDevice->pipe, &info, 0, NULL, &draw, 1);
225
225
 
226
226
   ResolveState(pDevice);
227
227
 
228
 
   assert(pDevice->primitive < PIPE_PRIM_MAX);
 
228
   assert(pDevice->primitive < MESA_PRIM_COUNT);
229
229
   util_draw_arrays_instanced(pDevice->pipe,
230
230
                              pDevice->primitive,
231
231
                              StartVertexLocation,
264
264
   unsigned index_size = pDevice->index_size;
265
265
   unsigned ib_offset = pDevice->ib_offset;
266
266
 
267
 
   assert(pDevice->primitive < PIPE_PRIM_MAX);
 
267
   assert(pDevice->primitive < MESA_PRIM_COUNT);
268
268
 
269
269
   if (!InstanceCount) {
270
270
      return;
289
289
   draw.index_bias = BaseVertexLocation;
290
290
   info.start_instance = StartInstanceLocation;
291
291
   info.instance_count = InstanceCount;
292
 
   info.primitive_restart = TRUE;
 
292
   info.primitive_restart = true;
293
293
   info.restart_index = restart_index;
294
294
 
295
295
   pDevice->pipe->draw_vbo(pDevice->pipe, &info, 0, NULL, &draw, 1);
330
330
      return;
331
331
   }
332
332
 
333
 
   assert(pDevice->primitive < PIPE_PRIM_MAX);
 
333
   assert(pDevice->primitive < MESA_PRIM_COUNT);
334
334
 
335
335
   ResolveState(pDevice);
336
336