On Mon, 21 Feb 2022 at 06:22, Zebediah Figura zfigura@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?