[PATCH 1/7] wined3d: Introduce wined3d_device_map_sub_resource().

Stefan Dösinger stefandoesinger at gmail.com
Mon Nov 2 05:17:35 CST 2015


> Am 02.11.2015 um 04:17 schrieb Józef Kucia <jkucia at codeweavers.com>:
> 
> +HRESULT CDECL wined3d_device_map_sub_resource(struct wined3d_device *device,
> +        struct wined3d_resource *resource, unsigned int sub_resource_idx,
> +        struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags)
> +{
> +    struct wined3d_resource *sub_resource;
> +
> +    TRACE("device %p, resource %p, sub_resource_idx %u, map_desc %p, box %p, flags %#x.\n",
> +            device, resource, sub_resource_idx, map_desc, box, flags);
> +
> +    if (!(sub_resource = sub_resource_from_resource(resource, sub_resource_idx)))
> +    {
> +        WARN("Invalid sub_resource_idx %u.\n", sub_resource_idx);
> +        return E_INVALIDARG;
> +    }
> +
> +    return sub_resource->resource_ops->resource_map(sub_resource, map_desc, box, flags);
I don't like the idea of calling the sub resource here. I think this should forward to wined3d_texture_map for textures for now and pass the sub resource index to the resource_map callback.

In the long run we obviously want wined3d_texture_map and wined3d_buffer_map to be merged together, but for now (surface,volume)->(texture) is tricky enough. I have some patches in the works for that.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20151102/62fba639/attachment.sig>


More information about the wine-devel mailing list