[PATCH 2/3] wined3d: Set user memory separately for texture sub resources.
Henri Verbeet
hverbeet at gmail.com
Tue Jun 16 11:35:07 CDT 2020
On Tue, 16 Jun 2020 at 18:09, Paul Gofman <pgofman at codeweavers.com> wrote:
> + if (update_memory_only)
> + {
> + for (i = 0; i < sub_resource_count; ++i)
> + if (!texture->sub_resources[i].user_memory)
> + break;
> +
> + if (i == sub_resource_count)
> + wined3d_resource_free_sysmem(&texture->resource);
> + }
> + else
> + {
> + wined3d_resource_free_sysmem(&texture->resource);
> + }
>
> if (!update_memory_only)
> {
> - sub_resource = &texture->sub_resources[0];
> + sub_resource = &texture->sub_resources[sub_resource_idx];
>
It's fairly minor, but these blocks could be merged, right? On the
other hand, it also seems tempting to simplify the code by simply
always using the "update_memory_only" path here.
More information about the wine-devel
mailing list