vkimagememory: add get_{width,height) functions
This commit is contained in:
parent
08fd5c2ae5
commit
6731fad9af
@ -127,8 +127,8 @@ _find_memory_type_index_with_type_properties (GstVulkanDevice * device,
|
|||||||
for (i = 0; i < 32; i++) {
|
for (i = 0; i < 32; i++) {
|
||||||
if ((typeBits & 1) == 1) {
|
if ((typeBits & 1) == 1) {
|
||||||
/* Type is available, does it match user properties? */
|
/* Type is available, does it match user properties? */
|
||||||
if ((device->memory_properties.memoryTypes[i].
|
if ((device->memory_properties.
|
||||||
propertyFlags & properties) == properties) {
|
memoryTypes[i].propertyFlags & properties) == properties) {
|
||||||
*typeIndex = i;
|
*typeIndex = i;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -503,6 +503,24 @@ gst_vulkan_image_memory_wrapped (GstVulkanDevice * device, VkImage image,
|
|||||||
return (GstMemory *) mem;
|
return (GstMemory *) mem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
guint32
|
||||||
|
gst_vulkan_image_memory_get_width (GstVulkanImageMemory * image)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (gst_is_vulkan_image_memory (GST_MEMORY_CAST (image)),
|
||||||
|
0);
|
||||||
|
|
||||||
|
return image->create_info.extent.width;
|
||||||
|
}
|
||||||
|
|
||||||
|
guint32
|
||||||
|
gst_vulkan_image_memory_get_height (GstVulkanImageMemory * image)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (gst_is_vulkan_image_memory (GST_MEMORY_CAST (image)),
|
||||||
|
0);
|
||||||
|
|
||||||
|
return image->create_info.extent.height;
|
||||||
|
}
|
||||||
|
|
||||||
G_DEFINE_TYPE (GstVulkanImageMemoryAllocator, gst_vulkan_image_memory_allocator,
|
G_DEFINE_TYPE (GstVulkanImageMemoryAllocator, gst_vulkan_image_memory_allocator,
|
||||||
GST_TYPE_ALLOCATOR);
|
GST_TYPE_ALLOCATOR);
|
||||||
|
|
||||||
|
@ -108,6 +108,9 @@ gboolean gst_vulkan_image_memory_set_layout (GstVulkanImageMemory *
|
|||||||
VkImageLayout,
|
VkImageLayout,
|
||||||
VkImageMemoryBarrier * barrier);
|
VkImageMemoryBarrier * barrier);
|
||||||
|
|
||||||
|
guint32 gst_vulkan_image_memory_get_width (GstVulkanImageMemory * image);
|
||||||
|
guint32 gst_vulkan_image_memory_get_height (GstVulkanImageMemory * image);
|
||||||
|
|
||||||
VkFormat gst_vulkan_format_from_video_format (GstVideoFormat v_format,
|
VkFormat gst_vulkan_format_from_video_format (GstVideoFormat v_format,
|
||||||
guint plane);
|
guint plane);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user