On Sun, Jan 31, 2010 at 6:21 AM, José Fonseca <jfons...@vmware.com> wrote: > On Sat, 2010-01-30 at 04:06 -0800, Corbin Simpson wrote: >> 5) How const is const for CSO? e.g. r300_state.c:498, we're not >> copying pipe_framebuffer_state but just the pointer. It appears to >> work, but is it actually safe? > > The const means the driver cannot change it. Not that it won't change. > > The long answer is depends on how the driver is implemented and commands > batched. The next time the set_framebuffer_state is called the previous > object may have been destroyed/modified, so if you have internal > references to it they would cause segfault. But if by the time that > happens you no longer have references to it -- e.g. you just have > references to the BOs that hold the frambuffer storage -- then it would > work fine. > > Short answer is -- it is better to just make a local copy.
Alright, not hard to fix. >> Also, on the topic of framebuffers, is >> it okay to refuse to render if no MRTs or Z buffer are present? > > Not really. At least not as it stands. If the hardware requires these > then they'll need to be created internally by the pipe driver. > > We could add a caps for this but I see no point for it, since it's so > easy to create a dummy framebuffer internally. Again, I should have typed "and." I was thinking in terms of sanity checks. -- Only fools are easily impressed by what is only barely beyond their reach. ~ Unknown Corbin Simpson <mostawesomed...@gmail.com> ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev