-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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 :)
The intention when we wrote the FBO spec is that drivers would do either B or C. In the typical usage an application won't supply a texture with data and render to it. Apps will usually do one or the other. Since you should be able to quickly reformat the component order of a buffer once it's already in card memory, C is probably the best performance choice. However, B is a lot less code to write. As you point out, D won't work. As for A...seriously? :) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEUEARECAAYFAknJVbAACgkQX1gOwKyEAw+vJQCY5weCuqx9SwsAEhajohFGxeOb 9wCfZSJ7J9nfliZQaKQjm0fM5lXeCIE= =5diw -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ 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