[PATCH v4 6/6] wined3d: Try to allocate new Vulkan BOs from the client thread for DISCARD maps.
Zebediah Figura
zfigura at codeweavers.com
Tue Nov 9 10:54:44 CST 2021
On 11/9/21 10:44 AM, Henri Verbeet wrote:
> On Mon, 8 Nov 2021 at 23:50, Zebediah Figura <zfigura at codeweavers.com> wrote:
>> +static void wined3d_buffer_set_bo(struct wined3d_buffer *buffer, struct wined3d_context *context, struct wined3d_bo *bo)
>> +{
>> + struct wined3d_bo *prev_bo = buffer->buffer_object;
>> +
>> + TRACE("buffer %p, context %p, bo %p.\n", buffer, context, bo);
>> +
>> + if (prev_bo)
>> + {
>> + struct wined3d_bo_user *bo_user;
>> +
>> + LIST_FOR_EACH_ENTRY(bo_user, &prev_bo->users, struct wined3d_bo_user, entry)
>> + bo_user->valid = false;
>> + assert(list_empty(&bo->users));
>> + list_move_head(&bo->users, &prev_bo->users);
>> +
>> + wined3d_context_destroy_bo(context, prev_bo);
>> + heap_free(prev_bo);
>> + }
>> + else
>> + {
>> + list_add_head(&bo->users, &buffer->bo_user.entry);
>> + }
>> +
>> + buffer->buffer_object = bo;
>> + wined3d_buffer_validate_location(buffer, WINED3D_LOCATION_BUFFER);
>> + wined3d_buffer_invalidate_location(buffer, ~WINED3D_LOCATION_BUFFER);
>> +}
>> +
> The location management could now be in wined3d_buffer_update_sub_resource().
>
Right, meant to do that part and forgot about it >_<
More information about the wine-devel
mailing list