Why?

At least all nVidia cards directly support this, and it allows code like this:

hw_set_vertex_attrib(idx, v)
{
    write command to set vertex attrib on GPU fifo
    write idx on GPU fifo
    write v on GPU fifo
    return;
}

glColor()
{
    pipe->set_vertex_attrib(COLOR, v);
    return;
}

Instead of this simple approach, we instead currently use the "vbo
module", which attempts to store all the GL attributes in a vertex
buffer, with all kinds of unnecessary complexity like having to resize
the buffer in the middle of a primitive because you just used another
vertex attribute, having to deal with memory allocation, vertex
element CSO hashing and so on.

Of course this results in not-so-good performance, which could
otherwise be avoided with the approach described above (guess what the
binary drivers use).

I have no idea whether Radeon or Intel GPUs support this, but it
doesn't seem unlikely since it is the basic OpenGL model.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to