On Sun, Aug 7, 2016 at 4:19 AM, Stefan Dösinger <stefandoesinger@gmail.com> wrote:
On 2016-08-06 23:36, Stefan Dösinger wrote:
> My reading of this is that the depth surface wasn't cleared
> (everything else would be very surprising). If the color surface was
> indeed cleared this shows that native at some place expects your ugly
> deed of removing the depth surface. If the color is not cleared it
> and the clear call is completely ignored I'd say something is broken
> somewhere and we shouldn't care too much about this corner case.
I guess I should have read the version 2 test before hitting "send"...

The v2 behavior is somewhat weird. What's even weirder is that you
didn't need any todo_wine to make it work in Wine (whereas you need the
todo_wine for the "sane" v1 behavior). Our DeleteAttachedSurface
implementation sets the wined3d DS to NULL, at which point a
D3DCLEAR_ZBUFFER clear should return an error. Do you have any idea why
the depth buffer is still cleared on Wine?
 
afaik wined3d should return a WARN in wined3d_device_clear showing that the depth surface is missing and fail on clear. But it seems that despite the depth surface being deleted that wined3d is still able to use that depth surface, which is definitely weird. I will dig more into this and post here as I find anything.


Cheers,
Aaryaman