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
ec1910da
Commit
ec1910da
authored
Nov 24, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Dec 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Use "host" instead of "native" in vulkan wrappers.
parent
c0042af5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
vulkan.c
dlls/winemac.drv/vulkan.c
+18
-18
No files found.
dlls/winemac.drv/vulkan.c
View file @
ec1910da
...
...
@@ -56,7 +56,7 @@ struct wine_vk_surface
{
macdrv_metal_device
device
;
macdrv_metal_view
view
;
VkSurfaceKHR
surface
;
/* native
surface */
VkSurfaceKHR
host_surface
;
/* host
surface */
};
typedef
struct
VkMacOSSurfaceCreateInfoMVK
...
...
@@ -194,7 +194,7 @@ static void wine_vk_surface_destroy(VkInstance instance, struct wine_vk_surface
if
(
!
surface
)
return
;
pvkDestroySurfaceKHR
(
instance
,
surface
->
surface
,
NULL
/* allocator */
);
pvkDestroySurfaceKHR
(
instance
,
surface
->
host_
surface
,
NULL
/* allocator */
);
if
(
surface
->
view
)
macdrv_view_release_metal_view
(
surface
->
view
);
...
...
@@ -243,7 +243,7 @@ static VkResult macdrv_vkCreateSwapchainKHR(VkDevice device,
FIXME
(
"Support for allocation callbacks not implemented yet
\n
"
);
create_info_host
=
*
create_info
;
create_info_host
.
surface
=
surface_from_handle
(
create_info
->
surface
)
->
surface
;
create_info_host
.
surface
=
surface_from_handle
(
create_info
->
surface
)
->
host_
surface
;
return
pvkCreateSwapchainKHR
(
device
,
&
create_info_host
,
NULL
/* allocator */
,
swapchain
);
...
...
@@ -301,7 +301,7 @@ static VkResult macdrv_vkCreateWin32SurfaceKHR(VkInstance instance,
create_info_host
.
flags
=
0
;
/* reserved */
create_info_host
.
pLayer
=
macdrv_view_get_metal_layer
(
mac_surface
->
view
);
res
=
pvkCreateMetalSurfaceEXT
(
instance
,
&
create_info_host
,
NULL
/* allocator */
,
&
mac_surface
->
surface
);
res
=
pvkCreateMetalSurfaceEXT
(
instance
,
&
create_info_host
,
NULL
/* allocator */
,
&
mac_surface
->
host_
surface
);
}
else
{
...
...
@@ -311,7 +311,7 @@ static VkResult macdrv_vkCreateWin32SurfaceKHR(VkInstance instance,
create_info_host
.
flags
=
0
;
/* reserved */
create_info_host
.
pView
=
macdrv_view_get_metal_layer
(
mac_surface
->
view
);
res
=
pvkCreateMacOSSurfaceMVK
(
instance
,
&
create_info_host
,
NULL
/* allocator */
,
&
mac_surface
->
surface
);
res
=
pvkCreateMacOSSurfaceMVK
(
instance
,
&
create_info_host
,
NULL
/* allocator */
,
&
mac_surface
->
host_
surface
);
}
if
(
res
!=
VK_SUCCESS
)
{
...
...
@@ -419,7 +419,7 @@ static VkResult macdrv_vkEnumerateInstanceExtensionProperties(const char *layer_
return
res
;
}
static
const
char
*
wine_vk_
native
_fn_name
(
const
char
*
name
)
static
const
char
*
wine_vk_
host
_fn_name
(
const
char
*
name
)
{
const
char
*
create_surface_name
=
pvkCreateMetalSurfaceEXT
?
"vkCreateMetalSurfaceEXT"
:
"vkCreateMacOSSurfaceMVK"
;
...
...
@@ -427,7 +427,7 @@ static const char *wine_vk_native_fn_name(const char *name)
if
(
!
strcmp
(
name
,
"vkCreateWin32SurfaceKHR"
))
return
create_surface_name
;
/* We just need something where non-NULL is returned if the correct extension is enabled.
* So since there is no
native
equivalent of this function check for the create
* So since there is no
host
equivalent of this function check for the create
* surface function.
*/
if
(
!
strcmp
(
name
,
"vkGetPhysicalDeviceWin32PresentationSupportKHR"
))
...
...
@@ -442,7 +442,7 @@ static void *macdrv_vkGetDeviceProcAddr(VkDevice device, const char *name)
TRACE
(
"%p, %s
\n
"
,
device
,
debugstr_a
(
name
));
if
(
!
pvkGetDeviceProcAddr
(
device
,
wine_vk_
native
_fn_name
(
name
)))
if
(
!
pvkGetDeviceProcAddr
(
device
,
wine_vk_
host
_fn_name
(
name
)))
return
NULL
;
if
((
proc_addr
=
macdrv_get_vk_device_proc_addr
(
name
)))
...
...
@@ -457,7 +457,7 @@ static void *macdrv_vkGetInstanceProcAddr(VkInstance instance, const char *name)
TRACE
(
"%p, %s
\n
"
,
instance
,
debugstr_a
(
name
));
if
(
!
pvkGetInstanceProcAddr
(
instance
,
wine_vk_
native
_fn_name
(
name
)))
if
(
!
pvkGetInstanceProcAddr
(
instance
,
wine_vk_
host
_fn_name
(
name
)))
return
NULL
;
if
((
proc_addr
=
macdrv_get_vk_instance_proc_addr
(
instance
,
name
)))
...
...
@@ -474,7 +474,7 @@ static VkResult macdrv_vkGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevi
TRACE
(
"%p, %p, %p
\n
"
,
phys_dev
,
surface_info
,
capabilities
);
surface_info_host
=
*
surface_info
;
surface_info_host
.
surface
=
surface_from_handle
(
surface_info
->
surface
)
->
surface
;
surface_info_host
.
surface
=
surface_from_handle
(
surface_info
->
surface
)
->
host_
surface
;
return
pvkGetPhysicalDeviceSurfaceCapabilities2KHR
(
phys_dev
,
&
surface_info_host
,
capabilities
);
}
...
...
@@ -486,7 +486,7 @@ static VkResult macdrv_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevic
TRACE
(
"%p, 0x%s, %p
\n
"
,
phys_dev
,
wine_dbgstr_longlong
(
surface
),
capabilities
);
return
pvkGetPhysicalDeviceSurfaceCapabilitiesKHR
(
phys_dev
,
mac_surface
->
surface
,
return
pvkGetPhysicalDeviceSurfaceCapabilitiesKHR
(
phys_dev
,
mac_surface
->
host_
surface
,
capabilities
);
}
...
...
@@ -498,7 +498,7 @@ static VkResult macdrv_vkGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice ph
TRACE
(
"%p, %p, %p, %p
\n
"
,
phys_dev
,
surface_info
,
count
,
formats
);
surface_info_host
=
*
surface_info
;
surface_info_host
.
surface
=
surface_from_handle
(
surface_info
->
surface
)
->
surface
;
surface_info_host
.
surface
=
surface_from_handle
(
surface_info
->
surface
)
->
host_
surface
;
return
pvkGetPhysicalDeviceSurfaceFormats2KHR
(
phys_dev
,
&
surface_info_host
,
count
,
formats
);
}
...
...
@@ -510,7 +510,7 @@ static VkResult macdrv_vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice phy
TRACE
(
"%p, 0x%s, %p, %p
\n
"
,
phys_dev
,
wine_dbgstr_longlong
(
surface
),
count
,
formats
);
return
pvkGetPhysicalDeviceSurfaceFormatsKHR
(
phys_dev
,
mac_surface
->
surface
,
return
pvkGetPhysicalDeviceSurfaceFormatsKHR
(
phys_dev
,
mac_surface
->
host_
surface
,
count
,
formats
);
}
...
...
@@ -521,7 +521,7 @@ static VkResult macdrv_vkGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevic
TRACE
(
"%p, 0x%s, %p, %p
\n
"
,
phys_dev
,
wine_dbgstr_longlong
(
surface
),
count
,
modes
);
return
pvkGetPhysicalDeviceSurfacePresentModesKHR
(
phys_dev
,
mac_surface
->
surface
,
count
,
return
pvkGetPhysicalDeviceSurfacePresentModesKHR
(
phys_dev
,
mac_surface
->
host_
surface
,
count
,
modes
);
}
...
...
@@ -532,7 +532,7 @@ static VkResult macdrv_vkGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice phy
TRACE
(
"%p, %u, 0x%s, %p
\n
"
,
phys_dev
,
index
,
wine_dbgstr_longlong
(
surface
),
supported
);
return
pvkGetPhysicalDeviceSurfaceSupportKHR
(
phys_dev
,
index
,
mac_surface
->
surface
,
return
pvkGetPhysicalDeviceSurfaceSupportKHR
(
phys_dev
,
index
,
mac_surface
->
host_
surface
,
supported
);
}
...
...
@@ -580,13 +580,13 @@ static VkResult macdrv_vkQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *
return
res
;
}
static
VkSurfaceKHR
macdrv_wine_get_
native
_surface
(
VkSurfaceKHR
surface
)
static
VkSurfaceKHR
macdrv_wine_get_
host
_surface
(
VkSurfaceKHR
surface
)
{
struct
wine_vk_surface
*
mac_surface
=
surface_from_handle
(
surface
);
TRACE
(
"0x%s
\n
"
,
wine_dbgstr_longlong
(
surface
));
return
mac_surface
->
surface
;
return
mac_surface
->
host_
surface
;
}
static
const
struct
vulkan_funcs
vulkan_funcs
=
...
...
@@ -612,7 +612,7 @@ static const struct vulkan_funcs vulkan_funcs =
macdrv_vkGetSwapchainImagesKHR
,
macdrv_vkQueuePresentKHR
,
macdrv_wine_get_
native
_surface
,
macdrv_wine_get_
host
_surface
,
};
static
void
*
macdrv_get_vk_device_proc_addr
(
const
char
*
name
)
...
...
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