From: Zebediah Figura zfigura@codeweavers.com
--- dlls/wined3d/wined3d_private.h | 125 +-------------------------------- dlls/wined3d/wined3d_vk.h | 123 ++++++++++++++++++++++++++++++++ 2 files changed, 124 insertions(+), 124 deletions(-)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 61847e3d5cb..b6540a2ced8 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3646,35 +3646,6 @@ static inline struct wined3d_device_no3d *wined3d_device_no3d(struct wined3d_dev return CONTAINING_RECORD(device, struct wined3d_device_no3d, d); }
-#include "wined3d_vk.h" - -struct wined3d_null_resources_vk -{ - struct wined3d_bo_vk bo; - VkDescriptorBufferInfo buffer_info; - - struct wined3d_image_vk image_1d; - struct wined3d_image_vk image_2d; - struct wined3d_image_vk image_2dms; - struct wined3d_image_vk image_3d; -}; - -struct wined3d_null_views_vk -{ - VkBufferView vk_view_buffer_uint; - VkBufferView vk_view_buffer_float; - - VkDescriptorImageInfo vk_info_1d; - VkDescriptorImageInfo vk_info_2d; - VkDescriptorImageInfo vk_info_2dms; - VkDescriptorImageInfo vk_info_3d; - VkDescriptorImageInfo vk_info_cube; - VkDescriptorImageInfo vk_info_1d_array; - VkDescriptorImageInfo vk_info_2d_array; - VkDescriptorImageInfo vk_info_2dms_array; - VkDescriptorImageInfo vk_info_cube_array; -}; - #define WINED3D_ALLOCATOR_CHUNK_SIZE (64 * 1024 * 1024) #define WINED3D_ALLOCATOR_CHUNK_ORDER_COUNT 15 #define WINED3D_ALLOCATOR_MIN_BLOCK_SIZE (WINED3D_ALLOCATOR_CHUNK_SIZE >> (WINED3D_ALLOCATOR_CHUNK_ORDER_COUNT - 1)) @@ -3706,22 +3677,6 @@ static inline struct wined3d_allocator_chunk_gl *wined3d_allocator_chunk_gl(stru return CONTAINING_RECORD(chunk, struct wined3d_allocator_chunk_gl, c); }
-struct wined3d_allocator_chunk_vk -{ - struct wined3d_allocator_chunk c; - VkDeviceMemory vk_memory; -}; - -static inline struct wined3d_allocator_chunk_vk *wined3d_allocator_chunk_vk(struct wined3d_allocator_chunk *chunk) -{ - return CONTAINING_RECORD(chunk, struct wined3d_allocator_chunk_vk, c); -} - -void *wined3d_allocator_chunk_vk_map(struct wined3d_allocator_chunk_vk *chunk_vk, - struct wined3d_context_vk *context_vk) DECLSPEC_HIDDEN; -void wined3d_allocator_chunk_vk_unmap(struct wined3d_allocator_chunk_vk *chunk_vk, - struct wined3d_context_vk *context_vk) DECLSPEC_HIDDEN; - struct wined3d_allocator_block { struct list entry; @@ -3760,85 +3715,7 @@ void wined3d_allocator_cleanup(struct wined3d_allocator *allocator) DECLSPEC_HID bool wined3d_allocator_init(struct wined3d_allocator *allocator, size_t pool_count, const struct wined3d_allocator_ops *allocator_ops) DECLSPEC_HIDDEN;
-struct wined3d_uav_clear_pipelines_vk -{ - VkPipeline buffer; - VkPipeline image_1d; - VkPipeline image_1d_array; - VkPipeline image_2d; - VkPipeline image_2d_array; - VkPipeline image_3d; -}; - -struct wined3d_uav_clear_state_vk -{ - struct wined3d_uav_clear_pipelines_vk float_pipelines; - struct wined3d_uav_clear_pipelines_vk uint_pipelines; - - struct wined3d_shader_thread_group_size buffer_group_size; - struct wined3d_shader_thread_group_size image_1d_group_size; - struct wined3d_shader_thread_group_size image_1d_array_group_size; - struct wined3d_shader_thread_group_size image_2d_group_size; - struct wined3d_shader_thread_group_size image_2d_array_group_size; - struct wined3d_shader_thread_group_size image_3d_group_size; - - struct wined3d_pipeline_layout_vk *image_layout; - struct wined3d_pipeline_layout_vk *buffer_layout; -}; - -struct wined3d_device_vk -{ - struct wined3d_device d; - - struct wined3d_context_vk context_vk; - - VkDevice vk_device; - VkQueue vk_queue; - uint32_t vk_queue_family_index; - uint32_t timestamp_bits; - - struct wined3d_vk_info vk_info; - - struct wined3d_null_resources_vk null_resources_vk; - struct wined3d_null_views_vk null_views_vk; - - CRITICAL_SECTION allocator_cs; - struct wined3d_allocator allocator; - - struct wined3d_uav_clear_state_vk uav_clear_state; -}; - -static inline struct wined3d_device_vk *wined3d_device_vk(struct wined3d_device *device) -{ - return CONTAINING_RECORD(device, struct wined3d_device_vk, d); -} - -static inline struct wined3d_device_vk *wined3d_device_vk_from_allocator(struct wined3d_allocator *allocator) -{ - return CONTAINING_RECORD(allocator, struct wined3d_device_vk, allocator); -} - -static inline void wined3d_device_vk_allocator_lock(struct wined3d_device_vk *device_vk) -{ - EnterCriticalSection(&device_vk->allocator_cs); -} - -static inline void wined3d_device_vk_allocator_unlock(struct wined3d_device_vk *device_vk) -{ - LeaveCriticalSection(&device_vk->allocator_cs); -} - -bool wined3d_device_vk_create_null_resources(struct wined3d_device_vk *device_vk, - struct wined3d_context_vk *context_vk) DECLSPEC_HIDDEN; -bool wined3d_device_vk_create_null_views(struct wined3d_device_vk *device_vk, - struct wined3d_context_vk *context_vk) DECLSPEC_HIDDEN; -void wined3d_device_vk_destroy_null_resources(struct wined3d_device_vk *device_vk, - struct wined3d_context_vk *context_vk) DECLSPEC_HIDDEN; -void wined3d_device_vk_destroy_null_views(struct wined3d_device_vk *device_vk, - struct wined3d_context_vk *context_vk) DECLSPEC_HIDDEN; - -void wined3d_device_vk_uav_clear_state_init(struct wined3d_device_vk *device_vk) DECLSPEC_HIDDEN; -void wined3d_device_vk_uav_clear_state_cleanup(struct wined3d_device_vk *device_vk) DECLSPEC_HIDDEN; +#include "wined3d_vk.h"
struct wined3d_device_gl { diff --git a/dlls/wined3d/wined3d_vk.h b/dlls/wined3d/wined3d_vk.h index 43b40889451..e88608c6d36 100644 --- a/dlls/wined3d/wined3d_vk.h +++ b/dlls/wined3d/wined3d_vk.h @@ -690,4 +690,127 @@ unsigned int wined3d_adapter_vk_get_memory_type_index(const struct wined3d_adapt BOOL wined3d_adapter_vk_init_format_info(struct wined3d_adapter_vk *adapter_vk, const struct wined3d_vk_info *vk_info) DECLSPEC_HIDDEN;
+struct wined3d_null_resources_vk +{ + struct wined3d_bo_vk bo; + VkDescriptorBufferInfo buffer_info; + + struct wined3d_image_vk image_1d; + struct wined3d_image_vk image_2d; + struct wined3d_image_vk image_2dms; + struct wined3d_image_vk image_3d; +}; + +struct wined3d_null_views_vk +{ + VkBufferView vk_view_buffer_uint; + VkBufferView vk_view_buffer_float; + + VkDescriptorImageInfo vk_info_1d; + VkDescriptorImageInfo vk_info_2d; + VkDescriptorImageInfo vk_info_2dms; + VkDescriptorImageInfo vk_info_3d; + VkDescriptorImageInfo vk_info_cube; + VkDescriptorImageInfo vk_info_1d_array; + VkDescriptorImageInfo vk_info_2d_array; + VkDescriptorImageInfo vk_info_2dms_array; + VkDescriptorImageInfo vk_info_cube_array; +}; + +struct wined3d_allocator_chunk_vk +{ + struct wined3d_allocator_chunk c; + VkDeviceMemory vk_memory; +}; + +static inline struct wined3d_allocator_chunk_vk *wined3d_allocator_chunk_vk(struct wined3d_allocator_chunk *chunk) +{ + return CONTAINING_RECORD(chunk, struct wined3d_allocator_chunk_vk, c); +} + +void *wined3d_allocator_chunk_vk_map(struct wined3d_allocator_chunk_vk *chunk_vk, + struct wined3d_context_vk *context_vk) DECLSPEC_HIDDEN; +void wined3d_allocator_chunk_vk_unmap(struct wined3d_allocator_chunk_vk *chunk_vk, + struct wined3d_context_vk *context_vk) DECLSPEC_HIDDEN; + +struct wined3d_uav_clear_pipelines_vk +{ + VkPipeline buffer; + VkPipeline image_1d; + VkPipeline image_1d_array; + VkPipeline image_2d; + VkPipeline image_2d_array; + VkPipeline image_3d; +}; + +struct wined3d_uav_clear_state_vk +{ + struct wined3d_uav_clear_pipelines_vk float_pipelines; + struct wined3d_uav_clear_pipelines_vk uint_pipelines; + + struct wined3d_shader_thread_group_size buffer_group_size; + struct wined3d_shader_thread_group_size image_1d_group_size; + struct wined3d_shader_thread_group_size image_1d_array_group_size; + struct wined3d_shader_thread_group_size image_2d_group_size; + struct wined3d_shader_thread_group_size image_2d_array_group_size; + struct wined3d_shader_thread_group_size image_3d_group_size; + + struct wined3d_pipeline_layout_vk *image_layout; + struct wined3d_pipeline_layout_vk *buffer_layout; +}; + +struct wined3d_device_vk +{ + struct wined3d_device d; + + struct wined3d_context_vk context_vk; + + VkDevice vk_device; + VkQueue vk_queue; + uint32_t vk_queue_family_index; + uint32_t timestamp_bits; + + struct wined3d_vk_info vk_info; + + struct wined3d_null_resources_vk null_resources_vk; + struct wined3d_null_views_vk null_views_vk; + + CRITICAL_SECTION allocator_cs; + struct wined3d_allocator allocator; + + struct wined3d_uav_clear_state_vk uav_clear_state; +}; + +static inline struct wined3d_device_vk *wined3d_device_vk(struct wined3d_device *device) +{ + return CONTAINING_RECORD(device, struct wined3d_device_vk, d); +} + +static inline struct wined3d_device_vk *wined3d_device_vk_from_allocator(struct wined3d_allocator *allocator) +{ + return CONTAINING_RECORD(allocator, struct wined3d_device_vk, allocator); +} + +static inline void wined3d_device_vk_allocator_lock(struct wined3d_device_vk *device_vk) +{ + EnterCriticalSection(&device_vk->allocator_cs); +} + +static inline void wined3d_device_vk_allocator_unlock(struct wined3d_device_vk *device_vk) +{ + LeaveCriticalSection(&device_vk->allocator_cs); +} + +bool wined3d_device_vk_create_null_resources(struct wined3d_device_vk *device_vk, + struct wined3d_context_vk *context_vk) DECLSPEC_HIDDEN; +bool wined3d_device_vk_create_null_views(struct wined3d_device_vk *device_vk, + struct wined3d_context_vk *context_vk) DECLSPEC_HIDDEN; +void wined3d_device_vk_destroy_null_resources(struct wined3d_device_vk *device_vk, + struct wined3d_context_vk *context_vk) DECLSPEC_HIDDEN; +void wined3d_device_vk_destroy_null_views(struct wined3d_device_vk *device_vk, + struct wined3d_context_vk *context_vk) DECLSPEC_HIDDEN; + +void wined3d_device_vk_uav_clear_state_init(struct wined3d_device_vk *device_vk) DECLSPEC_HIDDEN; +void wined3d_device_vk_uav_clear_state_cleanup(struct wined3d_device_vk *device_vk) DECLSPEC_HIDDEN; + #endif /* __WINE_WINED3D_VK */
From: Zebediah Figura zfigura@codeweavers.com
--- dlls/wined3d/wined3d_private.h | 33 ++------------------------------- dlls/wined3d/wined3d_vk.h | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index b6540a2ced8..022d12dba26 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3715,8 +3715,6 @@ void wined3d_allocator_cleanup(struct wined3d_allocator *allocator) DECLSPEC_HID bool wined3d_allocator_init(struct wined3d_allocator *allocator, size_t pool_count, const struct wined3d_allocator_ops *allocator_ops) DECLSPEC_HIDDEN;
-#include "wined3d_vk.h" - struct wined3d_device_gl { struct wined3d_device d; @@ -4191,7 +4189,6 @@ HRESULT wined3d_texture_no3d_init(struct wined3d_texture *texture_no3d, struct w uint32_t flags, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
void wined3d_gl_texture_swizzle_from_color_fixup(GLint swizzle[4], struct color_fixup_desc fixup) DECLSPEC_HIDDEN; -void wined3d_vk_swizzle_from_color_fixup(VkComponentMapping *mapping, struct color_fixup_desc fixup) DECLSPEC_HIDDEN;
struct gl_texture { @@ -4268,34 +4265,6 @@ void wined3d_texture_gl_set_compatible_renderbuffer(struct wined3d_texture_gl *t struct wined3d_context_gl *context_gl, unsigned int level, const struct wined3d_rendertarget_info *rt) DECLSPEC_HIDDEN;
-struct wined3d_texture_vk -{ - struct wined3d_texture t; - - struct wined3d_image_vk image; - enum VkImageLayout layout; - uint32_t bind_mask; - - VkDescriptorImageInfo default_image_info; -}; - -static inline struct wined3d_texture_vk *wined3d_texture_vk(struct wined3d_texture *texture) -{ - return CONTAINING_RECORD(texture, struct wined3d_texture_vk, t); -} - -void wined3d_texture_vk_barrier(struct wined3d_texture_vk *texture_vk, - struct wined3d_context_vk *context_vk, uint32_t bind_mask) DECLSPEC_HIDDEN; -const VkDescriptorImageInfo *wined3d_texture_vk_get_default_image_info(struct wined3d_texture_vk *texture_vk, - struct wined3d_context_vk *context_vk) DECLSPEC_HIDDEN; -HRESULT wined3d_texture_vk_init(struct wined3d_texture_vk *texture_vk, struct wined3d_device *device, - const struct wined3d_resource_desc *desc, unsigned int layer_count, unsigned int level_count, - uint32_t flags, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; -void wined3d_texture_vk_make_generic(struct wined3d_texture_vk *texture_vk, - struct wined3d_context_vk *context_vk) DECLSPEC_HIDDEN; -BOOL wined3d_texture_vk_prepare_texture(struct wined3d_texture_vk *texture_vk, - struct wined3d_context_vk *context_vk) DECLSPEC_HIDDEN; - struct wined3d_renderbuffer_entry { struct list entry; @@ -4356,6 +4325,8 @@ void wined3d_sampler_gl_init(struct wined3d_sampler_gl *sampler_gl, struct wined3d_device *device, const struct wined3d_sampler_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
+#include "wined3d_vk.h" + struct wined3d_sampler_vk { struct wined3d_sampler s; diff --git a/dlls/wined3d/wined3d_vk.h b/dlls/wined3d/wined3d_vk.h index e88608c6d36..c8705790ad9 100644 --- a/dlls/wined3d/wined3d_vk.h +++ b/dlls/wined3d/wined3d_vk.h @@ -249,6 +249,7 @@ VkAccessFlags vk_access_mask_from_buffer_usage(VkBufferUsageFlags usage) DECLSPE VkPipelineStageFlags vk_pipeline_stage_mask_from_buffer_usage(VkBufferUsageFlags usage) DECLSPEC_HIDDEN; VkBufferUsageFlags vk_buffer_usage_from_bind_flags(uint32_t bind_flags) DECLSPEC_HIDDEN; VkMemoryPropertyFlags vk_memory_type_from_access_flags(uint32_t access, uint32_t usage) DECLSPEC_HIDDEN; +void wined3d_vk_swizzle_from_color_fixup(VkComponentMapping *mapping, struct color_fixup_desc fixup) DECLSPEC_HIDDEN; const char *wined3d_debug_vkresult(VkResult vr) DECLSPEC_HIDDEN;
struct wined3d_bo_vk @@ -813,4 +814,32 @@ void wined3d_device_vk_destroy_null_views(struct wined3d_device_vk *device_vk, void wined3d_device_vk_uav_clear_state_init(struct wined3d_device_vk *device_vk) DECLSPEC_HIDDEN; void wined3d_device_vk_uav_clear_state_cleanup(struct wined3d_device_vk *device_vk) DECLSPEC_HIDDEN;
+struct wined3d_texture_vk +{ + struct wined3d_texture t; + + struct wined3d_image_vk image; + enum VkImageLayout layout; + uint32_t bind_mask; + + VkDescriptorImageInfo default_image_info; +}; + +static inline struct wined3d_texture_vk *wined3d_texture_vk(struct wined3d_texture *texture) +{ + return CONTAINING_RECORD(texture, struct wined3d_texture_vk, t); +} + +void wined3d_texture_vk_barrier(struct wined3d_texture_vk *texture_vk, + struct wined3d_context_vk *context_vk, uint32_t bind_mask) DECLSPEC_HIDDEN; +const VkDescriptorImageInfo *wined3d_texture_vk_get_default_image_info(struct wined3d_texture_vk *texture_vk, + struct wined3d_context_vk *context_vk) DECLSPEC_HIDDEN; +HRESULT wined3d_texture_vk_init(struct wined3d_texture_vk *texture_vk, struct wined3d_device *device, + const struct wined3d_resource_desc *desc, unsigned int layer_count, unsigned int level_count, + uint32_t flags, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; +void wined3d_texture_vk_make_generic(struct wined3d_texture_vk *texture_vk, + struct wined3d_context_vk *context_vk) DECLSPEC_HIDDEN; +BOOL wined3d_texture_vk_prepare_texture(struct wined3d_texture_vk *texture_vk, + struct wined3d_context_vk *context_vk) DECLSPEC_HIDDEN; + #endif /* __WINE_WINED3D_VK */
From: Zebediah Figura zfigura@codeweavers.com
--- dlls/wined3d/wined3d_private.h | 21 ++------------------- dlls/wined3d/wined3d_vk.h | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 022d12dba26..f293ef04624 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4325,25 +4325,6 @@ void wined3d_sampler_gl_init(struct wined3d_sampler_gl *sampler_gl, struct wined3d_device *device, const struct wined3d_sampler_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
-#include "wined3d_vk.h" - -struct wined3d_sampler_vk -{ - struct wined3d_sampler s; - - VkDescriptorImageInfo vk_image_info; - uint64_t command_buffer_id; -}; - -static inline struct wined3d_sampler_vk *wined3d_sampler_vk(struct wined3d_sampler *sampler) -{ - return CONTAINING_RECORD(sampler, struct wined3d_sampler_vk, s); -} - -void wined3d_sampler_vk_init(struct wined3d_sampler_vk *sampler_vk, - struct wined3d_device *device, const struct wined3d_sampler_desc *desc, - void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; - struct wined3d_vertex_declaration_element { const struct wined3d_format *format; @@ -4795,6 +4776,8 @@ HRESULT wined3d_buffer_gl_init(struct wined3d_buffer_gl *buffer_gl, struct wined const struct wined3d_buffer_desc *desc, const struct wined3d_sub_resource_data *data, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
+#include "wined3d_vk.h" + struct wined3d_buffer_vk { struct wined3d_buffer b; diff --git a/dlls/wined3d/wined3d_vk.h b/dlls/wined3d/wined3d_vk.h index c8705790ad9..deb855fe55c 100644 --- a/dlls/wined3d/wined3d_vk.h +++ b/dlls/wined3d/wined3d_vk.h @@ -842,4 +842,21 @@ void wined3d_texture_vk_make_generic(struct wined3d_texture_vk *texture_vk, BOOL wined3d_texture_vk_prepare_texture(struct wined3d_texture_vk *texture_vk, struct wined3d_context_vk *context_vk) DECLSPEC_HIDDEN;
+struct wined3d_sampler_vk +{ + struct wined3d_sampler s; + + VkDescriptorImageInfo vk_image_info; + uint64_t command_buffer_id; +}; + +static inline struct wined3d_sampler_vk *wined3d_sampler_vk(struct wined3d_sampler *sampler) +{ + return CONTAINING_RECORD(sampler, struct wined3d_sampler_vk, s); +} + +void wined3d_sampler_vk_init(struct wined3d_sampler_vk *sampler_vk, + struct wined3d_device *device, const struct wined3d_sampler_desc *desc, + void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; + #endif /* __WINE_WINED3D_VK */
From: Zebediah Figura zfigura@codeweavers.com
--- dlls/wined3d/wined3d_private.h | 21 --------------------- dlls/wined3d/wined3d_vk.h | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index f293ef04624..e058d4ef9cb 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -112,7 +112,6 @@ static inline const char *wined3d_get_line(const char **ptr, const char *end)
struct wined3d_fragment_pipe_ops; struct wined3d_adapter; -struct wined3d_buffer_vk; struct wined3d_context; struct wined3d_context_vk; struct wined3d_gl_info; @@ -4778,26 +4777,6 @@ HRESULT wined3d_buffer_gl_init(struct wined3d_buffer_gl *buffer_gl, struct wined
#include "wined3d_vk.h"
-struct wined3d_buffer_vk -{ - struct wined3d_buffer b; - - VkDescriptorBufferInfo buffer_info; - uint32_t bind_mask; -}; - -static inline struct wined3d_buffer_vk *wined3d_buffer_vk(struct wined3d_buffer *buffer) -{ - return CONTAINING_RECORD(buffer, struct wined3d_buffer_vk, b); -} - -void wined3d_buffer_vk_barrier(struct wined3d_buffer_vk *buffer_vk, - struct wined3d_context_vk *context_vk, uint32_t bind_mask) DECLSPEC_HIDDEN; -const VkDescriptorBufferInfo *wined3d_buffer_vk_get_buffer_info(struct wined3d_buffer_vk *buffer_vk) DECLSPEC_HIDDEN; -HRESULT wined3d_buffer_vk_init(struct wined3d_buffer_vk *buffer_vk, struct wined3d_device *device, - const struct wined3d_buffer_desc *desc, const struct wined3d_sub_resource_data *data, - void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; - static inline void wined3d_resource_vk_barrier(struct wined3d_resource *resource, struct wined3d_context_vk *context_vk, uint32_t bind_mask) { diff --git a/dlls/wined3d/wined3d_vk.h b/dlls/wined3d/wined3d_vk.h index deb855fe55c..6514ece2068 100644 --- a/dlls/wined3d/wined3d_vk.h +++ b/dlls/wined3d/wined3d_vk.h @@ -25,6 +25,7 @@ #define VK_NO_PROTOTYPES #include "wine/vulkan.h"
+struct wined3d_buffer_vk; struct wined3d_device_vk;
#define VK_INSTANCE_FUNCS() \ @@ -859,4 +860,24 @@ void wined3d_sampler_vk_init(struct wined3d_sampler_vk *sampler_vk, struct wined3d_device *device, const struct wined3d_sampler_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
+struct wined3d_buffer_vk +{ + struct wined3d_buffer b; + + VkDescriptorBufferInfo buffer_info; + uint32_t bind_mask; +}; + +static inline struct wined3d_buffer_vk *wined3d_buffer_vk(struct wined3d_buffer *buffer) +{ + return CONTAINING_RECORD(buffer, struct wined3d_buffer_vk, b); +} + +void wined3d_buffer_vk_barrier(struct wined3d_buffer_vk *buffer_vk, + struct wined3d_context_vk *context_vk, uint32_t bind_mask) DECLSPEC_HIDDEN; +const VkDescriptorBufferInfo *wined3d_buffer_vk_get_buffer_info(struct wined3d_buffer_vk *buffer_vk) DECLSPEC_HIDDEN; +HRESULT wined3d_buffer_vk_init(struct wined3d_buffer_vk *buffer_vk, struct wined3d_device *device, + const struct wined3d_buffer_desc *desc, const struct wined3d_sub_resource_data *data, + void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; + #endif /* __WINE_WINED3D_VK */
From: Zebediah Figura zfigura@codeweavers.com
--- dlls/wined3d/wined3d_private.h | 49 ++-------------------------------- dlls/wined3d/wined3d_vk.h | 45 +++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 47 deletions(-)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index e058d4ef9cb..e6aaeed9adf 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4775,17 +4775,6 @@ HRESULT wined3d_buffer_gl_init(struct wined3d_buffer_gl *buffer_gl, struct wined const struct wined3d_buffer_desc *desc, const struct wined3d_sub_resource_data *data, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
-#include "wined3d_vk.h" - -static inline void wined3d_resource_vk_barrier(struct wined3d_resource *resource, - struct wined3d_context_vk *context_vk, uint32_t bind_mask) -{ - if (resource->type == WINED3D_RTYPE_BUFFER) - wined3d_buffer_vk_barrier(wined3d_buffer_vk(buffer_from_resource(resource)), context_vk, bind_mask); - else - wined3d_texture_vk_barrier(wined3d_texture_vk(texture_from_resource(resource)), context_vk, bind_mask); -} - struct wined3d_rendertarget_view { LONG refcount; @@ -4842,42 +4831,6 @@ HRESULT wined3d_rendertarget_view_gl_init(struct wined3d_rendertarget_view_gl *v const struct wined3d_view_desc *desc, struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
-struct wined3d_rendertarget_view_vk -{ - struct wined3d_rendertarget_view v; - - VkImageView vk_image_view; - uint64_t command_buffer_id; -}; - -static inline struct wined3d_rendertarget_view_vk *wined3d_rendertarget_view_vk( - struct wined3d_rendertarget_view *view) -{ - return CONTAINING_RECORD(view, struct wined3d_rendertarget_view_vk, v); -} - -static inline void wined3d_rendertarget_view_vk_barrier(struct wined3d_rendertarget_view_vk *rtv_vk, - struct wined3d_context_vk *context_vk, uint32_t bind_mask) -{ - wined3d_resource_vk_barrier(rtv_vk->v.resource, context_vk, bind_mask); -} - -static inline VkImageView wined3d_rendertarget_view_vk_get_image_view(struct wined3d_rendertarget_view_vk *rtv_vk, - struct wined3d_context_vk *context_vk) -{ - struct wined3d_texture_vk *texture_vk; - - if (rtv_vk->vk_image_view) - return rtv_vk->vk_image_view; - - texture_vk = wined3d_texture_vk(wined3d_texture_from_resource(rtv_vk->v.resource)); - return wined3d_texture_vk_get_default_image_info(texture_vk, context_vk)->imageView; -} - -HRESULT wined3d_rendertarget_view_vk_init(struct wined3d_rendertarget_view_vk *view_vk, - const struct wined3d_view_desc *desc, struct wined3d_resource *resource, - void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; - struct wined3d_shader_resource_view { LONG refcount; @@ -4916,6 +4869,8 @@ HRESULT wined3d_shader_resource_view_gl_init(struct wined3d_shader_resource_view void wined3d_shader_resource_view_gl_update(struct wined3d_shader_resource_view_gl *srv_gl, struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN;
+#include "wined3d_vk.h" + struct wined3d_view_vk { struct wined3d_bo_user bo_user; diff --git a/dlls/wined3d/wined3d_vk.h b/dlls/wined3d/wined3d_vk.h index 6514ece2068..36d832130ba 100644 --- a/dlls/wined3d/wined3d_vk.h +++ b/dlls/wined3d/wined3d_vk.h @@ -880,4 +880,49 @@ HRESULT wined3d_buffer_vk_init(struct wined3d_buffer_vk *buffer_vk, struct wined const struct wined3d_buffer_desc *desc, const struct wined3d_sub_resource_data *data, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
+static inline void wined3d_resource_vk_barrier(struct wined3d_resource *resource, + struct wined3d_context_vk *context_vk, uint32_t bind_mask) +{ + if (resource->type == WINED3D_RTYPE_BUFFER) + wined3d_buffer_vk_barrier(wined3d_buffer_vk(buffer_from_resource(resource)), context_vk, bind_mask); + else + wined3d_texture_vk_barrier(wined3d_texture_vk(texture_from_resource(resource)), context_vk, bind_mask); +} + +struct wined3d_rendertarget_view_vk +{ + struct wined3d_rendertarget_view v; + + VkImageView vk_image_view; + uint64_t command_buffer_id; +}; + +static inline struct wined3d_rendertarget_view_vk *wined3d_rendertarget_view_vk( + struct wined3d_rendertarget_view *view) +{ + return CONTAINING_RECORD(view, struct wined3d_rendertarget_view_vk, v); +} + +static inline void wined3d_rendertarget_view_vk_barrier(struct wined3d_rendertarget_view_vk *rtv_vk, + struct wined3d_context_vk *context_vk, uint32_t bind_mask) +{ + wined3d_resource_vk_barrier(rtv_vk->v.resource, context_vk, bind_mask); +} + +static inline VkImageView wined3d_rendertarget_view_vk_get_image_view(struct wined3d_rendertarget_view_vk *rtv_vk, + struct wined3d_context_vk *context_vk) +{ + struct wined3d_texture_vk *texture_vk; + + if (rtv_vk->vk_image_view) + return rtv_vk->vk_image_view; + + texture_vk = wined3d_texture_vk(wined3d_texture_from_resource(rtv_vk->v.resource)); + return wined3d_texture_vk_get_default_image_info(texture_vk, context_vk)->imageView; +} + +HRESULT wined3d_rendertarget_view_vk_init(struct wined3d_rendertarget_view_vk *view_vk, + const struct wined3d_view_desc *desc, struct wined3d_resource *resource, + void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; + #endif /* __WINE_WINED3D_VK */
From: Zebediah Figura zfigura@codeweavers.com
--- dlls/wined3d/wined3d_private.h | 43 ++-------------------------------- dlls/wined3d/wined3d_vk.h | 39 ++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 41 deletions(-)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index e6aaeed9adf..aedfc3f789f 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4869,47 +4869,6 @@ HRESULT wined3d_shader_resource_view_gl_init(struct wined3d_shader_resource_view void wined3d_shader_resource_view_gl_update(struct wined3d_shader_resource_view_gl *srv_gl, struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN;
-#include "wined3d_vk.h" - -struct wined3d_view_vk -{ - struct wined3d_bo_user bo_user; - union - { - VkBufferView vk_buffer_view; - VkDescriptorImageInfo vk_image_info; - } u; - uint64_t command_buffer_id; -}; - -struct wined3d_shader_resource_view_vk -{ - struct wined3d_shader_resource_view v; - struct wined3d_view_vk view_vk; -}; - -static inline struct wined3d_shader_resource_view_vk *wined3d_shader_resource_view_vk( - struct wined3d_shader_resource_view *view) -{ - return CONTAINING_RECORD(view, struct wined3d_shader_resource_view_vk, v); -} - -static inline void wined3d_shader_resource_view_vk_barrier(struct wined3d_shader_resource_view_vk *srv_vk, - struct wined3d_context_vk *context_vk, uint32_t bind_mask) -{ - wined3d_resource_vk_barrier(srv_vk->v.resource, context_vk, bind_mask); -} - -void wined3d_shader_resource_view_vk_generate_mipmap(struct wined3d_shader_resource_view_vk *srv_vk, - struct wined3d_context_vk *context_vk) DECLSPEC_HIDDEN; -HRESULT wined3d_shader_resource_view_vk_init(struct wined3d_shader_resource_view_vk *view_vk, - const struct wined3d_view_desc *desc, struct wined3d_resource *resource, - void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; -void wined3d_shader_resource_view_vk_update_buffer(struct wined3d_shader_resource_view_vk *view_vk, - struct wined3d_context_vk *context_vk) DECLSPEC_HIDDEN; -void wined3d_shader_resource_view_vk_update_layout(struct wined3d_shader_resource_view_vk *srv_vk, - VkImageLayout layout) DECLSPEC_HIDDEN; - struct wined3d_unordered_access_view { LONG refcount; @@ -4954,6 +4913,8 @@ HRESULT wined3d_unordered_access_view_gl_init(struct wined3d_unordered_access_vi void wined3d_unordered_access_view_gl_update(struct wined3d_unordered_access_view_gl *uav_gl, struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN;
+#include "wined3d_vk.h" + struct wined3d_unordered_access_view_vk { struct wined3d_unordered_access_view v; diff --git a/dlls/wined3d/wined3d_vk.h b/dlls/wined3d/wined3d_vk.h index 36d832130ba..d2067d5f9fb 100644 --- a/dlls/wined3d/wined3d_vk.h +++ b/dlls/wined3d/wined3d_vk.h @@ -925,4 +925,43 @@ HRESULT wined3d_rendertarget_view_vk_init(struct wined3d_rendertarget_view_vk *v const struct wined3d_view_desc *desc, struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
+struct wined3d_view_vk +{ + struct wined3d_bo_user bo_user; + union + { + VkBufferView vk_buffer_view; + VkDescriptorImageInfo vk_image_info; + } u; + uint64_t command_buffer_id; +}; + +struct wined3d_shader_resource_view_vk +{ + struct wined3d_shader_resource_view v; + struct wined3d_view_vk view_vk; +}; + +static inline struct wined3d_shader_resource_view_vk *wined3d_shader_resource_view_vk( + struct wined3d_shader_resource_view *view) +{ + return CONTAINING_RECORD(view, struct wined3d_shader_resource_view_vk, v); +} + +static inline void wined3d_shader_resource_view_vk_barrier(struct wined3d_shader_resource_view_vk *srv_vk, + struct wined3d_context_vk *context_vk, uint32_t bind_mask) +{ + wined3d_resource_vk_barrier(srv_vk->v.resource, context_vk, bind_mask); +} + +void wined3d_shader_resource_view_vk_generate_mipmap(struct wined3d_shader_resource_view_vk *srv_vk, + struct wined3d_context_vk *context_vk) DECLSPEC_HIDDEN; +HRESULT wined3d_shader_resource_view_vk_init(struct wined3d_shader_resource_view_vk *view_vk, + const struct wined3d_view_desc *desc, struct wined3d_resource *resource, + void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; +void wined3d_shader_resource_view_vk_update_buffer(struct wined3d_shader_resource_view_vk *view_vk, + struct wined3d_context_vk *context_vk) DECLSPEC_HIDDEN; +void wined3d_shader_resource_view_vk_update_layout(struct wined3d_shader_resource_view_vk *srv_vk, + VkImageLayout layout) DECLSPEC_HIDDEN; + #endif /* __WINE_WINED3D_VK */
This merge request was approved by Jan Sikorski.