What lockflags value is appropriate for an offscreenbuffer to be copied to the backbuffer?
===

i'm using direct3d to render yuv video data.  the basic process is:

create a yv12 surface using CreateOffscreenPlain
lockrectangle on this surface to get the data pointer, copy yuv data to it.
stretchrectangle from this surface to the backbuffer
call present to display the back buffer.

on the LockRectangle call there's a LockFlags parameter and we have been using LockFlags.Discard which sounds like it means that we'll overwrite the whole buffer.

This seems to cause some issues (exceptions on present) on some intel onboard graphics devices, whereas if i change the LockFlags to LockFlags.None, the problem seems to go away.  have i created a race condition by doing this?

i think i probably need to understand the necessity of the lock here.  the display is in 32 bit rgb so i would guess that the yuv to rgb conversion is done on the stretchrectangle call.  is this process suppose to be synchronous or asynchronous?  i think i've read that present is asynchronous but that doesn't matter to me since that's an operation on the backbuffer which i don't touch directly.

apologize if the questions don't make sense, i don't think i've got a very good handle on this thus far.