[PATCH 5/5] wined3d: Accelerate texture DISCARD maps as well.

Zebediah Figura zfigura at codeweavers.com
Wed Feb 23 19:05:12 CST 2022


On 2/21/22 10:16, Henri Verbeet wrote:
> On Mon, 21 Feb 2022 at 06:22, Zebediah Figura <zfigura at codeweavers.com> wrote:
>> @@ -4549,6 +4573,13 @@ void wined3d_texture_update_sub_resource(struct wined3d_texture *texture, unsign
>>       unsigned int depth = wined3d_texture_get_level_depth(texture, level);
>>       struct wined3d_box src_box;
>>
>> +    if (upload_bo->flags & UPLOAD_BO_RENAME_ON_UNMAP)
>> +    {
>> +        wined3d_texture_set_bo(texture, sub_resource_idx, context, upload_bo->addr.buffer_object);
>> +        wined3d_texture_validate_location(texture, sub_resource_idx, WINED3D_LOCATION_BUFFER);
>> +        wined3d_texture_invalidate_location(texture, sub_resource_idx, ~WINED3D_LOCATION_BUFFER);
>> +    }
>> +
>>       /* Only load the sub-resource for partial updates. */
>>       if (!box->left && !box->top && !box->front
>>               && box->right == width && box->bottom == height && box->back == depth)
> 
> Now that we're also using this in cases where wined3d_map_persistent()
> returns "false", shouldn't be unmap the upload bo here?

Yes, indeed.



More information about the wine-devel mailing list