[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 05:13:33 CDT 2015


On 21 October 2015 at 11:58, Stefan Dösinger <stefandoesinger at gmail.com> wrote:
> Am 2015-10-21 um 11:38 schrieb Henri Verbeet:
>> 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.
> The current solution in my patches is to wait until the upload is
> done. That makes the tests happy, but obviously isn't an efficient
> solution.
>
> My suggestion would be to map the d3d10+ call to the d3d9-style call
> with a sysmem staging resource managed by d3d11, similarly to how we
> handle UP draws in <= d3d9. But I haven't looked into the details at all.
>
Complexities of managing that aside, that would always imply at least
one copy of the data for d3d10+ updates.

>> Note that I don't think it's a given that resource updates should
>> always happen on the rendering thread though.
> Yeah, but that doesn't help here. E.g. the destination resource could
> be busy, in which case an update in the main thread can't be done
> right away either.
Well yes, but the destination resource being busy generally implies
the GPU being somewhat busy too. And in that case it isn't necessarily
bad to spend some time on the CPU to copy the data.



More information about the wine-devel mailing list