On 24.03.2009 06:07, Dave Airlie wrote: > Hey, > > So I've been playing with radeon FBOs and have run into a problem with how > to allow apps to get an FBOs that isn't swrast fallback :-) > > radeons can by default render to ARGB8888, ARGB4444, RGB565 mostly, now in > this case when the app asks for a texture format of GL_RGBA, > GL_UNSIGNED_BYTE, we return by default a texture format, of > &_mesa_texformat_rgba8888_rev > > This allows us to do memcpy texture uploads in theory, however > when it comes time to render to that texture, I have to go hit a sw > fallback which sucks badly. > > I see my options as > a) apps are smart, ignore problem and move on. > b) pick FBO friendly texture formats by default at the expense of textures > c) magically change the texture format when I realise something is > rendering to it (is this possible any ideas?) > d) at least for r300, hack up the fragment shader to swizzle the outputs > though I think for dest blending this might not work like I think it > would. > > hopes nobody tells me the FBO spec covers this and I'm lazy :)
You can also do a couple of endian swaps right? Might not help in all cases though. Doing c) sounds very hackish, and might not work in all cases (not whole destination written) anyway. I think another option would be to use a temporary surface just for swizzling (ok that looks not like an ideal solution but you could use it in situations where you have to do it anyway like aa resolve at some point). All options really seem suboptimal, I know I was working on some driver which used b) simply because the performance hit, even though often encountered, isn't that big (still ugly though especially for video-like use once textures). Roland ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev