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
4e88f442
Commit
4e88f442
authored
Apr 19, 2023
by
Giovanni Mascellani
Committed by
Alexandre Julliard
Jun 02, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxgi: Move Vulkan-specific code to d3d12_swapchain_create_vulkan_swapchain().
parent
a7ff40a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
23 deletions
+19
-23
swapchain.c
dlls/dxgi/swapchain.c
+19
-23
No files found.
dlls/dxgi/swapchain.c
View file @
4e88f442
...
...
@@ -1558,32 +1558,10 @@ static HRESULT d3d12_swapchain_create_image_resources(struct d3d12_swapchain *sw
static
HRESULT
d3d12_swapchain_create_buffers
(
struct
d3d12_swapchain
*
swapchain
)
{
const
struct
dxgi_vk_funcs
*
vk_funcs
=
&
swapchain
->
vk_funcs
;
VkSwapchainKHR
vk_swapchain
=
swapchain
->
vk_swapchain
;
ID3D12CommandQueue
*
queue
=
swapchain
->
command_queue
;
VkDevice
vk_device
=
swapchain
->
vk_device
;
uint32_t
image_count
,
queue_family_index
;
VkResult
vr
;
uint32_t
queue_family_index
;
HRESULT
hr
;
if
((
vr
=
vk_funcs
->
p_vkGetSwapchainImagesKHR
(
vk_device
,
vk_swapchain
,
&
image_count
,
NULL
))
<
0
)
{
WARN
(
"Failed to get Vulkan swapchain images, vr %d.
\n
"
,
vr
);
return
hresult_from_vk_result
(
vr
);
}
if
(
image_count
>
ARRAY_SIZE
(
swapchain
->
vk_swapchain_images
))
{
FIXME
(
"Unsupported Vulkan swapchain image count %u.
\n
"
,
image_count
);
return
E_FAIL
;
}
swapchain
->
buffer_count
=
image_count
;
if
((
vr
=
vk_funcs
->
p_vkGetSwapchainImagesKHR
(
vk_device
,
vk_swapchain
,
&
image_count
,
swapchain
->
vk_swapchain_images
))
<
0
)
{
WARN
(
"Failed to get Vulkan swapchain images, vr %d.
\n
"
,
vr
);
return
hresult_from_vk_result
(
vr
);
}
queue_family_index
=
vkd3d_get_vk_queue_family_index
(
queue
);
if
(
FAILED
(
hr
=
d3d12_swapchain_create_user_buffers
(
swapchain
)))
...
...
@@ -1772,6 +1750,24 @@ static HRESULT d3d12_swapchain_create_vulkan_swapchain(struct d3d12_swapchain *s
if
(
swapchain
->
vk_swapchain
)
vk_funcs
->
p_vkDestroySwapchainKHR
(
swapchain
->
vk_device
,
swapchain
->
vk_swapchain
,
NULL
);
if
((
vr
=
vk_funcs
->
p_vkGetSwapchainImagesKHR
(
vk_device
,
vk_swapchain
,
&
image_count
,
NULL
))
<
0
)
{
WARN
(
"Failed to get Vulkan swapchain images, vr %d.
\n
"
,
vr
);
return
hresult_from_vk_result
(
vr
);
}
if
(
image_count
>
ARRAY_SIZE
(
swapchain
->
vk_swapchain_images
))
{
FIXME
(
"Unsupported Vulkan swapchain image count %u.
\n
"
,
image_count
);
return
E_FAIL
;
}
swapchain
->
buffer_count
=
image_count
;
if
((
vr
=
vk_funcs
->
p_vkGetSwapchainImagesKHR
(
vk_device
,
vk_swapchain
,
&
image_count
,
swapchain
->
vk_swapchain_images
))
<
0
)
{
WARN
(
"Failed to get Vulkan swapchain images, vr %d.
\n
"
,
vr
);
return
hresult_from_vk_result
(
vr
);
}
swapchain
->
vk_swapchain
=
vk_swapchain
;
swapchain
->
vk_swapchain_width
=
width
;
swapchain
->
vk_swapchain_height
=
height
;
...
...
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