[PATCH 1/5] wined3d: Store texture user memory pointer per sub resource.

Paul Gofman pgofman at codeweavers.com
Mon Jun 15 13:01:13 CDT 2020


On 6/15/20 19:06, Henri Verbeet wrote:
>
>> @@ -1872,7 +1879,7 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
>>          }
>>      }
>>
>> -    if ((texture->user_memory = mem))
>> +    if ((texture->sub_resources[0].user_memory = mem))
>>      {
> That breaks ddraw_surface_reserve_memory() for mip-mapped textures. It
> turns out those were slightly broken already (i.e., see
> wined3d_texture_get_memory()), but no need to make it worse.

Will it make sense if I merge this patch with the last one (which adds
sub_resource_idx parameter here and fixes the memory setting for mipmaps
in ddraw_surface_reserve_memory()? That would avoid adding some
temporary code here which would be then deleted in the later patch.




More information about the wine-devel mailing list