[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: [PATCH] wined3d/resource: Performance improvement
From:       Chris Robinson <chris.kcat () gmail ! com>
Date:       2016-06-30 18:12:17
Message-ID: bbd90145-8ad8-234c-f585-a99a9c7fd1d8 () gmail ! com
[Download RAW message or body]

On 06/30/2016 10:20 AM, Patrick Rudolph wrote:
> Tests on Windows showed that mapping a buffer with flags WINED3D_MAP_DISCARD
> and WINED3D_MAP_NOOVERWRITE is valid combination. Writing reliable tests
> is difficult as the driver is free to choose when using discard.
>
> Unigine Heavon maps a lot of buffers with both flags, but run on about
> 85% GPU-load, as WINE removes both hints and the game has to wait for
> the buffer to be mapped.

It makes logical sense to me that mapping a buffer with both DISCARD and 
NOOVERWRITE would effectively ignore NOOVERWRITE. I've noticed that at 
least some engines will map a part of a buffer with NOOVERWRITE and draw 
with that part, map the next part of the buffer with NOOVERWRITE and 
draw with that part, etc, then after the last part of the buffer it maps 
with DISCARD to get new memory and keep going while the previous buffer 
memory is handled asynchronously by the driver or card.

I notice that wined3d has some parts where it ignores/removes DISCARD, 
so it may not be a good idea to leave both DISCARD and NOOVERWRITE set. 
In such a case, the driver will get NOOVERWRITE for a part of the buffer 
that's still in use. It would probably be better to remove NOOVERWRITE 
when both DISCARD and NOOVERWRITE are set.



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic