Commit graph

12 commits

Author SHA1 Message Date
Matthew Waters
a4d900332b vulkanimagememory: fix use-after-free releasing a view
If the view has the last reference to the image, then
gst_clear_mini_object will destroy the image and the lock used in the
next line.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1314>
2020-06-02 13:58:13 +10:00
Matthew Waters
dd44bc3a2d vkimagememory: actually check the length of a ptr array
Not it's value is > 0 which should always be true.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1314>
2020-06-02 13:58:13 +10:00
Matthew Waters
52ff97d085 vulkan/image: expose initialization function for subclasses 2019-12-09 01:49:30 +00:00
Matthew Waters
dee29aa8e7 vulkan: fix up some gir annotations 2019-12-04 07:20:27 +00:00
Matthew Waters
a7c2aa473f vulkan/image: don't rely on weak-ref notifies for views
Weak refs don't quite work here correctly as there is always a race with
taking the lock between find_view() and remove_view().  If find_view()
returns a view that is going to removed by remove_view() then we have an
interesting situation.

In theory, the number and type of views for an image are relatively
constant and should not change one they've been set up which means that
it is actually practical to perform pool-like reference counting here
where the image holds a pool of different views that it can give out
as necessary.
2019-11-28 23:27:21 +00:00
Matthew Waters
475a2b0acd vulkan/image: use the full video info for returning vulkan formats
We may need some colorspace information for returning sRGB vs no sRGB.
2019-11-07 20:01:57 +00:00
Matthew Waters
34ff895040 vulkan: remove VkImageView from the memory
There can be multiple views per image for different subresource ranges
or planes in multi-planer images.
2019-09-25 11:11:02 +00:00
Matthew Waters
ac09f88eb9 vulkan: implement the correct memory barriers necessary
Vulkan validation layers are finally silent!
2019-06-04 09:03:44 +00:00
Matthew Waters
25a970f9d5 vkformat: fix format conversion for matching vulkan formats
Other formats still need a swizzle or conversion.
2019-06-04 09:03:44 +00:00
Matthew Waters
d61e771c37 vulkan: use c99 designated initializers where possible
Makes the code much easier to read and allows removing our terrible
macros for structure initialization.
2019-06-04 09:03:44 +00:00
Matthew Waters
70fda3ff78 vulkan: large docs update 2019-06-04 09:03:44 +00:00
Matthew Waters
25dd3b32e5 vulkan: make a gstvulkan library out of the existing API 2019-06-04 09:03:44 +00:00
Renamed from ext/vulkan/vkimagememory.c (Browse further)