Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
2084f8bc
Commit
2084f8bc
authored
Nov 20, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevulkan: Use VK_EXT_external_memory_host extension to map memory on wow64.
parent
bbdad747
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
4 deletions
+12
-4
make_vulkan
dlls/winevulkan/make_vulkan
+2
-0
vulkan.c
dlls/winevulkan/vulkan.c
+0
-0
vulkan_private.h
dlls/winevulkan/vulkan_private.h
+4
-0
vulkan_thunks.c
dlls/winevulkan/vulkan_thunks.c
+4
-4
vulkan_thunks.h
dlls/winevulkan/vulkan_thunks.h
+2
-0
No files found.
dlls/winevulkan/make_vulkan
View file @
2084f8bc
...
...
@@ -213,6 +213,8 @@ FUNCTION_OVERRIDES = {
"vkFreeMemory"
:
{
"dispatch"
:
True
,
"driver"
:
False
,
"thunk"
:
ThunkType
.
PRIVATE
},
"vkMapMemory"
:
{
"dispatch"
:
True
,
"driver"
:
False
,
"thunk"
:
ThunkType
.
PRIVATE
},
"vkUnmapMemory"
:
{
"dispatch"
:
True
,
"driver"
:
False
,
"thunk"
:
ThunkType
.
PRIVATE
},
"vkCreateBuffer"
:
{
"dispatch"
:
True
,
"driver"
:
False
,
"thunk"
:
ThunkType
.
PRIVATE
},
"vkCreateImage"
:
{
"dispatch"
:
True
,
"driver"
:
False
,
"thunk"
:
ThunkType
.
PRIVATE
},
# VK_KHR_surface
"vkDestroySurfaceKHR"
:
{
"dispatch"
:
True
,
"driver"
:
True
,
"thunk"
:
ThunkType
.
NONE
},
...
...
dlls/winevulkan/vulkan.c
View file @
2084f8bc
This diff is collapsed.
Click to expand it.
dlls/winevulkan/vulkan_private.h
View file @
2084f8bc
...
...
@@ -125,9 +125,12 @@ struct wine_phys_dev
VkPhysicalDevice
handle
;
/* client physical device */
VkPhysicalDevice
phys_dev
;
/* native physical device */
VkPhysicalDeviceMemoryProperties
memory_properties
;
VkExtensionProperties
*
extensions
;
uint32_t
extension_count
;
uint32_t
external_memory_align
;
struct
wine_vk_mapping
mapping
;
};
...
...
@@ -172,6 +175,7 @@ static inline struct wine_cmd_pool *wine_cmd_pool_from_handle(VkCommandPool hand
struct
wine_device_memory
{
VkDeviceMemory
memory
;
void
*
mapping
;
};
static
inline
struct
wine_device_memory
*
wine_device_memory_from_handle
(
VkDeviceMemory
handle
)
...
...
dlls/winevulkan/vulkan_thunks.c
View file @
2084f8bc
...
...
@@ -32414,7 +32414,7 @@ static NTSTATUS thunk64_vkCreateBuffer(void *args)
TRACE
(
"%p, %p, %p, %p
\n
"
,
params
->
device
,
params
->
pCreateInfo
,
params
->
pAllocator
,
params
->
pBuffer
);
params
->
result
=
wine_
device_from_handle
(
params
->
device
)
->
funcs
.
p_vkCreateBuffer
(
wine_device_from_handle
(
params
->
device
)
->
device
,
params
->
pCreateInfo
,
NULL
,
params
->
pBuffer
);
params
->
result
=
wine_
vkCreateBuffer
(
params
->
device
,
params
->
pCreateInfo
,
params
->
pAllocator
,
params
->
pBuffer
);
return
STATUS_SUCCESS
;
}
#endif
/* _WIN64 */
...
...
@@ -32436,7 +32436,7 @@ static NTSTATUS thunk32_vkCreateBuffer(void *args)
init_conversion_context
(
&
ctx
);
convert_VkBufferCreateInfo_win32_to_host
(
&
ctx
,
(
const
VkBufferCreateInfo32
*
)
UlongToPtr
(
params
->
pCreateInfo
),
&
pCreateInfo_host
);
params
->
result
=
wine_
device_from_handle
((
VkDevice
)
UlongToPtr
(
params
->
device
))
->
funcs
.
p_vkCreateBuffer
(
wine_device_from_handle
((
VkDevice
)
UlongToPtr
(
params
->
device
))
->
device
,
&
pCreateInfo_host
,
NULL
,
(
VkBuffer
*
)
UlongToPtr
(
params
->
pBuffer
));
params
->
result
=
wine_
vkCreateBuffer
((
VkDevice
)
UlongToPtr
(
params
->
device
),
&
pCreateInfo_host
,
(
const
VkAllocationCallbacks
*
)
UlongToPtr
(
params
->
pAllocator
)
,
(
VkBuffer
*
)
UlongToPtr
(
params
->
pBuffer
));
free_conversion_context
(
&
ctx
);
return
STATUS_SUCCESS
;
}
...
...
@@ -33025,7 +33025,7 @@ static NTSTATUS thunk64_vkCreateImage(void *args)
TRACE
(
"%p, %p, %p, %p
\n
"
,
params
->
device
,
params
->
pCreateInfo
,
params
->
pAllocator
,
params
->
pImage
);
params
->
result
=
wine_
device_from_handle
(
params
->
device
)
->
funcs
.
p_vkCreateImage
(
wine_device_from_handle
(
params
->
device
)
->
device
,
params
->
pCreateInfo
,
NULL
,
params
->
pImage
);
params
->
result
=
wine_
vkCreateImage
(
params
->
device
,
params
->
pCreateInfo
,
params
->
pAllocator
,
params
->
pImage
);
return
STATUS_SUCCESS
;
}
#endif
/* _WIN64 */
...
...
@@ -33047,7 +33047,7 @@ static NTSTATUS thunk32_vkCreateImage(void *args)
init_conversion_context
(
&
ctx
);
convert_VkImageCreateInfo_win32_to_host
(
&
ctx
,
(
const
VkImageCreateInfo32
*
)
UlongToPtr
(
params
->
pCreateInfo
),
&
pCreateInfo_host
);
params
->
result
=
wine_
device_from_handle
((
VkDevice
)
UlongToPtr
(
params
->
device
))
->
funcs
.
p_vkCreateImage
(
wine_device_from_handle
((
VkDevice
)
UlongToPtr
(
params
->
device
))
->
device
,
&
pCreateInfo_host
,
NULL
,
(
VkImage
*
)
UlongToPtr
(
params
->
pImage
));
params
->
result
=
wine_
vkCreateImage
((
VkDevice
)
UlongToPtr
(
params
->
device
),
&
pCreateInfo_host
,
(
const
VkAllocationCallbacks
*
)
UlongToPtr
(
params
->
pAllocator
)
,
(
VkImage
*
)
UlongToPtr
(
params
->
pImage
));
free_conversion_context
(
&
ctx
);
return
STATUS_SUCCESS
;
}
dlls/winevulkan/vulkan_thunks.h
View file @
2084f8bc
...
...
@@ -17,10 +17,12 @@
/* Functions for which we have custom implementations outside of the thunks. */
VkResult
wine_vkAllocateCommandBuffers
(
VkDevice
device
,
const
VkCommandBufferAllocateInfo
*
pAllocateInfo
,
VkCommandBuffer
*
pCommandBuffers
)
DECLSPEC_HIDDEN
;
VkResult
wine_vkAllocateMemory
(
VkDevice
device
,
const
VkMemoryAllocateInfo
*
pAllocateInfo
,
const
VkAllocationCallbacks
*
pAllocator
,
VkDeviceMemory
*
pMemory
)
DECLSPEC_HIDDEN
;
VkResult
wine_vkCreateBuffer
(
VkDevice
device
,
const
VkBufferCreateInfo
*
pCreateInfo
,
const
VkAllocationCallbacks
*
pAllocator
,
VkBuffer
*
pBuffer
)
DECLSPEC_HIDDEN
;
VkResult
wine_vkCreateCommandPool
(
VkDevice
device
,
const
VkCommandPoolCreateInfo
*
pCreateInfo
,
const
VkAllocationCallbacks
*
pAllocator
,
VkCommandPool
*
pCommandPool
,
void
*
client_ptr
)
DECLSPEC_HIDDEN
;
VkResult
wine_vkCreateDebugReportCallbackEXT
(
VkInstance
instance
,
const
VkDebugReportCallbackCreateInfoEXT
*
pCreateInfo
,
const
VkAllocationCallbacks
*
pAllocator
,
VkDebugReportCallbackEXT
*
pCallback
)
DECLSPEC_HIDDEN
;
VkResult
wine_vkCreateDebugUtilsMessengerEXT
(
VkInstance
instance
,
const
VkDebugUtilsMessengerCreateInfoEXT
*
pCreateInfo
,
const
VkAllocationCallbacks
*
pAllocator
,
VkDebugUtilsMessengerEXT
*
pMessenger
)
DECLSPEC_HIDDEN
;
VkResult
wine_vkCreateDevice
(
VkPhysicalDevice
physicalDevice
,
const
VkDeviceCreateInfo
*
pCreateInfo
,
const
VkAllocationCallbacks
*
pAllocator
,
VkDevice
*
pDevice
,
void
*
client_ptr
)
DECLSPEC_HIDDEN
;
VkResult
wine_vkCreateImage
(
VkDevice
device
,
const
VkImageCreateInfo
*
pCreateInfo
,
const
VkAllocationCallbacks
*
pAllocator
,
VkImage
*
pImage
)
DECLSPEC_HIDDEN
;
VkResult
wine_vkCreateInstance
(
const
VkInstanceCreateInfo
*
pCreateInfo
,
const
VkAllocationCallbacks
*
pAllocator
,
VkInstance
*
pInstance
,
void
*
client_ptr
)
DECLSPEC_HIDDEN
;
VkResult
wine_vkCreateWin32SurfaceKHR
(
VkInstance
instance
,
const
VkWin32SurfaceCreateInfoKHR
*
pCreateInfo
,
const
VkAllocationCallbacks
*
pAllocator
,
VkSurfaceKHR
*
pSurface
)
DECLSPEC_HIDDEN
;
void
wine_vkDestroyCommandPool
(
VkDevice
device
,
VkCommandPool
commandPool
,
const
VkAllocationCallbacks
*
pAllocator
)
DECLSPEC_HIDDEN
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment