[PATCH 2/5] wined3d: Use _SYSMEM map binding if user memory is not set for sub resource.

Henri Verbeet hverbeet at gmail.com
Mon Jun 15 11:06:26 CDT 2020


On Sun, 14 Jun 2020 at 22:47, Paul Gofman <pgofman at codeweavers.com> wrote:
> +static inline unsigned int wined3d_texture_get_map_binding(const struct wined3d_texture *texture,
> +        unsigned int sub_resource_idx)
> +{
> +    return texture->resource.map_binding == WINED3D_LOCATION_USER_MEMORY ?
> +            (texture->sub_resources[sub_resource_idx].user_memory ? WINED3D_LOCATION_USER_MEMORY
> +            : WINED3D_LOCATION_SYSMEM) : texture->resource.map_binding;
> +}
> +
I don't particularly like this. Perhaps in the end it can't be
avoided, but superficially it seems like it may be nicer to just merge
WINED3D_LOCATION_USER_MEMORY into WINED3D_LOCATION_SYSMEM instead, and
then check sub_resource->user_memory in wined3d_texture_get_memory()
instead.



More information about the wine-devel mailing list