-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Brian Paul wrote: | Ian Romanick wrote: |> I managed to track down the problem. cell_start_spus is being called |> multiple times. Each time it is called the SPUs expect the buffers to |> be stored in a different location. However, when the batch data is |> later sent to the SPUs, the addresses for one of the earlier invocations |> of cell_start_spus is used. The buffer the SPUs actually look at is |> empty, and 'cmd_batch(): assertion 0 failed.' results. |> |> I added a printf to cell_start_spus. I've attached the GDB output with |> backtraces at each call to cell_start_spus. |> |> It seems to me that the state tied to the SPUs should be treated as a |> singleton. cell_start_spus should only be called once, and later calls |> to cell_create_context should use the same singleton data. If this |> approach seems correct, I'll start working on it tomorrow. | | Looks like you're using freeglut. One way freeglut is different from | Kilgard's GLUT (the one included with Mesa) is freeglut uses GL calls to | display pop-up menus, rather than Xlib/Win32. So it's creating an extra | rendering context for menus. I usually don't use freeglut. | | I haven't really given much thought to how we'll deal with multiple | contexts in the Cell driver. My first take on it is to view the SPUs as | if it were a GPU with a single HW rendering context. So per-SPU data | would be singleton and switching GL contexts should totally overwrite | the SPU data. If we want to be threadsafe I guess we'll need a lock and | an arbitration mechanism, but I think we could put that off for now. | | I think we're close to this with the 'cell_global' data. | | Feel free to implement what you think is best for the time being.
I think I'll punt for now. I want to finish up this data cache stuff first. Using the GLUT in Mesa seems to work with texcyl and the other demos. I committed a patch that logs a message and exists when it detects multiple contexts. That should prevent further effort spent debugging this non-bug issue. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFHxGbKX1gOwKyEAw8RAmfhAJ9NQz0Gx5vqKZKU4b2LyvXeK2TVnwCeMcsh c1DVnjB+l3KU0P3T5QHdco4= =rSUE -----END PGP SIGNATURE----- ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev