Lines Matching refs:vtx
44 GLuint count = exec->vtx.vert_count; in vbo_exec_debug_verts()
50 exec->vtx.prim_count, in vbo_exec_debug_verts()
51 exec->vtx.vertex_size); in vbo_exec_debug_verts()
53 for (i = 0 ; i < exec->vtx.prim_count ; i++) { in vbo_exec_debug_verts()
54 struct _mesa_prim *prim = &exec->vtx.prim[i]; in vbo_exec_debug_verts()
78 struct _mesa_prim *last_prim = &exec->vtx.prim[exec->vtx.prim_count - 1]; in vbo_copy_vertices()
81 const GLuint sz = exec->vtx.vertex_size; in vbo_copy_vertices()
82 fi_type *dst = exec->vtx.copied.buffer; in vbo_copy_vertices()
83 const fi_type *src = exec->vtx.buffer_map + last_prim->start * sz; in vbo_copy_vertices()
176 struct gl_vertex_array *arrays = exec->vtx.arrays; in vbo_exec_bind_arrays()
184 exec->vtx.inputs[attr] = &vbo->currval[VBO_ATTRIB_POS+attr]; in vbo_exec_bind_arrays()
191 assert(VERT_ATTRIB_GENERIC(attr) < ARRAY_SIZE(exec->vtx.inputs)); in vbo_exec_bind_arrays()
192 exec->vtx.inputs[VERT_ATTRIB_GENERIC(attr)] = in vbo_exec_bind_arrays()
199 assert(VERT_ATTRIB_GENERIC(attr) < ARRAY_SIZE(exec->vtx.inputs)); in vbo_exec_bind_arrays()
200 exec->vtx.inputs[VERT_ATTRIB_GENERIC(attr)] = in vbo_exec_bind_arrays()
215 exec->vtx.inputs[VERT_ATTRIB_GENERIC0] = exec->vtx.inputs[0]; in vbo_exec_bind_arrays()
216 exec->vtx.attrsz[VERT_ATTRIB_GENERIC0] = exec->vtx.attrsz[0]; in vbo_exec_bind_arrays()
217 exec->vtx.attrtype[VERT_ATTRIB_GENERIC0] = exec->vtx.attrtype[0]; in vbo_exec_bind_arrays()
218 exec->vtx.attrptr[VERT_ATTRIB_GENERIC0] = exec->vtx.attrptr[0]; in vbo_exec_bind_arrays()
219 exec->vtx.attrsz[0] = 0; in vbo_exec_bind_arrays()
229 if (exec->vtx.attrsz[src]) { in vbo_exec_bind_arrays()
230 GLsizeiptr offset = (GLbyte *)exec->vtx.attrptr[src] - in vbo_exec_bind_arrays()
231 (GLbyte *)exec->vtx.vertex; in vbo_exec_bind_arrays()
234 assert(attr < ARRAY_SIZE(exec->vtx.inputs)); in vbo_exec_bind_arrays()
235 assert(attr < ARRAY_SIZE(exec->vtx.arrays)); /* arrays[] */ in vbo_exec_bind_arrays()
236 exec->vtx.inputs[attr] = &arrays[attr]; in vbo_exec_bind_arrays()
238 if (_mesa_is_bufferobj(exec->vtx.bufferobj)) { in vbo_exec_bind_arrays()
240 assert(exec->vtx.bufferobj->Mappings[MAP_INTERNAL].Pointer); in vbo_exec_bind_arrays()
243 exec->vtx.bufferobj->Mappings[MAP_INTERNAL].Offset + offset; in vbo_exec_bind_arrays()
247 arrays[attr].Ptr = (GLubyte *)exec->vtx.buffer_map + offset; in vbo_exec_bind_arrays()
249 arrays[attr].Size = exec->vtx.attrsz[src]; in vbo_exec_bind_arrays()
250 arrays[attr].StrideB = exec->vtx.vertex_size * sizeof(GLfloat); in vbo_exec_bind_arrays()
251 arrays[attr].Type = exec->vtx.attrtype[src]; in vbo_exec_bind_arrays()
253 vbo_attrtype_to_integer_flag(exec->vtx.attrtype[src]); in vbo_exec_bind_arrays()
258 exec->vtx.bufferobj); in vbo_exec_bind_arrays()
270 exec->vtx.attrsz[0] = exec->vtx.attrsz[VERT_ATTRIB_GENERIC0]; in vbo_exec_bind_arrays()
271 exec->vtx.attrsz[VERT_ATTRIB_GENERIC0] = 0; in vbo_exec_bind_arrays()
285 if (_mesa_is_bufferobj(exec->vtx.bufferobj)) { in vbo_exec_vtx_unmap()
289 GLintptr offset = exec->vtx.buffer_used - in vbo_exec_vtx_unmap()
290 exec->vtx.bufferobj->Mappings[MAP_INTERNAL].Offset; in vbo_exec_vtx_unmap()
291 GLsizeiptr length = (exec->vtx.buffer_ptr - exec->vtx.buffer_map) * in vbo_exec_vtx_unmap()
296 exec->vtx.bufferobj, in vbo_exec_vtx_unmap()
300 exec->vtx.buffer_used += (exec->vtx.buffer_ptr - in vbo_exec_vtx_unmap()
301 exec->vtx.buffer_map) * sizeof(float); in vbo_exec_vtx_unmap()
303 assert(exec->vtx.buffer_used <= VBO_VERT_BUFFER_SIZE); in vbo_exec_vtx_unmap()
304 assert(exec->vtx.buffer_ptr != NULL); in vbo_exec_vtx_unmap()
306 ctx->Driver.UnmapBuffer(ctx, exec->vtx.bufferobj, MAP_INTERNAL); in vbo_exec_vtx_unmap()
307 exec->vtx.buffer_map = NULL; in vbo_exec_vtx_unmap()
308 exec->vtx.buffer_ptr = NULL; in vbo_exec_vtx_unmap()
309 exec->vtx.max_vert = 0; in vbo_exec_vtx_unmap()
328 if (!_mesa_is_bufferobj(exec->vtx.bufferobj)) in vbo_exec_vtx_map()
331 assert(!exec->vtx.buffer_map); in vbo_exec_vtx_map()
332 assert(!exec->vtx.buffer_ptr); in vbo_exec_vtx_map()
334 if (VBO_VERT_BUFFER_SIZE > exec->vtx.buffer_used + 1024) { in vbo_exec_vtx_map()
336 if (exec->vtx.bufferobj->Size > 0) { in vbo_exec_vtx_map()
337 exec->vtx.buffer_map = (fi_type *) in vbo_exec_vtx_map()
339 exec->vtx.buffer_used, in vbo_exec_vtx_map()
341 - exec->vtx.buffer_used, in vbo_exec_vtx_map()
343 exec->vtx.bufferobj, in vbo_exec_vtx_map()
345 exec->vtx.buffer_ptr = exec->vtx.buffer_map; in vbo_exec_vtx_map()
348 exec->vtx.buffer_ptr = exec->vtx.buffer_map = NULL; in vbo_exec_vtx_map()
352 if (!exec->vtx.buffer_map) { in vbo_exec_vtx_map()
354 exec->vtx.buffer_used = 0; in vbo_exec_vtx_map()
362 exec->vtx.bufferobj)) { in vbo_exec_vtx_map()
364 exec->vtx.buffer_map = in vbo_exec_vtx_map()
368 exec->vtx.bufferobj, in vbo_exec_vtx_map()
373 exec->vtx.buffer_map = NULL; in vbo_exec_vtx_map()
377 exec->vtx.buffer_ptr = exec->vtx.buffer_map; in vbo_exec_vtx_map()
379 if (!exec->vtx.buffer_map) { in vbo_exec_vtx_map()
394 printf("map %d..\n", exec->vtx.buffer_used); in vbo_exec_vtx_map()
409 if (exec->vtx.prim_count && in vbo_exec_vtx_flush()
410 exec->vtx.vert_count) { in vbo_exec_vtx_flush()
412 exec->vtx.copied.nr = vbo_copy_vertices(exec); in vbo_exec_vtx_flush()
414 if (exec->vtx.copied.nr != exec->vtx.vert_count) { in vbo_exec_vtx_flush()
428 printf("%s %d %d\n", __func__, exec->vtx.prim_count, in vbo_exec_vtx_flush()
429 exec->vtx.vert_count); in vbo_exec_vtx_flush()
432 exec->vtx.prim, in vbo_exec_vtx_flush()
433 exec->vtx.prim_count, in vbo_exec_vtx_flush()
437 exec->vtx.vert_count - 1, in vbo_exec_vtx_flush()
448 if (keepUnmapped && exec->vtx.buffer_map) { in vbo_exec_vtx_flush()
452 if (keepUnmapped || exec->vtx.vertex_size == 0) in vbo_exec_vtx_flush()
453 exec->vtx.max_vert = 0; in vbo_exec_vtx_flush()
455 exec->vtx.max_vert = vbo_compute_max_verts(exec); in vbo_exec_vtx_flush()
457 exec->vtx.buffer_ptr = exec->vtx.buffer_map; in vbo_exec_vtx_flush()
458 exec->vtx.prim_count = 0; in vbo_exec_vtx_flush()
459 exec->vtx.vert_count = 0; in vbo_exec_vtx_flush()