[Mesa-dev] [PATCH 1/7] st/mesa: factor out code for determining blit.mask from CopyTexSubImage

Marek Olšák maraeo at gmail.com
Thu Feb 14 15:04:45 PST 2013

On Thu, Feb 14, 2013 at 9:23 PM, Brian Paul <brianp at vmware.com> wrote:
> On 02/14/2013 07:53 AM, Marek Olšák wrote:
>> I'll need this later.
>> ---
>>   src/mesa/state_tracker/st_cb_texture.c |  108
>> +++++++++++++++++++-------------
>>   1 file changed, 66 insertions(+), 42 deletions(-)
> The series looks good to me.
> Regarding patch 4 (the blit-based Tex[Sub]Image change), under what
> circumstances, exactly, is the blit path used?  I'm still trying to figure
> out the code.  Basically, I'm wondering how often we're going to hit the
> blit-based path with the software drivers (llvmpipe in particular).  An
> intermediate texture blit would make things slower than just using the
> regular texstore code, as far as I see it.

We're gonna hit it almost always. If there is a mesa format which
matches the format and type combination and the driver supports it and
the memcpy path cannot be used, the blit will be used. There are some
corner cases when the blit cannot be used, but most of them don't
apply to the drivers which support all (or almost all) texture
formats. I guess we could have a special CAP to detect software
rasterizers if needed, but hardware drivers definitely want this.

Somebody just asked on IRC if I will implement blit-based ReadPixels,
because it's used for video recording in Wayland/Weston and right now
it's bloody slow.


More information about the mesa-dev mailing list