On 9 August 2016 at 03:20, Aaryaman Vasishta jem456.vasishta@gmail.com wrote:
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.
What does "deleted" and "surface" mean in the above? If it's just releasing the references to the depth/stencil texture and view, note that the device state keeps a reference to view that wouldn't be released until you set a different view or NULL.
On Tue, Aug 9, 2016 at 9:23 PM, Henri Verbeet hverbeet@gmail.com wrote:
On 9 August 2016 at 03:20, Aaryaman Vasishta jem456.vasishta@gmail.com wrote:
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.
What does "deleted" and "surface" mean in the above? If it's just releasing the references to the depth/stencil texture and view, note that the device state keeps a reference to view that wouldn't be released until you set a different view or NULL.
By "deleted" I mean calling DeleteAttachedSurface on the render target
surface, telling it to delete the depth surface. See the tests below the comment "/* Create device without depth surface attached */".
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.
Sorry for not being clear about this earlier.
Cheers, Aaryaman