Gfx: Explicit destroy_surface

Created on 12 Aug 2019  路  3Comments  路  Source: gfx-rs/gfx

Wold be good to have this explicit, matching Vulkan.

average ready for work api bug medium

All 3 comments

I slowly started working on this, got the easiest part so far (hal, vulkan, and empty). Should finish on the weekend.

Sorry this is taking a bit longer, but I've hit a few things where I
need a hint:

  • Do we also want to add destroy_surface on trait Instance in hal,
    or just the various instance implementations in the backends
    (similar to create_surface)? I initally assumed the trait also,
    but am no longer so sure now that I discovered:

  • Vulkan has vkDestroySurfaceKHR, I am pretty sure gl has nothing of
    the sort, but I am not familiar with metal, dx11 and
    dx12. After some searching, I wasn't able to find anything
    corresponding to destroy_surface in the other APIs. Should it be
    just a no-op in the case where API is not vulkan?

Thanks!

Let's have destroy_surface in trait Instance.

Having it as no-op is totally fine in some backends.
If you don't know what it has to do, leaving a //TODO is totally fine, since it's still not a regression from the current code.

Was this page helpful?
0 / 5 - 0 ratings