mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
965: calculate nr enabled vbos on the fly
This commit is contained in:
parent
da89104c57
commit
4844b9fb9d
1 changed files with 7 additions and 4 deletions
|
|
@ -207,18 +207,21 @@ static unsigned get_index_type(int type)
|
|||
boolean brw_upload_vertex_buffers( struct brw_context *brw )
|
||||
{
|
||||
struct brw_array_state vbp;
|
||||
unsigned nr_enabled = 0;
|
||||
unsigned i;
|
||||
int nr_enabled = brw->vb.last_vb + 1;
|
||||
|
||||
memset(&vbp, 0, sizeof(vbp));
|
||||
|
||||
/* This is a hardware limit:
|
||||
*/
|
||||
if (nr_enabled >= BRW_VEP_MAX)
|
||||
return FALSE;
|
||||
|
||||
for (i = 0; i < nr_enabled; i++)
|
||||
for (i = 0; i < BRW_VEP_MAX; i++)
|
||||
{
|
||||
if (brw->vb.vbo_array[i] == NULL) {
|
||||
nr_enabled = i;
|
||||
break;
|
||||
}
|
||||
|
||||
vbp.vb[i].vb0.bits.pitch = brw->vb.vbo_array[i].pitch;
|
||||
vbp.vb[i].vb0.bits.pad = 0;
|
||||
vbp.vb[i].vb0.bits.access_type = BRW_VERTEXBUFFER_ACCESS_VERTEXDATA;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue