March 19, 2024
12:19 a.m.
On Tue Mar 19 00:19:20 2024 +0000, Zebediah Figura wrote: > Some high-level questions: > * What about matrix and stateblock handles? Should we just move the > whole table in one go? > * Should the table go in the ddraw object, or should it be global? > * Assuming that rendering to a given device is supposed to go to that > device's RT specified at creation time, calling > wined3d_device_context_set_rendertarget_views() from d3d_device_init() > won't be enough to achieve that anymore. Presumably we need to do it on > every draw call now. > * In fact, more generally, shouldn't state be specific to each device? > That'll need more thought. We could probably use a per-device primary stateblock? > Matteo, Stefan, Henri, since you have a lot more background in this > area, are there other potential concerns with having multiple devices > that I might not be thinking of? 1, 2: I did a bit of more testing, and: - matrix, material and texture handles are usable even for devices created with a different ddraw object (so we should probably use a global handle table for those), so I will use a global handle table instead of per-ddraw one and add matrix handles to those; - stateblock handles are not usable cross-ddraw7 devices (so they should probably stay where they are). 3, 4.: It looks like currently all the state besides the mentioned render targets are handled in the per ddraw device stateblock which is applied before draw, or am I missing something? Should I probably just handle render targets per-draw? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5329#note_65278