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
5bd5244b
Commit
5bd5244b
authored
May 20, 2020
by
Henri Verbeet
Committed by
Alexandre Julliard
May 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Implement different primitive topologies for the Vulkan adapter.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f8acf0b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
1 deletion
+42
-1
context_vk.c
dlls/wined3d/context_vk.c
+42
-1
No files found.
dlls/wined3d/context_vk.c
View file @
5bd5244b
...
...
@@ -185,6 +185,39 @@ static VkCullModeFlags vk_cull_mode_from_wined3d(enum wined3d_cull mode)
}
}
static
VkPrimitiveTopology
vk_topology_from_wined3d
(
enum
wined3d_primitive_type
t
)
{
switch
(
t
)
{
case
WINED3D_PT_POINTLIST
:
return
VK_PRIMITIVE_TOPOLOGY_POINT_LIST
;
case
WINED3D_PT_LINELIST
:
return
VK_PRIMITIVE_TOPOLOGY_LINE_LIST
;
case
WINED3D_PT_LINESTRIP
:
return
VK_PRIMITIVE_TOPOLOGY_LINE_STRIP
;
case
WINED3D_PT_TRIANGLELIST
:
return
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST
;
case
WINED3D_PT_TRIANGLESTRIP
:
return
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP
;
case
WINED3D_PT_TRIANGLEFAN
:
return
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN
;
case
WINED3D_PT_LINELIST_ADJ
:
return
VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY
;
case
WINED3D_PT_LINESTRIP_ADJ
:
return
VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY
;
case
WINED3D_PT_TRIANGLELIST_ADJ
:
return
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY
;
case
WINED3D_PT_TRIANGLESTRIP_ADJ
:
return
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY
;
case
WINED3D_PT_PATCH
:
return
VK_PRIMITIVE_TOPOLOGY_PATCH_LIST
;
default:
FIXME
(
"Unhandled primitive type %s.
\n
"
,
debug_d3dprimitivetype
(
t
));
case
WINED3D_PT_UNDEFINED
:
return
~
0u
;
}
}
void
*
wined3d_allocator_chunk_vk_map
(
struct
wined3d_allocator_chunk_vk
*
chunk_vk
,
struct
wined3d_context_vk
*
context_vk
)
{
...
...
@@ -1462,7 +1495,6 @@ static void wined3d_context_vk_init_graphics_pipeline_key(struct wined3d_context
key
->
input_desc
.
pVertexAttributeDescriptions
=
key
->
attributes
;
key
->
ia_desc
.
sType
=
VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO
;
key
->
ia_desc
.
topology
=
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP
;
key
->
vp_desc
.
sType
=
VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO
;
key
->
vp_desc
.
viewportCount
=
1
;
...
...
@@ -1644,6 +1676,7 @@ static bool wined3d_context_vk_update_graphics_pipeline_key(struct wined3d_conte
struct
wined3d_graphics_pipeline_key_vk
*
key
;
VkPipelineShaderStageCreateInfo
*
stage
;
struct
wined3d_stream_info
stream_info
;
VkPrimitiveTopology
vk_topology
;
VkShaderModule
module
;
bool
update
=
false
;
uint32_t
mask
;
...
...
@@ -1708,6 +1741,14 @@ static bool wined3d_context_vk_update_graphics_pipeline_key(struct wined3d_conte
update
=
true
;
}
vk_topology
=
vk_topology_from_wined3d
(
state
->
primitive_type
);
if
(
key
->
ia_desc
.
topology
!=
vk_topology
)
{
key
->
ia_desc
.
topology
=
vk_topology
;
update
=
true
;
}
if
(
wined3d_context_is_graphics_state_dirty
(
&
context_vk
->
c
,
STATE_VIEWPORT
)
||
wined3d_context_is_graphics_state_dirty
(
&
context_vk
->
c
,
STATE_SCISSORRECT
)
||
wined3d_context_is_graphics_state_dirty
(
&
context_vk
->
c
,
STATE_RASTERIZER
))
...
...
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