[PATCH v2 2/6] wined3d: Implement copying of buffer resources.

Józef Kucia joseph.kucia at gmail.com
Sun Mar 20 17:49:01 CDT 2016


On Sun, Mar 20, 2016 at 11:31 PM, Henri Verbeet <hverbeet at gmail.com> wrote:
> On 20 March 2016 at 23:15, Józef Kucia <jkucia at codeweavers.com> wrote:
>> +    buffer_get_memory(dst_buffer, context, &dst_bo_address);
>> +    buffer_get_memory(src_buffer, context, &src_bo_address);
>> +
>> +    dst_buffer_mem = dst_buffer->resource.heap_memory;
>> +    src_buffer_mem = src_buffer->resource.heap_memory;
>> +
>> +    if (!dst_buffer_mem && !src_buffer_mem)
>> +    {
> The way struct wined3d_bo_address works is that if the "buffer_object"
> field is non-zero, the "addr" field is relative to the start of the
> corresponding buffer object, and otherwise it's relative to the start
> of system memory. I.e., the correct check here should be for
> src_bo_address.buffer_object and dst_bo_address.buffer_object being
> non-zero, and you should be able to use src_bo_address.addr and
> dst_bo_address.addr instead of src_buffer_mem and dst_buffer_mem in
> most other places.
>

I'm not sure I can do this. If a buffer is double-buffered, I still
have to copy through system memory, even though the "buffer_object"
field is non-zero.



More information about the wine-devel mailing list