[PATCH 4/5] wined3d: Allocate texture BOs from heap.

Henri Verbeet hverbeet at gmail.com
Mon Feb 21 10:16:33 CST 2022


On Mon, 21 Feb 2022 at 06:22, Zebediah Figura <zfigura at codeweavers.com> wrote:
> @@ -873,12 +873,13 @@ void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int su
>  static void wined3d_texture_remove_buffer_object(struct wined3d_texture *texture,
>          unsigned int sub_resource_idx, struct wined3d_context_gl *context_gl)
>  {
> -    struct wined3d_bo_gl *bo = &texture->sub_resources[sub_resource_idx].bo.gl;
> +    struct wined3d_texture_sub_resource *sub_resource = &texture->sub_resources[sub_resource_idx];
>
>      TRACE("texture %p, sub_resource_idx %u, context_gl %p.\n", texture, sub_resource_idx, context_gl);
>
> -    wined3d_context_gl_destroy_bo(context_gl, bo);
> +    wined3d_context_gl_destroy_bo(context_gl, wined3d_bo_gl(sub_resource->bo));
>      wined3d_texture_invalidate_location(texture, sub_resource_idx, WINED3D_LOCATION_BUFFER);
> +    sub_resource->bo = NULL;
>  }
>
That leaks sub_resource->bo.



More information about the wine-devel mailing list