/external/mesa3d/src/mesa/vbo/ |
D | vbo_split_inplace.c | 46 const struct _mesa_prim *prim; member 115 struct _mesa_prim *prim = &split->dstprim[split->dstprim_nr++]; in next_outprim() local 116 memset(prim, 0, sizeof(*prim)); in next_outprim() 117 return prim; in next_outprim() 122 const struct _mesa_prim *prim) in update_index_bounds() argument 124 split->min_index = MIN2(split->min_index, prim->start); in update_index_bounds() 125 split->max_index = MAX2(split->max_index, prim->start + prim->count - 1); in update_index_bounds() 133 const struct _mesa_prim *prim) in get_max_vertices() argument 135 if ((prim->start > split->min_index && in get_max_vertices() 136 prim->start - split->min_index >= split->limit) || in get_max_vertices() [all …]
|
D | vbo_exec.c | 108 count_tessellated_primitives(const struct _mesa_prim *prim) in count_tessellated_primitives() argument 111 switch (prim->mode) { in count_tessellated_primitives() 113 num_primitives = prim->count; in count_tessellated_primitives() 116 num_primitives = prim->count >= 2 ? prim->count - 1 : 0; in count_tessellated_primitives() 119 num_primitives = prim->count >= 2 ? prim->count : 0; in count_tessellated_primitives() 122 num_primitives = prim->count / 2; in count_tessellated_primitives() 127 num_primitives = prim->count >= 3 ? prim->count - 2 : 0; in count_tessellated_primitives() 130 num_primitives = prim->count / 3; in count_tessellated_primitives() 133 num_primitives = prim->count >= 4 ? ((prim->count / 2) - 1) * 2 : 0; in count_tessellated_primitives() 136 num_primitives = (prim->count / 4) * 2; in count_tessellated_primitives() [all …]
|
D | vbo_save_loopback.c | 89 const struct _mesa_prim *prim, in loopback_prim() argument 94 GLint start = prim->start; in loopback_prim() 95 GLint end = start + prim->count; in loopback_prim() 102 _mesa_lookup_prim_by_nr(prim->mode), in loopback_prim() 103 prim->begin ? "begin" : "..", in loopback_prim() 104 prim->end ? "end" : "..", in loopback_prim() 108 if (prim->begin) { in loopback_prim() 109 CALL_Begin(GET_DISPATCH(), ( prim->mode )); in loopback_prim() 132 if (prim->end) { in loopback_prim() 143 const struct _mesa_prim *prim ) in loopback_weak_prim() argument [all …]
|
D | vbo_exec_array.c | 88 const struct _mesa_prim *prim, in vbo_get_minmax_index() argument 99 indices = (char *) ib->ptr + prim->start * index_size; in vbo_get_minmax_index() 554 const struct _mesa_prim *prim, in vbo_handle_primitive_restart() argument 567 vbo_sw_primitive_restart(ctx, prim, nr_prims, ib); in vbo_handle_primitive_restart() 570 vbo->draw_prims(ctx, prim, nr_prims, ib, in vbo_handle_primitive_restart() 588 struct _mesa_prim prim[2]; in vbo_draw_arrays() local 593 memset(prim, 0, sizeof(prim)); in vbo_draw_arrays() 594 prim[0].begin = 1; in vbo_draw_arrays() 595 prim[0].end = 1; in vbo_draw_arrays() 596 prim[0].mode = mode; in vbo_draw_arrays() [all …]
|
D | vbo_split_copy.c | 54 const struct _mesa_prim *prim; member 229 struct _mesa_prim *prim = ©->dstprim[copy->dstprim_nr]; in begin() local 231 prim->mode = mode; in begin() 232 prim->begin = begin_flag; in begin() 233 prim->num_instances = 1; in begin() 310 struct _mesa_prim *prim = ©->dstprim[copy->dstprim_nr]; in end() local 314 prim->end = end_flag; in end() 315 prim->count = copy->dstelt_nr - prim->start; in end() 330 const struct _mesa_prim *prim = ©->prim[i]; in replay_elts() local 331 const GLuint start = prim->start; in replay_elts() [all …]
|
D | vbo_save_api.c | 109 const struct _mesa_prim *prim = &node->prim[node->prim_count - 1]; in _save_copy_vertices() local 110 GLuint nr = prim->count; in _save_copy_vertices() 112 const GLfloat *src = src_buffer + prim->start * sz; in _save_copy_vertices() 116 if (prim->end) in _save_copy_vertices() 119 switch (prim->mode) { in _save_copy_vertices() 290 save->prim = save->prim_store->buffer + save->prim_store->used; in _save_reset_counters() 337 node->prim = save->prim; in _save_compile_vertex_list() 345 if (node->prim[0].no_current_update) { in _save_compile_vertex_list() 397 node->attrsz, node->prim, node->prim_count, in _save_compile_vertex_list() 455 save->prim[i].count = (save->vert_count - save->prim[i].start); in _save_wrap_buffers() [all …]
|
D | vbo_rebase.c | 120 const struct _mesa_prim *prim, in vbo_rebase_prims() argument 149 tmp_prims = (struct _mesa_prim *)malloc(sizeof(*prim) * nr_prims); in vbo_rebase_prims() 152 tmp_prims[i] = prim[i]; in vbo_rebase_prims() 156 prim = tmp_prims; in vbo_rebase_prims() 198 tmp_prims = (struct _mesa_prim *)malloc(sizeof(*prim) * nr_prims); in vbo_rebase_prims() 203 assert(prim[i].start >= min_index); in vbo_rebase_prims() 205 tmp_prims[i] = prim[i]; in vbo_rebase_prims() 209 prim = tmp_prims; in vbo_rebase_prims() 234 prim, in vbo_rebase_prims()
|
D | vbo_split.c | 103 const struct _mesa_prim *prim, in vbo_split_prims() argument 111 GLint max_basevertex = prim->basevertex; in vbo_split_prims() 115 max_basevertex = MAX2(max_basevertex, prim[i].basevertex); in vbo_split_prims() 137 vbo_split_copy(ctx, arrays, prim, nr_prims, ib, in vbo_split_prims() 145 vbo_split_inplace(ctx, arrays, prim, nr_prims, ib, in vbo_split_prims() 159 vbo_split_inplace(ctx, arrays, prim, nr_prims, ib, in vbo_split_prims()
|
/external/mesa3d/src/gallium/auxiliary/indices/ |
D | u_indices.c | 44 unsigned prim, in u_index_translator() argument 64 if ((hw_mask & (1<<prim)) && in u_index_translator() 73 *out_prim = prim; in u_index_translator() 79 switch (prim) { in u_index_translator() 81 *out_translate = translate[in_idx][out_idx][in_pv][out_pv][prim]; in u_index_translator() 87 *out_translate = translate[in_idx][out_idx][in_pv][out_pv][prim]; in u_index_translator() 93 *out_translate = translate[in_idx][out_idx][in_pv][out_pv][prim]; in u_index_translator() 99 *out_translate = translate[in_idx][out_idx][in_pv][out_pv][prim]; in u_index_translator() 105 *out_translate = translate[in_idx][out_idx][in_pv][out_pv][prim]; in u_index_translator() 111 *out_translate = translate[in_idx][out_idx][in_pv][out_pv][prim]; in u_index_translator() [all …]
|
D | u_unfilled_gen.py | 120 def name(intype, outtype, prim): argument 122 return 'generate_' + prim + '_' + outtype 124 return 'translate_' + prim + '_' + intype + '2' + outtype 126 def preamble(intype, outtype, prim): argument 127 print 'static void ' + name( intype, outtype, prim ) + '(' 144 preamble(intype, outtype, prim='tris') 152 preamble(intype, outtype, prim='tristrip') 160 preamble(intype, outtype, prim='trifan') 169 preamble(intype, outtype, prim='polygon') 177 preamble(intype, outtype, prim='quads') [all …]
|
D | u_indices_gen.py | 146 def name(intype, outtype, inpv, outpv, prim): argument 148 return 'generate_' + prim + '_' + outtype + '_' + inpv + '2' + outpv 150 return 'translate_' + prim + '_' + intype + '2' + outtype + '_' + inpv + '2' + outpv 152 def preamble(intype, outtype, inpv, outpv, prim): argument 153 print 'static void ' + name( intype, outtype, inpv, outpv, prim ) + '(' 170 preamble(intype, outtype, inpv, outpv, prim='points') 177 preamble(intype, outtype, inpv, outpv, prim='lines') 184 preamble(intype, outtype, inpv, outpv, prim='linestrip') 191 preamble(intype, outtype, inpv, outpv, prim='lineloop') 199 preamble(intype, outtype, inpv, outpv, prim='tris') [all …]
|
D | u_unfilled_indices.c | 79 static unsigned nr_lines( unsigned prim, in nr_lines() argument 82 switch (prim) { in nr_lines() 103 int u_unfilled_translator( unsigned prim, in u_unfilled_translator() argument 147 *out_translate = translate_line[in_idx][out_idx][prim]; in u_unfilled_translator() 148 *out_nr = nr_lines( prim, nr ); in u_unfilled_translator() 155 int u_unfilled_generator( unsigned prim, in u_unfilled_generator() argument 185 *out_generate = generate_line[out_idx][prim]; in u_unfilled_generator() 186 *out_nr = nr_lines( prim, nr ); in u_unfilled_generator()
|
/external/mesa3d/src/mesa/drivers/dri/i965/ |
D | brw_draw.c | 89 const struct _mesa_prim *prim) in brw_set_prim() argument 92 uint32_t hw_prim = prim_to_hw_prim[prim->mode]; in brw_set_prim() 94 DBG("PRIM: %s\n", _mesa_lookup_enum_by_nr(prim->mode)); in brw_set_prim() 98 if (prim->mode == GL_QUAD_STRIP && in brw_set_prim() 104 if (prim->mode == GL_QUADS && prim->count == 4 && in brw_set_prim() 115 if (reduced_prim[prim->mode] != brw->intel.reduced_primitive) { in brw_set_prim() 116 brw->intel.reduced_primitive = reduced_prim[prim->mode]; in brw_set_prim() 123 const struct _mesa_prim *prim) in gen6_set_prim() argument 127 DBG("PRIM: %s\n", _mesa_lookup_enum_by_nr(prim->mode)); in gen6_set_prim() 129 hw_prim = prim_to_hw_prim[prim->mode]; in gen6_set_prim() [all …]
|
D | brw_primitive_restart.c | 77 const struct _mesa_prim *prim, in can_cut_index_handle_prims() argument 101 switch(prim->mode) { in can_cut_index_handle_prims() 131 const struct _mesa_prim *prim, in brw_handle_primitive_restart() argument 169 if (can_cut_index_handle_prims(ctx, prim, nr_prims, ib)) { in brw_handle_primitive_restart() 173 brw_draw_prims(ctx, prim, nr_prims, ib, GL_FALSE, -1, -1, NULL); in brw_handle_primitive_restart() 179 vbo_sw_primitive_restart(ctx, prim, nr_prims, ib); in brw_handle_primitive_restart()
|
/external/mesa3d/src/gallium/drivers/svga/ |
D | svga_draw_arrays.c | 95 unsigned prim, in retrieve_or_generate_indices() argument 106 if (hwtnl->index_cache[prim][i].buffer != NULL && in retrieve_or_generate_indices() 107 hwtnl->index_cache[prim][i].generate == generate) in retrieve_or_generate_indices() 109 if (compare(hwtnl->index_cache[prim][i].gen_nr, gen_nr, gen_type)) in retrieve_or_generate_indices() 112 hwtnl->index_cache[prim][i].buffer ); in retrieve_or_generate_indices() 121 pipe_resource_reference( &hwtnl->index_cache[prim][i].buffer, in retrieve_or_generate_indices() 126 i, hwtnl->index_cache[prim][i].gen_nr); in retrieve_or_generate_indices() 139 if (hwtnl->index_cache[prim][i].buffer == NULL) in retrieve_or_generate_indices() 144 else if (hwtnl->index_cache[prim][i].gen_nr < smallest) in retrieve_or_generate_indices() 147 smallest_size = hwtnl->index_cache[prim][i].gen_nr; in retrieve_or_generate_indices() [all …]
|
/external/mesa3d/src/mesa/drivers/dri/i915/ |
D | intel_tris.c | 60 static void intelRenderPrimitive(struct gl_context * ctx, GLenum prim); 67 GLuint used = intel->batch.used - intel->prim.start_ptr; in intel_flush_inline_primitive() 69 assert(intel->prim.primitive != ~0); in intel_flush_inline_primitive() 76 intel->batch.map[intel->prim.start_ptr] = in intel_flush_inline_primitive() 77 _3DPRIMITIVE | intel->prim.primitive | (used - 2); in intel_flush_inline_primitive() 82 intel->batch.used = intel->prim.start_ptr; in intel_flush_inline_primitive() 85 intel->prim.primitive = ~0; in intel_flush_inline_primitive() 86 intel->prim.start_ptr = 0; in intel_flush_inline_primitive() 87 intel->prim.flush = 0; in intel_flush_inline_primitive() 90 static void intel_start_inline(struct intel_context *intel, uint32_t prim) in intel_start_inline() argument [all …]
|
D | intel_render.c | 113 intelDmaPrimitive(struct intel_context *intel, GLenum prim) in intelDmaPrimitive() argument 116 fprintf(stderr, "%s %s\n", __FUNCTION__, _mesa_lookup_enum_by_nr(prim)); in intelDmaPrimitive() 118 intel->vtbl.reduced_primitive_state(intel, reduced_prim[prim]); in intelDmaPrimitive() 119 intel_set_prim(intel, hw_prim[prim]); in intelDmaPrimitive() 144 ret = (INTEL_VB_SIZE - intel->prim.current_offset); in intel_get_current_max() 150 #define INIT( prim ) \ argument 152 intelDmaPrimitive( intel, prim ); \ 188 GLuint prim = VB->Primitive[i].mode; in choose_render() local 195 nr_rverts += length * scale_prim[prim & PRIM_MODE_MASK]; in choose_render() 197 if (reduced_prim[prim & PRIM_MODE_MASK] != rprim) { in choose_render() [all …]
|
/external/mesa3d/src/mesa/state_tracker/ |
D | st_cb_feedback.c | 119 feedback_tri( struct draw_stage *stage, struct prim_header *prim ) in feedback_tri() argument 125 feedback_vertex(fs->ctx, draw, prim->v[0]); in feedback_tri() 126 feedback_vertex(fs->ctx, draw, prim->v[1]); in feedback_tri() 127 feedback_vertex(fs->ctx, draw, prim->v[2]); in feedback_tri() 132 feedback_line( struct draw_stage *stage, struct prim_header *prim ) in feedback_line() argument 143 feedback_vertex(fs->ctx, draw, prim->v[0]); in feedback_line() 144 feedback_vertex(fs->ctx, draw, prim->v[1]); in feedback_line() 149 feedback_point( struct draw_stage *stage, struct prim_header *prim ) in feedback_point() argument 154 feedback_vertex(fs->ctx, draw, prim->v[0]); in feedback_point() 207 select_tri( struct draw_stage *stage, struct prim_header *prim ) in select_tri() argument [all …]
|
D | st_cb_rasterpos.c | 66 struct _mesa_prim prim; member 89 rastpos_tri( struct draw_stage *stage, struct prim_header *prim ) in rastpos_tri() argument 96 rastpos_line( struct draw_stage *stage, struct prim_header *prim ) in rastpos_line() argument 133 rastpos_point(struct draw_stage *stage, struct prim_header *prim) in rastpos_point() argument 147 pos = prim->v[0]->data[0]; in rastpos_point() 157 update_attrib(ctx, outputMapping, prim->v[0], in rastpos_point() 161 update_attrib(ctx, outputMapping, prim->v[0], in rastpos_point() 166 update_attrib(ctx, outputMapping, prim->v[0], in rastpos_point() 210 rs->prim.mode = GL_POINTS; in new_draw_rastpos_stage() 211 rs->prim.indexed = 0; in new_draw_rastpos_stage() [all …]
|
/external/mesa3d/src/gallium/auxiliary/draw/ |
D | draw_pipe.c | 117 struct prim_header prim; in do_point() local 119 prim.flags = 0; in do_point() 120 prim.pad = 0; in do_point() 121 prim.v[0] = (struct vertex_header *)v0; in do_point() 123 draw->pipeline.first->point( draw->pipeline.first, &prim ); in do_point() 136 struct prim_header prim; in do_line() local 138 prim.flags = flags; in do_line() 139 prim.pad = 0; in do_line() 140 prim.v[0] = (struct vertex_header *)v0; in do_line() 141 prim.v[1] = (struct vertex_header *)v1; in do_line() [all …]
|
D | draw_pipe_validate.c | 39 static boolean points( unsigned prim ) in points() argument 41 return (prim == PIPE_PRIM_POINTS); in points() 44 static boolean lines( unsigned prim ) in lines() argument 46 return (prim == PIPE_PRIM_LINES || in lines() 47 prim == PIPE_PRIM_LINE_STRIP || in lines() 48 prim == PIPE_PRIM_LINE_LOOP); in lines() 51 static boolean triangles( unsigned prim ) in triangles() argument 53 return prim >= PIPE_PRIM_TRIANGLES; in triangles() 67 unsigned int prim ) in draw_need_pipeline() argument 76 prim ); in draw_need_pipeline() [all …]
|
D | draw_pipe_vbuf.c | 155 struct prim_header *prim ) in vbuf_tri() argument 163 vbuf->indices[vbuf->nr_indices++] = emit_vertex( vbuf, prim->v[i] ); in vbuf_tri() 170 struct prim_header *prim ) in vbuf_line() argument 178 vbuf->indices[vbuf->nr_indices++] = emit_vertex( vbuf, prim->v[i] ); in vbuf_line() 185 struct prim_header *prim ) in vbuf_point() argument 191 vbuf->indices[vbuf->nr_indices++] = emit_vertex( vbuf, prim->v[0] ); in vbuf_point() 203 vbuf_start_prim( struct vbuf_stage *vbuf, uint prim ) in vbuf_start_prim() argument 209 vbuf->render->set_primitive(vbuf->render, prim); in vbuf_start_prim() 277 struct prim_header *prim ) in vbuf_first_tri() argument 284 stage->tri( stage, prim ); in vbuf_first_tri() [all …]
|
D | draw_pt.c | 56 unsigned prim, in draw_pt_arrays() argument 68 draw_pt_split_prim(prim, &first, &incr); in draw_pt_arrays() 77 prim); in draw_pt_arrays() 112 if (draw->pt.prim != prim || draw->pt.opt != opt) { in draw_pt_arrays() 134 frontend->prepare( frontend, prim, middle, opt ); in draw_pt_arrays() 138 draw->pt.prim = prim; in draw_pt_arrays() 223 draw_print_arrays(struct draw_context *draw, uint prim, int start, uint count) in draw_print_arrays() argument 228 prim, start, count); in draw_print_arrays() 332 draw_pt_arrays(draw, prim, cur_start, cur_count); \ 343 draw_pt_arrays(draw, prim, cur_start, cur_count); \ [all …]
|
/external/mesa3d/src/mesa/tnl/ |
D | t_draw.c | 389 const struct _mesa_prim *prim, in bind_prims() argument 395 VB->Primitive = prim; in bind_prims() 411 const struct _mesa_prim *prim, in _tnl_vbo_draw_prims() argument 422 vbo_get_minmax_indices(ctx, prim, ib, &min_index, &max_index, nr_prims); in _tnl_vbo_draw_prims() 424 _tnl_draw_prims(ctx, arrays, prim, nr_prims, ib, min_index, max_index); in _tnl_vbo_draw_prims() 433 const struct _mesa_prim *prim, in _tnl_draw_prims() argument 442 GLint max_basevertex = prim->basevertex; in _tnl_draw_prims() 452 max_basevertex = MAX2(max_basevertex, prim[i].basevertex); in _tnl_draw_prims() 459 _mesa_lookup_enum_by_nr(prim[i].mode), in _tnl_draw_prims() 460 prim[i].start, in _tnl_draw_prims() [all …]
|
/external/mesa3d/src/gallium/drivers/i915/ |
D | i915_prim_emit.c | 129 struct prim_header *prim, in emit_prim() argument 168 emit_hw_vertex(i915, prim->v[i]); in emit_prim() 173 setup_tri( struct draw_stage *stage, struct prim_header *prim ) in setup_tri() argument 175 emit_prim( stage, prim, PRIM3D_TRILIST, 3 ); in setup_tri() 180 setup_line(struct draw_stage *stage, struct prim_header *prim) in setup_line() argument 182 emit_prim( stage, prim, PRIM3D_LINELIST, 2 ); in setup_line() 187 setup_point(struct draw_stage *stage, struct prim_header *prim) in setup_point() argument 189 emit_prim( stage, prim, PRIM3D_POINTLIST, 1 ); in setup_point()
|