[PATCH vkd3d 09/13] vkd3d: Make create_buffer_view and create_texture_view public.
Philip Rebohle
philip.rebohle at tu-dortmund.de
Mon Nov 11 10:03:44 CST 2019
Needed for ClearUnorderedAccessViewUint.
Signed-off-by: Philip Rebohle <philip.rebohle at tu-dortmund.de>
---
libs/vkd3d/resource.c | 16 ++--------------
libs/vkd3d/vkd3d_private.h | 19 +++++++++++++++++++
2 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c
index a1c7201..361c1fe 100644
--- a/libs/vkd3d/resource.c
+++ b/libs/vkd3d/resource.c
@@ -2149,7 +2149,7 @@ static bool vkd3d_create_vk_buffer_view(struct d3d12_device *device,
return vr == VK_SUCCESS;
}
-static bool vkd3d_create_buffer_view(struct d3d12_device *device,
+bool vkd3d_create_buffer_view(struct d3d12_device *device,
VkBuffer vk_buffer, const struct vkd3d_format *format,
VkDeviceSize offset, VkDeviceSize size, struct vkd3d_view **view)
{
@@ -2349,18 +2349,6 @@ static void vk_component_mapping_compose(VkComponentMapping *dst, const VkCompon
dst->a = swizzle_vk_component(&a, a.a, b->a);
}
-struct vkd3d_texture_view_desc
-{
- VkImageViewType view_type;
- const struct vkd3d_format *format;
- unsigned int miplevel_idx;
- unsigned int miplevel_count;
- unsigned int layer_idx;
- unsigned int layer_count;
- VkComponentMapping components;
- bool allowed_swizzle;
-};
-
static bool init_default_texture_view_desc(struct vkd3d_texture_view_desc *desc,
struct d3d12_resource *resource, DXGI_FORMAT view_format)
{
@@ -2408,7 +2396,7 @@ static bool init_default_texture_view_desc(struct vkd3d_texture_view_desc *desc,
return true;
}
-static bool vkd3d_create_texture_view(struct d3d12_device *device,
+bool vkd3d_create_texture_view(struct d3d12_device *device,
VkImage vk_image, const struct vkd3d_texture_view_desc *desc,
struct vkd3d_view **view)
{
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h
index 6f3ac09..3ab443b 100644
--- a/libs/vkd3d/vkd3d_private.h
+++ b/libs/vkd3d/vkd3d_private.h
@@ -494,6 +494,25 @@ struct vkd3d_view
} info;
};
+struct vkd3d_texture_view_desc
+{
+ VkImageViewType view_type;
+ const struct vkd3d_format *format;
+ unsigned int miplevel_idx;
+ unsigned int miplevel_count;
+ unsigned int layer_idx;
+ unsigned int layer_count;
+ VkComponentMapping components;
+ bool allowed_swizzle;
+};
+
+bool vkd3d_create_buffer_view(struct d3d12_device *device,
+ VkBuffer vk_buffer, const struct vkd3d_format *format,
+ VkDeviceSize offset, VkDeviceSize size, struct vkd3d_view **view) DECLSPEC_HIDDEN;
+bool vkd3d_create_texture_view(struct d3d12_device *device,
+ VkImage vk_image, const struct vkd3d_texture_view_desc *desc,
+ struct vkd3d_view **view) DECLSPEC_HIDDEN;
+
void vkd3d_view_decref(struct vkd3d_view *view, struct d3d12_device *device) DECLSPEC_HIDDEN;
void vkd3d_view_incref(struct vkd3d_view *view) DECLSPEC_HIDDEN;
--
2.24.0
More information about the wine-devel
mailing list