[Mesa-dev] [PATCH 2/2] r600g/radeonsi: Prefer VRAM for CPU -> GPU streaming buffers

Christian König deathsimple at vodafone.de
Thu Jul 31 03:06:29 PDT 2014


Am 31.07.2014 um 11:57 schrieb Michel Dänzer:
> On 31.07.2014 18:52, Christian König wrote:
>> Am 31.07.2014 um 11:43 schrieb Michel Dänzer:
>>> From: Michel Dänzer <michel.daenzer at amd.com>
>>>
>>> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
>> At least for PIPE_USAGE_STREAM buffers that's a bad idea, cause they are
>> used by VDPAU to read back to data to a CPU buffer and that's really
>> slow from VRAM.
>  From src/gallium/docs/source/screen.rst:
>
> * ``PIPE_USAGE_DEFAULT``: Optimized for fast GPU access.
> * ``PIPE_USAGE_IMMUTABLE``: Optimized for fast GPU access and the resource is
>    not expected to be mapped or changed (even by the GPU) after the first upload.
> * ``PIPE_USAGE_DYNAMIC``: Expect frequent write-only CPU access. What is
>    uploaded is expected to be used at least several times by the GPU.
> * ``PIPE_USAGE_STREAM``: Expect frequent write-only CPU access. What is
>    uploaded is expected to be used only once by the GPU.
> * ``PIPE_USAGE_STAGING``: Optimized for fast CPU access.
>
> That reads to me like only PIPE_USAGE_STAGING is expected to provide fast
> CPU reads.

Forget what I've wrote, we do this handling by letting the driver copy 
the bitmap content to a staging texture. All other use case indeed use 
PIPE_USAGE_STAGING.

Christian.


More information about the mesa-dev mailing list