[PATCH 08/10] wined3d: make wined3d_device_update_surface operate with wined3d_texture and sub_resource_idx

Henri Verbeet hverbeet at gmail.com
Wed Oct 21 04:38:09 CDT 2015

On 21 October 2015 at 10:58, Stefan Dösinger <stefandoesinger at gmail.com> wrote:
> Am 2015-10-20 um 19:26 schrieb Henri Verbeet:
>> The source surface for wined3d_device_update_surface() is supposed
>> to be in WINED3D_POOL_SYSTEM_MEM. Mapping those shouldn't require a
>> copy. (And while in ddraw everything is a bit weird, in d3d9 system
>> memory surfaces are really supposed to be in system memory.)
> - From wined3d_device_update_sub_resource's point of view there's no
> guarantee that the memory data points to won't be gone after its
> return. wined3d_device_update_surface knows that the source surface
> will be there when the queued operation is executed.
Oh right, you meant csmt for both cases. I guess the "or" was a bit
ambiguous. It's something csmt will have to deal with either way
though, since d3d10+ uses that. Of course you can't necessarily know a
system memory surface isn't going to be modified before the upload
finishes in such a case either, but I suppose you could block on maps
in that case. Note that I don't think it's a given that resource
updates should always happen on the rendering thread though.

More information about the wine-devel mailing list