[Nouveau] more one question regarding gl and nouveau
Daniel Melo Jorge da Cunha
dmjcunha at gmail.com
Tue Apr 19 15:01:58 UTC 2016
Hi Ilia, you were straight to the point for me in:
"src/mesa/vbo will upload it to a vbo. The driver then points the
hardware at the vbo and tells it to read from there."
But where is it the function that implements this? Is it in
nv30_draw_vbo(...)? Please, give me a function name or
at least a file name?
2016-04-19 10:04 GMT-04:00 Ilia Mirkin <imirkin at alum.mit.edu>:
> On Tue, Apr 19, 2016 at 8:52 AM, Daniel Melo Jorge da Cunha
> <dmjcunha at gmail.com> wrote:
> > Hi, for example, if I have glVertex3f(0.75, 0.75, 1.0) how the video card
> > processes
> > these three floats? Does the card work with floats? Does (mesa? gallium?
> > driver?)
> > process these three input floats before it is sent to the card? Where is
> the
> > code
> > for it?
>
> src/mesa/vbo will upload it to a vbo. The driver then points the
> hardware at the vbo and tells it to read from there. (Under some
> circumstances, the vbo data might have to be transformed on the cpu as
> well if the driver can't handle the format.)
>
> >
> > If you say the floats are memory mapped as in
> > exec->vtx.buffer_map = (GLfloat *)ctx->Driver.MapBufferRange(...) I would
> > say
> > from what I learned that it has to pass through gallium and that means:
> > st_draw_vbo(...) ending up in nv30_draw_vbo(..) but these functions don't
> > make
> > any reference to those (memory mapped) input floats. So where is the
> piece
> > of
> > code that instructs the card to fetch those three (possibly processed)
> input
> > floats
> > and send them to the card?
> >
> > Thanks in advance.
>
> The vbo module converts this to the equivalent of
>
> glGenBuffers(1, &buf)
> glBindBuffer(GL_ARRAY_BUFFER, buf)
> glBufferData(GL_ARRAY_BUFFER, ...)
> foo = glMapBuffer(buf)
> write vertex values to foo
> glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, 0);
> draw
>
> Hope that helps,
>
> -ilia
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20160419/0aa6b9fd/attachment.html>
More information about the Nouveau
mailing list