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
7bab2b6c
Commit
7bab2b6c
authored
Apr 10, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Apr 11, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winewayland: Remove now unnecessary swapchain extents checks.
parent
01386ca7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
62 deletions
+1
-62
vulkan.c
dlls/winewayland.drv/vulkan.c
+1
-62
No files found.
dlls/winewayland.drv/vulkan.c
View file @
7bab2b6c
...
...
@@ -75,8 +75,6 @@ struct wine_vk_swapchain
{
struct
list
entry
;
VkSwapchainKHR
host_swapchain
;
HWND
hwnd
;
VkExtent2D
extent
;
};
static
struct
wine_vk_surface
*
wine_vk_surface_from_handle
(
VkSurfaceKHR
handle
)
...
...
@@ -141,58 +139,6 @@ static struct wine_vk_swapchain *wine_vk_swapchain_from_handle(VkSwapchainKHR ha
return
NULL
;
}
static
void
vk_result_update_out_of_date
(
VkResult
*
res
)
{
/* If the current result is less severe than out_of_date, which for
* now applies to all non-failure results, update it.
* TODO: Handle VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT when
* it is supported by winevulkan, since it's also considered
* less severe than out_of_date. */
if
(
*
res
>=
0
)
*
res
=
VK_ERROR_OUT_OF_DATE_KHR
;
}
static
VkResult
check_queue_present
(
const
VkPresentInfoKHR
*
present_info
,
VkResult
present_res
)
{
VkResult
res
=
present_res
;
uint32_t
i
;
for
(
i
=
0
;
i
<
present_info
->
swapchainCount
;
++
i
)
{
struct
wine_vk_swapchain
*
wine_vk_swapchain
=
wine_vk_swapchain_from_handle
(
present_info
->
pSwapchains
[
i
]);
HWND
hwnd
=
wine_vk_swapchain
->
hwnd
;
struct
wayland_surface
*
wayland_surface
;
if
((
wayland_surface
=
wayland_surface_lock_hwnd
(
hwnd
)))
{
int
client_width
=
wayland_surface
->
window
.
client_rect
.
right
-
wayland_surface
->
window
.
client_rect
.
left
;
int
client_height
=
wayland_surface
->
window
.
client_rect
.
bottom
-
wayland_surface
->
window
.
client_rect
.
top
;
pthread_mutex_unlock
(
&
wayland_surface
->
mutex
);
if
(
client_width
==
wine_vk_swapchain
->
extent
.
width
&&
client_height
==
wine_vk_swapchain
->
extent
.
height
)
{
/* The window is still available and matches the swapchain size,
* so there is no new error to report. */
continue
;
}
}
/* We use the out_of_date error even if the window is no longer
* available, to match win32 behavior (e.g., nvidia). The application
* will get surface_lost when it tries to recreate the swapchain. */
if
(
present_info
->
pResults
)
vk_result_update_out_of_date
(
&
present_info
->
pResults
[
i
]);
vk_result_update_out_of_date
(
&
res
);
}
return
res
;
}
static
VkResult
wayland_vkCreateSwapchainKHR
(
VkDevice
device
,
const
VkSwapchainCreateInfoKHR
*
create_info
,
const
VkAllocationCallbacks
*
allocator
,
...
...
@@ -216,9 +162,6 @@ static VkResult wayland_vkCreateSwapchainKHR(VkDevice device,
if
(
!
wine_vk_swapchain
)
return
VK_ERROR_OUT_OF_HOST_MEMORY
;
wine_vk_swapchain
->
hwnd
=
wine_vk_surface_get_hwnd
(
wine_vk_surface
);
wine_vk_swapchain
->
extent
=
create_info
->
imageExtent
;
create_info_host
=
*
create_info
;
create_info_host
.
surface
=
wine_vk_surface
->
host_surface
;
...
...
@@ -356,13 +299,9 @@ static VkBool32 wayland_vkGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysica
static
VkResult
wayland_vkQueuePresentKHR
(
VkQueue
queue
,
const
VkPresentInfoKHR
*
present_info
,
HWND
*
surfaces
)
{
VkResult
res
;
TRACE
(
"%p, %p
\n
"
,
queue
,
present_info
);
res
=
pvkQueuePresentKHR
(
queue
,
present_info
);
return
check_queue_present
(
present_info
,
res
);
return
pvkQueuePresentKHR
(
queue
,
present_info
);
}
static
const
char
*
wayland_get_host_surface_extension
(
void
)
...
...
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