On Wed, Sep 18, 2013 at 12:36 PM, Jose Fonseca <jfons...@vmware.com> wrote: > ----- Original Message ----- >> Isn't u_blit a candidate for removal considering it has no user in Mesa? > > u_blit still has users outside mesa. And it provides features that > pipe_context::blit does not: > > - util_blit_pixels() will call pipe_context::resource_copy for non-stretch > blits, which is potentially faster than pipe_context::blit
The decision whether resource_copy_region should be used has been moved to drivers since pipe->blit was added. All that drivers need to do is to call util_try_blit_via_copy_region. > - util_blit_pixels_tex() allows to specify pipe_sampler_view::swizzle_? > > Ie., the ability to do textured quad blits from state tracker is something > that will be often handy. > > The reasons I need custom pipe_sampler_view::swizzle_? is to simulate DX9 > formats (which have ?, 1, 1, 1 swizlle; while gallium/OpenGL/D3D10 formats > has ?, 0, 0, 1 swizzle). The only way to use pipe_context::blit would be to > a) extend pipe_context::blit to receive pipe_sampler_view::swizzle_? > b) add ?, 1, 1, 1 variants for all DX9 formats... > > Both seemed more work than what was worth. Actually I think adding ?,1,1,1 variants would be really easy. You can name the formats e.g. PIPE_FORMAT_R8_UNORM_DX9, etc. I think you only need to add one line to u_format_csv, one line to p_format.h, and support for your driver. Then you would be able to use pipe->blit and you don't have to rely on pipe_sampler_view::swizzle_?. Marek _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev