Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c0042af5
Commit
c0042af5
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
winex11: Use "host" instead of "native" in vulkan wrappers.
parent
288d2c2e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
20 deletions
+18
-20
vulkan.c
dlls/winex11.drv/vulkan.c
+18
-20
No files found.
dlls/winex11.drv/vulkan.c
View file @
c0042af5
...
...
@@ -60,7 +60,7 @@ struct wine_vk_surface
LONG
ref
;
struct
list
entry
;
Window
window
;
VkSurfaceKHR
surface
;
/* native surface */
VkSurfaceKHR
host_surface
;
HWND
hwnd
;
DWORD
hwnd_thread_id
;
};
...
...
@@ -295,7 +295,7 @@ static VkResult X11DRV_vkCreateSwapchainKHR(VkDevice device,
return
VK_ERROR_SURFACE_LOST_KHR
;
create_info_host
=
*
create_info
;
create_info_host
.
surface
=
x11_surface
->
surface
;
create_info_host
.
surface
=
x11_surface
->
host_
surface
;
return
pvkCreateSwapchainKHR
(
device
,
&
create_info_host
,
NULL
/* allocator */
,
swapchain
);
}
...
...
@@ -351,7 +351,7 @@ static VkResult X11DRV_vkCreateWin32SurfaceKHR(VkInstance instance,
create_info_host
.
dpy
=
gdi_display
;
create_info_host
.
window
=
x11_surface
->
window
;
res
=
pvkCreateXlibSurfaceKHR
(
instance
,
&
create_info_host
,
NULL
/* allocator */
,
&
x11_surface
->
surface
);
res
=
pvkCreateXlibSurfaceKHR
(
instance
,
&
create_info_host
,
NULL
/* allocator */
,
&
x11_surface
->
host_surface
);
if
(
res
!=
VK_SUCCESS
)
{
ERR
(
"Failed to create Xlib surface, res=%d
\n
"
,
res
);
...
...
@@ -400,7 +400,7 @@ static void X11DRV_vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface
/* vkDestroySurfaceKHR must handle VK_NULL_HANDLE (0) for surface. */
if
(
x11_surface
)
{
pvkDestroySurfaceKHR
(
instance
,
x11_surface
->
surface
,
NULL
/* allocator */
);
pvkDestroySurfaceKHR
(
instance
,
x11_surface
->
host_surface
,
NULL
/* allocator */
);
wine_vk_surface_release
(
x11_surface
);
}
...
...
@@ -465,10 +465,10 @@ static VkResult X11DRV_vkGetDeviceGroupSurfacePresentModesKHR(VkDevice device,
TRACE
(
"%p, 0x%s, %p
\n
"
,
device
,
wine_dbgstr_longlong
(
surface
),
flags
);
return
pvkGetDeviceGroupSurfacePresentModesKHR
(
device
,
x11_surface
->
surface
,
flags
);
return
pvkGetDeviceGroupSurfacePresentModesKHR
(
device
,
x11_surface
->
host_surface
,
flags
);
}
static
const
char
*
wine_vk_
native_fn_name
(
const
char
*
name
)
static
const
char
*
wine_vk_
host_fn_name
(
const
char
*
name
)
{
if
(
!
strcmp
(
name
,
"vkCreateWin32SurfaceKHR"
))
return
"vkCreateXlibSurfaceKHR"
;
...
...
@@ -484,8 +484,7 @@ static void *X11DRV_vkGetDeviceProcAddr(VkDevice device, const char *name)
TRACE
(
"%p, %s
\n
"
,
device
,
debugstr_a
(
name
));
if
(
!
pvkGetDeviceProcAddr
(
device
,
wine_vk_native_fn_name
(
name
)))
return
NULL
;
if
(
!
pvkGetDeviceProcAddr
(
device
,
wine_vk_host_fn_name
(
name
)
))
return
NULL
;
if
((
proc_addr
=
X11DRV_get_vk_device_proc_addr
(
name
)))
return
proc_addr
;
...
...
@@ -499,8 +498,7 @@ static void *X11DRV_vkGetInstanceProcAddr(VkInstance instance, const char *name)
TRACE
(
"%p, %s
\n
"
,
instance
,
debugstr_a
(
name
));
if
(
!
pvkGetInstanceProcAddr
(
instance
,
wine_vk_native_fn_name
(
name
)))
return
NULL
;
if
(
!
pvkGetInstanceProcAddr
(
instance
,
wine_vk_host_fn_name
(
name
)
))
return
NULL
;
if
((
proc_addr
=
X11DRV_get_vk_instance_proc_addr
(
instance
,
name
)))
return
proc_addr
;
...
...
@@ -524,7 +522,7 @@ static VkResult X11DRV_vkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice
return
VK_SUCCESS
;
}
return
pvkGetPhysicalDevicePresentRectanglesKHR
(
phys_dev
,
x11_surface
->
surface
,
count
,
rects
);
return
pvkGetPhysicalDevicePresentRectanglesKHR
(
phys_dev
,
x11_surface
->
host_surface
,
count
,
rects
);
}
static
VkResult
X11DRV_vkGetPhysicalDeviceSurfaceCapabilities2KHR
(
VkPhysicalDevice
phys_dev
,
...
...
@@ -534,7 +532,7 @@ static VkResult X11DRV_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
;
if
(
pvkGetPhysicalDeviceSurfaceCapabilities2KHR
)
return
pvkGetPhysicalDeviceSurfaceCapabilities2KHR
(
phys_dev
,
&
surface_info_host
,
capabilities
);
...
...
@@ -556,7 +554,7 @@ static VkResult X11DRV_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevic
if
(
!
x11_surface
->
hwnd
)
return
VK_ERROR_SURFACE_LOST_KHR
;
return
pvkGetPhysicalDeviceSurfaceCapabilitiesKHR
(
phys_dev
,
x11_surface
->
surface
,
capabilities
);
return
pvkGetPhysicalDeviceSurfaceCapabilitiesKHR
(
phys_dev
,
x11_surface
->
host_surface
,
capabilities
);
}
static
VkResult
X11DRV_vkGetPhysicalDeviceSurfaceFormats2KHR
(
VkPhysicalDevice
phys_dev
,
...
...
@@ -569,7 +567,7 @@ static VkResult X11DRV_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
;
if
(
pvkGetPhysicalDeviceSurfaceFormats2KHR
)
return
pvkGetPhysicalDeviceSurfaceFormats2KHR
(
phys_dev
,
&
surface_info_host
,
count
,
formats
);
...
...
@@ -601,7 +599,7 @@ static VkResult X11DRV_vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice phy
TRACE
(
"%p, 0x%s, %p, %p
\n
"
,
phys_dev
,
wine_dbgstr_longlong
(
surface
),
count
,
formats
);
return
pvkGetPhysicalDeviceSurfaceFormatsKHR
(
phys_dev
,
x11_surface
->
surface
,
count
,
formats
);
return
pvkGetPhysicalDeviceSurfaceFormatsKHR
(
phys_dev
,
x11_surface
->
host_surface
,
count
,
formats
);
}
static
VkResult
X11DRV_vkGetPhysicalDeviceSurfacePresentModesKHR
(
VkPhysicalDevice
phys_dev
,
...
...
@@ -611,7 +609,7 @@ static VkResult X11DRV_vkGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevic
TRACE
(
"%p, 0x%s, %p, %p
\n
"
,
phys_dev
,
wine_dbgstr_longlong
(
surface
),
count
,
modes
);
return
pvkGetPhysicalDeviceSurfacePresentModesKHR
(
phys_dev
,
x11_surface
->
surface
,
count
,
modes
);
return
pvkGetPhysicalDeviceSurfacePresentModesKHR
(
phys_dev
,
x11_surface
->
host_surface
,
count
,
modes
);
}
static
VkResult
X11DRV_vkGetPhysicalDeviceSurfaceSupportKHR
(
VkPhysicalDevice
phys_dev
,
...
...
@@ -621,7 +619,7 @@ static VkResult X11DRV_vkGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice phy
TRACE
(
"%p, %u, 0x%s, %p
\n
"
,
phys_dev
,
index
,
wine_dbgstr_longlong
(
surface
),
supported
);
return
pvkGetPhysicalDeviceSurfaceSupportKHR
(
phys_dev
,
index
,
x11_surface
->
surface
,
supported
);
return
pvkGetPhysicalDeviceSurfaceSupportKHR
(
phys_dev
,
index
,
x11_surface
->
host_surface
,
supported
);
}
static
VkBool32
X11DRV_vkGetPhysicalDeviceWin32PresentationSupportKHR
(
VkPhysicalDevice
phys_dev
,
...
...
@@ -672,13 +670,13 @@ static VkResult X11DRV_vkQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *
return
res
;
}
static
VkSurfaceKHR
X11DRV_wine_get_
native_surface
(
VkSurfaceKHR
surface
)
static
VkSurfaceKHR
X11DRV_wine_get_
host_surface
(
VkSurfaceKHR
surface
)
{
struct
wine_vk_surface
*
x11_surface
=
surface_from_handle
(
surface
);
TRACE
(
"0x%s
\n
"
,
wine_dbgstr_longlong
(
surface
));
return
x11_surface
->
surface
;
return
x11_surface
->
host_
surface
;
}
static
const
struct
vulkan_funcs
vulkan_funcs
=
...
...
@@ -704,7 +702,7 @@ static const struct vulkan_funcs vulkan_funcs =
X11DRV_vkGetSwapchainImagesKHR
,
X11DRV_vkQueuePresentKHR
,
X11DRV_wine_get_
native
_surface
,
X11DRV_wine_get_
host
_surface
,
};
static
void
*
X11DRV_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