RFC: wined3d: Implementing depth/stencil buffer locking

Henri Verbeet hverbeet at gmail.com
Wed Nov 2 08:41:48 CDT 2011


On 2 November 2011 11:59, Octavian Voicu <octavian.voicu at gmail.com> wrote:
> 1) make dsurface.ok in ddraw/tests crashes in context_acquire
> (wined3d/context.c:2456) called from surface_load_location
> (wined3d/surface.c:6323), I'm guessing  in because there is no
> swapchain. How can I prevent this crash and still get a context?
> Loading from offscreen to sysmem shouldn't require a swapchain.
>
In practice it does. The reason is that to get a GL context you need a
window, or at least a Drawable, and currently in wined3d that means
you need a swapchain. There are a couple of things that need to be
fixed there. One is that wined3d should really be able to do rendering
without a swapchain for d3d10/11, the other is that ddraw should
create its swapchain much earlier, likely on SetCooperativeLevel().
I'm not sure all that matter a whole lot here though, the more
interesting question is probably how you managed to get the surface to
be in the offscreen location without a swapchain.

The sysmem <-> texture transfer code looks at first sight like it
should be using surface_upload_data() / surface_download_data().
Another issue is that SFLAG_DS_ONSCREEN and SFLAG_DS_OFFSCREEN should
actually go away and be replaced with SFLAG_INDRAWABLE /
SFLAG_INTEXTURE. These are separate flags for historical reasons, but
it should be possible to merge them back now.



More information about the wine-devel mailing list