<div dir="ltr"><div><div><div><div><div><div><div><div><div>First, thank you for the previously two answers. I have already a lot to study.<br>But regarding TGSI there is little information about it in the internet and it is<br>
confusing.<br></div><br></div>For example:<a href="http://people.freedesktop.org/~csimpson/gallium-docs/tgsi.html">http://people.freedesktop.org/~csimpson/gallium-docs/tgsi.html</a><br>says: "TGSI is the only intermediate representation
used by all drivers"<br><br></div>so we may suppose it deals only with shaders as you said.<br><br></div>But what strikes me is: <a href="http://dri.freedesktop.org/doxygen/gallium/tgsi.html">http://dri.freedesktop.org/doxygen/gallium/tgsi.html</a><br>
</div>when it says: "All Mesa vertex/fragment programs and shaders are translated<br>into the
TGSI representation before being passed to the driver. In turn, the
driver<br>will convert the TGSI instructions into GPU-specific instructions"<br><br></div>so I presume TGSI is a complete intermediate representation that will pass<br></div>all the necessary information to the drivers in order the drivers will write the<br>
GPU specific code.<br></div></div><div><br></div><div>Sorry for the lameness.<br></div>Again, thank you very much!<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/7/17 Brian Paul <span dir="ltr"><<a href="mailto:brianp@vmware.com" target="_blank">brianp@vmware.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 07/16/2013 03:04 PM, Daniel Melo Jorge da Cunha wrote:> Hi, I have 3 questions. Please be nice... I'm struggling myself...<div class="im">
<br>
><br>
> Let's say I am in file src/gallium/auxiliary/cso_<u></u>cache/cso_context.c.<br>
> So, there is a function call pipe->draw_vbo(pipe, info) in the<br>
> function cso_draw_vbo(...).<br>
><br>
> 1- Is this function call (pipe->draw_vbo(pipe, info)) really calling,<br>
> for a NV30 driver, pipe->draw_vbo = nv30_draw_vbo? Or for other driver<br>
> like NVC0, is it really calling pipe->draw_vbo = nvc0_draw_vbo?<br>
<br></div>
Yes.<div class="im"><br>
<br>
> 2- If it is so, how could (mesa3d? gallium3d? X? ddx? the responsible)<br>
> call the correct one for the correct driver?<br>
<br></div>
There's some bootstrap code that finds the right driver and its "create screen" function. In the case of DRI/GLX, look at src/gallium/state_tracker/dri/<u></u>drm/dri2.c's dri2_init_screen() function. Once we have the create_screen function we can use that to create a pipe_context. When a driver creates a context it plugs its draw_vbo() function into the context along with all the other per-context methods.<div class="im">
<br>
<br>
<br>
> 3- Is the pipe and info arguments in the function call mentionated<br>
> the encoded TGSI IR Bytestream? If it is not, how and where is it<br>
> encoded?<br>
<br></div>
I'm not quite clear on your question, but pipe_draw_info only contains the info for what to draw (number of vertices, etc). There are separate functions for creating/binding shaders - that's where TGSI comes in.<br>
<br>
-Brian<br>
<br>
<br>
______________________________<u></u>_________________<br>
mesa-users mailing list<br>
<a href="mailto:mesa-users@lists.freedesktop.org" target="_blank">mesa-users@lists.freedesktop.<u></u>org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-users" target="_blank">http://lists.freedesktop.org/<u></u>mailman/listinfo/mesa-users</a><br>
</blockquote></div><br></div>