[PATCH 1/4] wined3d: Move the wined3d_state field of struct wined3d_cs to a new wined3d_cs_state structure.

Zebediah Figura (she/her) zfigura at codeweavers.com
Tue Mar 2 10:33:20 CST 2021


On 3/2/21 8:32 AM, Henri Verbeet wrote:
> On Tue, 2 Mar 2021 at 05:42, Zebediah Figura <z.figura12 at gmail.com> wrote:
>> This is a proposed approach at implementing deferred contexts. The idea is to
>> create a wined3d_cs object per ID3D11DeviceContext. Deferred contexts will have
>> their own wined3d_cs_ops structure, and some operations (i.e. maps and queries)
>> will be partially split to wined3d_cs_ops methods.
>>
>> The point of this patch is to avoid allocating space for unused wined3d_state
>> objects. Presumably other fields could also be moved to the wined3d_cs_state
>> structure as well.
>>
> 
> As a principle, it's probably fine that an "immediate" cs would have
> some additional data that a deferred cs doesn't. I'd suggest to split
> that the same way we do in other places though. E.g.:
> 
>     struct wined3d_cs
>     {
>        const struct wined3d_cs_ops *ops;
>        ...
>     };
> 
>     struct wined3d_cs_immediate
>     {
>        struct wined3d_cs c;
>        ...
>        struct wined3d_state state;
>        ...
>     };
> 
>     struct wined3d_cs_mt
>     {
>        struct wined3d_cs_immediate c;
>        ...
>        HANDLE thread;
>        ...
>     };
> 

Sure, that makes sense.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20210302/2f1d69c1/attachment.sig>


More information about the wine-devel mailing list