<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 9, 2016 at 9:23 PM, Henri Verbeet <span dir="ltr"><<a href="mailto:hverbeet@gmail.com" target="_blank">hverbeet@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">On 9 August 2016 at 03:20, Aaryaman Vasishta <<a href="mailto:jem456.vasishta@gmail.com">jem456.vasishta@gmail.com</a>> wrote:<br>
> v2: Remove some redundancies and add more tests. Handling of Clear without depth surface is still a bit weird as wined3d_device_clear seems to return an error on a device with no depth surface since the start vs device whose depth surface was deleted after it was created, in which case it (oddly) returns successfully, even having access to and successfully clearing the depth surface.<br>
><br>
</span>What does "deleted" and "surface" mean in the above? If it's just<br>
releasing the references to the depth/stencil texture and view, note<br>
that the device state keeps a reference to view that wouldn't be<br>
released until you set a different view or NULL.<br>
<br></blockquote><div>By "deleted" I mean calling DeleteAttachedSurface on the render target surface, telling it to delete the depth surface.<br>See the tests below the comment "/* Create device without depth surface attached */". <br><br>What's happening is that Clear is returning WINED3DERR_INVALIDCALL if you pass a device without a depth surface attached on creation, but if you pass a device with the depth surface attached (and later on deleted via DeleteAttachedSurface), then it returns WINED3D_OK. It's weird because wined3d_device_set_depth_stencil_view should have set fb.depth_stencil = NULL, but it's not reaching that part for some reason.<br><br></div><div>Sorry for not being clear about this earlier.<br><br></div><div>Cheers,<br></div><div>Aaryaman<br></div></div><br></div></div>