[PATCH 4/8] d3d11: Handle NULL source box in d3d10_device_CopySubresourceRegion().

Józef Kucia joseph.kucia at gmail.com
Wed Jan 20 15:11:36 CST 2016


On Wed, Jan 20, 2016 at 1:06 PM, Henri Verbeet <hverbeet at gmail.com> wrote:
> On 19 January 2016 at 22:28, Józef Kucia <jkucia at codeweavers.com> wrote:
>> @@ -4002,15 +4002,25 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
>>      }
>>      src_surface = surface_from_resource(tmp);
>>
>> +    if (src_box)
>> +    {
>> +        src_rect.left = src_box->left;
>> +        src_rect.top = src_box->top;
>> +        src_rect.right = src_box->right;
>> +        src_rect.bottom = src_box->bottom;
>> +    }
>> +    else
>> +    {
>> +        src_rect.left = 0;
>> +        src_rect.top = 0;
>> +        src_rect.right = src_surface->resource.width;
>> +        src_rect.bottom = src_surface->resource.height;
>> +    }
> That's mostly what surface_get_rect() does, except that it doesn't
> take a wined3d_box structure, of course. wined3d_surface_blt() can
> handle a NULL src_rect though, so you don't need to do it here.

It's not strictly necessary to do it here but I have to construct
dst_rect based on src_box. In v2 I pass a NULL src_rect to
wined3d_surface_blt(). I am not sure if it's really better.



More information about the wine-devel mailing list