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
844d4cd2
Commit
844d4cd2
authored
Dec 10, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Feb 01, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevulkan: Return VK_ERROR_SURFACE_LOST_KHR from surface functions.
parent
982c2ede
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
23 deletions
+16
-23
vulkan.c
dlls/vulkan-1/tests/vulkan.c
+0
-3
vulkan.c
dlls/winevulkan/vulkan.c
+16
-20
No files found.
dlls/vulkan-1/tests/vulkan.c
View file @
844d4cd2
...
@@ -635,11 +635,8 @@ static void test_win32_surface_hwnd(VkInstance vk_instance, VkPhysicalDevice vk_
...
@@ -635,11 +635,8 @@ static void test_win32_surface_hwnd(VkInstance vk_instance, VkPhysicalDevice vk_
if
(
IsWindow
(
hwnd
))
if
(
IsWindow
(
hwnd
))
ok
(
vr
==
VK_SUCCESS
,
"Got unexpected vr %d.
\n
"
,
vr
);
ok
(
vr
==
VK_SUCCESS
,
"Got unexpected vr %d.
\n
"
,
vr
);
else
else
{
todo_wine
ok
(
vr
==
VK_ERROR_SURFACE_LOST_KHR
/* Nvidia */
||
vr
==
VK_ERROR_UNKNOWN
/* AMD */
,
ok
(
vr
==
VK_ERROR_SURFACE_LOST_KHR
/* Nvidia */
||
vr
==
VK_ERROR_UNKNOWN
/* AMD */
,
"Got unexpected vr %d.
\n
"
,
vr
);
"Got unexpected vr %d.
\n
"
,
vr
);
}
}
}
count
=
0
;
count
=
0
;
...
...
dlls/winevulkan/vulkan.c
View file @
844d4cd2
...
@@ -1746,40 +1746,36 @@ static inline void adjust_max_image_count(struct wine_phys_dev *phys_dev, VkSurf
...
@@ -1746,40 +1746,36 @@ static inline void adjust_max_image_count(struct wine_phys_dev *phys_dev, VkSurf
}
}
}
}
VkResult
wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR
(
VkPhysicalDevice
handle
,
VkSurfaceKHR
surface_handle
,
VkResult
wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR
(
VkPhysicalDevice
device_
handle
,
VkSurfaceKHR
surface_handle
,
VkSurfaceCapabilitiesKHR
*
capabilities
)
VkSurfaceCapabilitiesKHR
*
capabilities
)
{
{
struct
wine_phys_dev
*
phys
_dev
=
wine_phys_dev_from_handle
(
handle
);
struct
wine_phys_dev
*
phys
ical_device
=
wine_phys_dev_from_handle
(
device_
handle
);
struct
wine_surface
*
surface
=
wine_surface_from_handle
(
surface_handle
);
struct
wine_surface
*
surface
=
wine_surface_from_handle
(
surface_handle
);
struct
wine_instance
*
instance
=
physical_device
->
instance
;
VkResult
res
;
VkResult
res
;
res
=
phys_dev
->
instance
->
funcs
.
p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR
(
phys_dev
->
host_physical_device
,
if
(
!
NtUserIsWindow
(
surface
->
hwnd
))
return
VK_ERROR_SURFACE_LOST_KHR
;
surface
->
driver_surface
,
capabilities
);
res
=
instance
->
funcs
.
p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR
(
physical_device
->
host_physical_device
,
surface
->
driver_surface
,
capabilities
);
if
(
res
==
VK_SUCCESS
)
if
(
res
==
VK_SUCCESS
)
adjust_max_image_count
(
physical_device
,
capabilities
);
adjust_max_image_count
(
phys_dev
,
capabilities
);
return
res
;
return
res
;
}
}
VkResult
wine_vkGetPhysicalDeviceSurfaceCapabilities2KHR
(
VkPhysicalDevice
handle
,
VkResult
wine_vkGetPhysicalDeviceSurfaceCapabilities2KHR
(
VkPhysicalDevice
device_handle
,
const
VkPhysicalDeviceSurfaceInfo2KHR
*
surface_info
,
const
VkPhysicalDeviceSurfaceInfo2KHR
*
surface_info
,
VkSurfaceCapabilities2KHR
*
capabilities
)
VkSurfaceCapabilities2KHR
*
capabilities
)
{
{
struct
wine_phys_dev
*
phys
_dev
=
wine_phys_dev_from_handle
(
handle
);
struct
wine_phys_dev
*
phys
ical_device
=
wine_phys_dev_from_handle
(
device_
handle
);
struct
wine_surface
*
surface
=
wine_surface_from_handle
(
surface_info
->
surface
);
struct
wine_surface
*
surface
=
wine_surface_from_handle
(
surface_info
->
surface
);
VkPhysicalDeviceSurfaceInfo2KHR
host_info
;
VkPhysicalDeviceSurfaceInfo2KHR
surface_info_host
=
*
surface_info
;
struct
wine_instance
*
instance
=
physical_device
->
instance
;
VkResult
res
;
VkResult
res
;
host_info
.
sType
=
surface_info
->
sType
;
surface_info_host
.
surface
=
surface
->
driver_surface
;
host_info
.
pNext
=
surface_info
->
pNext
;
host_info
.
surface
=
surface
->
driver_surface
;
res
=
phys_dev
->
instance
->
funcs
.
p_vkGetPhysicalDeviceSurfaceCapabilities2KHR
(
phys_dev
->
host_physical_device
,
&
host_info
,
capabilities
);
if
(
res
==
VK_SUCCESS
)
adjust_max_image_count
(
phys_dev
,
&
capabilities
->
surfaceCapabilities
);
if
(
!
NtUserIsWindow
(
surface
->
hwnd
))
return
VK_ERROR_SURFACE_LOST_KHR
;
res
=
instance
->
funcs
.
p_vkGetPhysicalDeviceSurfaceCapabilities2KHR
(
physical_device
->
host_physical_device
,
&
surface_info_host
,
capabilities
);
if
(
res
==
VK_SUCCESS
)
adjust_max_image_count
(
physical_device
,
&
capabilities
->
surfaceCapabilities
);
return
res
;
return
res
;
}
}
...
...
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