• Home
  • Raw
  • Download

Lines Matching refs:draw

57 draw_pt_arrays(struct draw_context *draw,  in draw_pt_arrays()  argument
69 if (draw->gs.geometry_shader) in draw_pt_arrays()
70 out_prim = draw->gs.geometry_shader->output_primitive; in draw_pt_arrays()
71 else if (draw->tes.tess_eval_shader) in draw_pt_arrays()
72 out_prim = get_tes_output_prim(draw->tes.tess_eval_shader); in draw_pt_arrays()
74 if (!draw->render) { in draw_pt_arrays()
78 if (draw_need_pipeline(draw, in draw_pt_arrays()
79 draw->rasterizer, in draw_pt_arrays()
84 if ((draw->clip_xy || in draw_pt_arrays()
85 draw->clip_z || in draw_pt_arrays()
86 draw->clip_user) && !draw->pt.test_fse) { in draw_pt_arrays()
90 if (draw->pt.middle.llvm) { in draw_pt_arrays()
91 middle = draw->pt.middle.llvm; in draw_pt_arrays()
93 if (opt == PT_SHADE && !draw->pt.no_fse) in draw_pt_arrays()
94 middle = draw->pt.middle.fetch_shade_emit; in draw_pt_arrays()
96 middle = draw->pt.middle.general; in draw_pt_arrays()
99 frontend = draw->pt.frontend; in draw_pt_arrays()
102 if (draw->pt.prim != prim || draw->pt.opt != opt) { in draw_pt_arrays()
108 draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE ); in draw_pt_arrays()
110 } else if (draw->pt.eltSize != draw->pt.user.eltSize) { in draw_pt_arrays()
122 frontend = draw->pt.front.vsplit; in draw_pt_arrays()
126 draw->pt.frontend = frontend; in draw_pt_arrays()
127 draw->pt.eltSize = draw->pt.user.eltSize; in draw_pt_arrays()
128 draw->pt.prim = prim; in draw_pt_arrays()
129 draw->pt.opt = opt; in draw_pt_arrays()
132 if (draw->pt.rebind_parameters) { in draw_pt_arrays()
135 draw->pt.rebind_parameters = FALSE; in draw_pt_arrays()
146 first = draw->pt.vertices_per_patch; in draw_pt_arrays()
147 incr = draw->pt.vertices_per_patch; in draw_pt_arrays()
151 draw->pt.user.eltBias = draw->pt.user.eltSize ? in draw_pt_arrays()
157 if (draw->pt.user.increment_draw_id) in draw_pt_arrays()
158 draw->pt.user.drawid++; in draw_pt_arrays()
164 void draw_pt_flush( struct draw_context *draw, unsigned flags ) in draw_pt_flush() argument
168 if (draw->pt.frontend) { in draw_pt_flush()
169 draw->pt.frontend->flush( draw->pt.frontend, flags ); in draw_pt_flush()
173 draw->pt.frontend = NULL; in draw_pt_flush()
177 draw->pt.rebind_parameters = TRUE; in draw_pt_flush()
183 boolean draw_pt_init( struct draw_context *draw ) in draw_pt_init() argument
185 draw->pt.test_fse = debug_get_option_draw_fse(); in draw_pt_init()
186 draw->pt.no_fse = debug_get_option_draw_no_fse(); in draw_pt_init()
188 draw->pt.front.vsplit = draw_pt_vsplit(draw); in draw_pt_init()
189 if (!draw->pt.front.vsplit) in draw_pt_init()
192 draw->pt.middle.fetch_shade_emit = draw_pt_middle_fse( draw ); in draw_pt_init()
193 if (!draw->pt.middle.fetch_shade_emit) in draw_pt_init()
196 draw->pt.middle.general = draw_pt_fetch_pipeline_or_emit( draw ); in draw_pt_init()
197 if (!draw->pt.middle.general) in draw_pt_init()
201 if (draw->llvm) in draw_pt_init()
202 draw->pt.middle.llvm = draw_pt_fetch_pipeline_or_emit_llvm( draw ); in draw_pt_init()
209 void draw_pt_destroy( struct draw_context *draw ) in draw_pt_destroy() argument
211 if (draw->pt.middle.llvm) { in draw_pt_destroy()
212 draw->pt.middle.llvm->destroy( draw->pt.middle.llvm ); in draw_pt_destroy()
213 draw->pt.middle.llvm = NULL; in draw_pt_destroy()
216 if (draw->pt.middle.general) { in draw_pt_destroy()
217 draw->pt.middle.general->destroy( draw->pt.middle.general ); in draw_pt_destroy()
218 draw->pt.middle.general = NULL; in draw_pt_destroy()
221 if (draw->pt.middle.fetch_shade_emit) { in draw_pt_destroy()
222 draw->pt.middle.fetch_shade_emit->destroy( draw->pt.middle.fetch_shade_emit ); in draw_pt_destroy()
223 draw->pt.middle.fetch_shade_emit = NULL; in draw_pt_destroy()
226 if (draw->pt.front.vsplit) { in draw_pt_destroy()
227 draw->pt.front.vsplit->destroy( draw->pt.front.vsplit ); in draw_pt_destroy()
228 draw->pt.front.vsplit = NULL; in draw_pt_destroy()
237 draw_print_arrays(struct draw_context *draw, uint prim, int start, uint count, int index_bias) in draw_print_arrays() argument
248 if (draw->pt.user.eltSize) { in draw_print_arrays()
251 switch (draw->pt.user.eltSize) { in draw_print_arrays()
254 const ubyte *elem = (const ubyte *) draw->pt.user.elts; in draw_print_arrays()
260 const ushort *elem = (const ushort *) draw->pt.user.elts; in draw_print_arrays()
266 const uint *elem = (const uint *) draw->pt.user.elts; in draw_print_arrays()
284 for (j = 0; j < draw->pt.nr_vertex_elements; j++) { in draw_print_arrays()
285 uint buf = draw->pt.vertex_element[j].vertex_buffer_index; in draw_print_arrays()
286 ubyte *ptr = (ubyte *) draw->pt.user.vbuffer[buf].map; in draw_print_arrays()
288 if (draw->pt.vertex_element[j].instance_divisor) { in draw_print_arrays()
289 ii = draw->instance_id / draw->pt.vertex_element[j].instance_divisor; in draw_print_arrays()
292 ptr += draw->pt.vertex_buffer[buf].buffer_offset; in draw_print_arrays()
293 ptr += draw->pt.vertex_buffer[buf].stride * ii; in draw_print_arrays()
294 ptr += draw->pt.vertex_element[j].src_offset; in draw_print_arrays()
297 switch (draw->pt.vertex_element[j].src_format) { in draw_print_arrays()
339 util_format_name(draw->pt.vertex_element[j].src_format)); in draw_print_arrays()
348 prim_restart_loop(struct draw_context *draw, in prim_restart_loop() argument
353 const unsigned elt_max = draw->pt.user.eltMax; in prim_restart_loop()
364 switch (draw->pt.user.eltSize) { in prim_restart_loop()
381 draw_pt_arrays(draw, info->mode, info->index_bias_varies, &cur, 1); in prim_restart_loop()
392 draw_pt_arrays(draw, info->mode, info->index_bias_varies, &cur, 1); in prim_restart_loop()
402 draw_pt_arrays_restart(struct draw_context *draw, in draw_pt_arrays_restart() argument
411 if (draw->pt.user.eltSize) { in draw_pt_arrays_restart()
414 prim_restart_loop(draw, info, &draw_info[i], draw->pt.user.elts); in draw_pt_arrays_restart()
420 draw_pt_arrays(draw, prim, info->index_bias_varies, draw_info, num_draws); in draw_pt_arrays_restart()
436 struct pipe_draw_start_count_bias *draw, in resolve_draw_info() argument
440 memcpy(draw, raw_draw, sizeof(struct pipe_draw_start_count_bias)); in resolve_draw_info()
445 draw->count = vertex_buffer->stride == 0 ? 0 : in resolve_draw_info()
450 info->max_index = draw->count - 1; in resolve_draw_info()
457 draw_instances(struct draw_context *draw, in draw_instances() argument
465 draw->start_instance = info->start_instance; in draw_instances()
469 draw->instance_id = instance; in draw_instances()
472 instance_idx < draw->start_instance) { in draw_instances()
474 draw->instance_id = 0xffffffff; in draw_instances()
477 draw->pt.user.drawid = drawid_offset; in draw_instances()
478 draw_new_instance(draw); in draw_instances()
481 draw_pt_arrays_restart(draw, info, draws, num_draws); in draw_instances()
484 draw_pt_arrays(draw, info->mode, info->index_bias_varies, draws, num_draws); in draw_instances()
496 draw_vbo(struct draw_context *draw, in draw_vbo() argument
521 &resolved_draw, &(draw->pt.vertex_buffer[0])); in draw_vbo()
528 assert(draw->pt.user.elts); in draw_vbo()
530 draw->pt.user.min_index = use_info->index_bounds_valid ? use_info->min_index : 0; in draw_vbo()
531 draw->pt.user.max_index = use_info->index_bounds_valid ? use_info->max_index : ~0; in draw_vbo()
532 draw->pt.user.eltSize = use_info->index_size ? draw->pt.user.eltSizeIB : 0; in draw_vbo()
533 draw->pt.user.drawid = drawid_offset; in draw_vbo()
534 draw->pt.user.increment_draw_id = use_info->increment_draw_id; in draw_vbo()
535 draw->pt.user.viewid = 0; in draw_vbo()
536 draw->pt.vertices_per_patch = patch_vertices; in draw_vbo()
545 tgsi_dump(draw->vs.vertex_shader->state.tokens, 0); in draw_vbo()
550 for (i = 0; i < draw->pt.nr_vertex_elements; i++) { in draw_vbo()
553 draw->pt.vertex_element[i].src_offset, in draw_vbo()
554 draw->pt.vertex_element[i].instance_divisor, in draw_vbo()
555 draw->pt.vertex_element[i].vertex_buffer_index, in draw_vbo()
556 util_format_name(draw->pt.vertex_element[i].src_format)); in draw_vbo()
559 for (i = 0; i < draw->pt.nr_vertex_buffers; i++) { in draw_vbo()
562 draw->pt.vertex_buffer[i].stride, in draw_vbo()
563 draw->pt.vertex_buffer[i].buffer_offset, in draw_vbo()
564 (int) draw->pt.user.vbuffer[i].size, in draw_vbo()
565 draw->pt.user.vbuffer[i].map); in draw_vbo()
571 draw_print_arrays(draw, use_info->mode, use_draws[i].start, MIN2(use_draws[i].count, 20), in draw_vbo()
575 index_limit = util_draw_max_index(draw->pt.vertex_buffer, in draw_vbo()
576 draw->pt.vertex_element, in draw_vbo()
577 draw->pt.nr_vertex_elements, in draw_vbo()
580 if (!draw->llvm) in draw_vbo()
592 if (draw->collect_statistics) { in draw_vbo()
593 memset(&draw->statistics, 0, sizeof(draw->statistics)); in draw_vbo()
596 draw->pt.max_index = index_limit - 1; in draw_vbo()
597 draw->start_index = use_draws[0].start; in draw_vbo()
606 draw->pt.user.viewid = i; in draw_vbo()
607 draw_instances(draw, drawid_offset, use_info, use_draws, num_draws); in draw_vbo()
610 draw_instances(draw, drawid_offset, use_info, use_draws, num_draws); in draw_vbo()
613 if (draw->collect_statistics) { in draw_vbo()
614 draw->render->pipeline_statistics(draw->render, &draw->statistics); in draw_vbo()