[Mesa-dev] [PATCH] meta: Compute correct buffer size with SkipRows/SkipPixels

Jason Ekstrand jason at jlekstrand.net
Tue Sep 1 07:33:01 PDT 2015


On Tue, Sep 1, 2015 at 5:30 AM, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> On Tue, Sep 01, 2015 at 01:09:33PM +0100, Neil Roberts wrote:
>> Good catch and it seems like a nice way to fix it.
>>
>> Reviewed-by: Neil Roberts <neil at linux.intel.com>
>>
>> I wonder if it might be worth avoiding copying the padding and pack the
>> rows more tightly in the temporary buffer. Ie, we would allocate a
>> buffer of align(width*cpp)*height*depth and copy the rows in one at a
>> time instead of memcpying the whole buffer. As it stands for example if
>> you are using the stride to make a 16x16 texture of a subregion of a
>> 1024x1024 buffer we will pointlessly make a temporary buffer of 1024x16.
>> I'm not saying we should hold up this fix for that though.

Yeah, this is a good idea.  I think I thought about that when writing
the original code but it just never happened.

> I've been half wondering about that as well. There seems to be a
> deficit of good texture up/downloading benchmarks, that both stress
> all pathways and reflect real world usage. For the latter, I wonder if
> apitrace could be coaxed into service? (You need realistic GPU usage in
> addition to texture transfers to answer questions such as blit vs stall.)
> As for the former, we could just repurpose some of the API coverage
> tests in piglit to serve as comprehensive micro-benchmarks.

Yeah, the textuer upload/download testing and benchmarking situation
is pretty dire.  We've intruduced a number of bugs those paths without
triggering a single piglit test.  More tests are always welcome.

> I have a v2 of this patch because piglit tells me I can't just drop
> full_height on the floor - as the teximage we create is meant to be
> width x full_height x 1. Oops.
> -Chris
>
> --
> Chris Wilson, Intel Open Source Technology Centre
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list