[PATCH 1/5] wined3d: Decouple private data from the resource structure.

Henri Verbeet hverbeet at gmail.com
Tue Feb 25 06:27:57 CST 2014


On 24 February 2014 15:37, Stefan Dösinger <stefan at codeweavers.com> wrote:
> @@ -1976,6 +1976,19 @@ static inline void context_invalidate_active_texture(struct wined3d_context *con
>          context_invalidate_state(context, STATE_SAMPLER(sampler));
>  }
>
> +struct wined3d_privstore
> +{
> +    struct list content;
> +};
> +
> +struct wined3d_privstore *wined3d_privstore_create(void) DECLSPEC_HIDDEN;
> +void wined3d_privstore_destroy(struct wined3d_privstore *store) DECLSPEC_HIDDEN;
> +HRESULT wined3d_privstore_free_private_data(struct wined3d_privstore *store, const GUID *guid);
> +HRESULT wined3d_privstore_get_private_data(const struct wined3d_privstore *store,
> +        const GUID *guid, void *data, DWORD *data_size, BOOL addref) DECLSPEC_HIDDEN;
> +HRESULT wined3d_privstore_set_private_data(struct wined3d_privstore *store,
> +        const GUID *guid, const void *data, DWORD data_size, DWORD flags) DECLSPEC_HIDDEN;
> +
>  #define WINED3D_RESOURCE_ACCESS_GPU     0x1
>  #define WINED3D_RESOURCE_ACCESS_CPU     0x2
>
I'm not entirely convinced this is how we want this to work. Calling
HeapAlloc() for a struct list seems less than ideal, and I'd like the
WINED3DSPD_IUNKNOWN handling to be done by the callers.



More information about the wine-devel mailing list