[PATCH 3/3] wined3d: Make the "counter_bo" field of struct wined3d_unordered_access_view a wined3d_bo pointer.

Henri Verbeet hverbeet at gmail.com
Mon Nov 15 05:30:59 CST 2021


On Thu, 11 Nov 2021 at 05:47, Zebediah Figura <zfigura at codeweavers.com> wrote:
> @@ -1132,7 +1132,7 @@ void wined3d_buffer_update_sub_resource(struct wined3d_buffer *buffer, struct wi
>  {
>      if (upload_bo->flags & UPLOAD_BO_RENAME_ON_UNMAP)
>      {
> -        wined3d_buffer_set_bo(buffer, context, (struct wined3d_bo *)upload_bo->addr.buffer_object);
> +        wined3d_buffer_set_bo(buffer, context, upload_bo->addr.buffer_object);
>          wined3d_buffer_validate_location(buffer, WINED3D_LOCATION_BUFFER);
>          wined3d_buffer_invalidate_location(buffer, ~WINED3D_LOCATION_BUFFER);
>      }
That seems like it belongs in patch 2/3.

> @@ -3130,7 +3130,7 @@ static bool wined3d_cs_map_upload_bo(struct wined3d_device_context *context, str
>                  return false;
>          }
>
> -        bo = (const struct wined3d_bo *)client->addr.buffer_object;
> +        bo = client->addr.buffer_object;
>          map_ptr = bo ? bo->map_ptr : NULL;
>          map_ptr += (uintptr_t)client->addr.addr;
>
Likewise, but in patch 1/3.

> @@ -2476,7 +2476,7 @@ static void wined3d_texture_gl_upload_data(struct wined3d_context *context,
>              return;
>      }
>
> -    bo.buffer_object = (struct wined3d_bo *)src_bo_addr->buffer_object;
> +    bo.buffer_object = src_bo_addr->buffer_object;
>      bo.addr = (BYTE *)src_bo_addr->addr + src_box->front * src_slice_pitch;
>      if (dst_texture->resource.format_flags & WINED3DFMT_FLAG_BLOCKS)
>      {
And here.



More information about the wine-devel mailing list