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
0ef73052
Commit
0ef73052
authored
Mar 20, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Jan 26, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Report VK_EXT_shader_stencil_export availability to vkd3d_shader_compile().
parent
a586fd08
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
7 deletions
+15
-7
adapter_vk.c
dlls/wined3d/adapter_vk.c
+2
-0
shader_spirv.c
dlls/wined3d/shader_spirv.c
+12
-7
wined3d_vk.h
dlls/wined3d/wined3d_vk.h
+1
-0
No files found.
dlls/wined3d/adapter_vk.c
View file @
0ef73052
...
...
@@ -2356,6 +2356,7 @@ static bool wined3d_adapter_vk_init_device_extensions(struct wined3d_adapter_vk
}
info
[]
=
{
{
VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME
,
~
0u
},
{
VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME
,
~
0u
},
{
VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME
,
~
0u
,
true
},
{
VK_KHR_MAINTENANCE1_EXTENSION_NAME
,
VK_API_VERSION_1_1
,
true
},
...
...
@@ -2373,6 +2374,7 @@ static bool wined3d_adapter_vk_init_device_extensions(struct wined3d_adapter_vk
}
map
[]
=
{
{
VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME
,
WINED3D_VK_EXT_SHADER_STENCIL_EXPORT
},
{
VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME
,
WINED3D_VK_EXT_TRANSFORM_FEEDBACK
},
{
VK_KHR_MAINTENANCE2_EXTENSION_NAME
,
WINED3D_VK_KHR_MAINTENANCE2
},
{
VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME
,
WINED3D_VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE
},
...
...
dlls/wined3d/shader_spirv.c
View file @
0ef73052
...
...
@@ -105,6 +105,7 @@ struct wined3d_shader_spirv_compile_args
{
struct
vkd3d_shader_varying_map_info
varying_map
;
struct
vkd3d_shader_spirv_target_info
spirv_target
;
enum
vkd3d_shader_spirv_extension
extensions
[
1
];
struct
vkd3d_shader_parameter
sample_count
;
unsigned
int
ps_alpha_swizzle
[
WINED3D_MAX_RENDER_TARGETS
];
};
...
...
@@ -187,7 +188,8 @@ static void shader_spirv_compile_arguments_init(struct shader_spirv_compile_argu
}
}
static
void
shader_spirv_init_compile_args
(
struct
wined3d_shader_spirv_compile_args
*
args
,
static
void
shader_spirv_init_compile_args
(
const
struct
wined3d_vk_info
*
vk_info
,
struct
wined3d_shader_spirv_compile_args
*
args
,
struct
vkd3d_shader_interface_info
*
vkd3d_interface
,
enum
vkd3d_shader_spirv_environment
environment
,
enum
wined3d_shader_type
shader_type
,
enum
vkd3d_shader_source_type
source_type
,
const
struct
shader_spirv_compile_arguments
*
compile_args
)
...
...
@@ -200,6 +202,12 @@ static void shader_spirv_init_compile_args(struct wined3d_shader_spirv_compile_a
args
->
spirv_target
.
entry_point
=
"main"
;
args
->
spirv_target
.
environment
=
environment
;
args
->
spirv_target
.
extensions
=
args
->
extensions
;
if
(
vk_info
->
supported
[
WINED3D_VK_EXT_SHADER_STENCIL_EXPORT
])
args
->
extensions
[
args
->
spirv_target
.
extension_count
++
]
=
VKD3D_SHADER_SPIRV_EXTENSION_EXT_STENCIL_EXPORT
;
assert
(
args
->
spirv_target
.
extension_count
<=
ARRAY_SIZE
(
args
->
extensions
));
if
(
shader_type
==
WINED3D_SHADER_TYPE_PIXEL
)
{
unsigned
int
rt_alpha_swizzle
=
compile_args
->
u
.
fs
.
alpha_swizzle
;
...
...
@@ -272,12 +280,12 @@ static VkShaderModule shader_spirv_compile_shader(struct wined3d_context_vk *con
enum
wined3d_shader_type
shader_type
,
const
struct
shader_spirv_compile_arguments
*
args
,
const
struct
shader_spirv_resource_bindings
*
bindings
,
const
struct
wined3d_stream_output_desc
*
so_desc
)
{
struct
wined3d_device_vk
*
device_vk
=
wined3d_device_vk
(
context_vk
->
c
.
device
);
const
struct
wined3d_vk_info
*
vk_info
=
&
device_vk
->
vk_info
;
struct
wined3d_shader_spirv_compile_args
compile_args
;
struct
wined3d_shader_spirv_shader_interface
iface
;
VkShaderModuleCreateInfo
shader_create_info
;
struct
vkd3d_shader_compile_info
info
;
const
struct
wined3d_vk_info
*
vk_info
;
struct
wined3d_device_vk
*
device_vk
;
struct
vkd3d_shader_code
spirv
;
VkShaderModule
module
;
char
*
messages
;
...
...
@@ -285,7 +293,7 @@ static VkShaderModule shader_spirv_compile_shader(struct wined3d_context_vk *con
int
ret
;
shader_spirv_init_shader_interface_vk
(
&
iface
,
bindings
,
so_desc
);
shader_spirv_init_compile_args
(
&
compile_args
,
&
iface
.
vkd3d_interface
,
shader_spirv_init_compile_args
(
vk_info
,
&
compile_args
,
&
iface
.
vkd3d_interface
,
VKD3D_SHADER_SPIRV_ENVIRONMENT_VULKAN_1_0
,
shader_type
,
source_type
,
args
);
info
.
type
=
VKD3D_SHADER_STRUCTURE_TYPE_COMPILE_INFO
;
...
...
@@ -321,9 +329,6 @@ static VkShaderModule shader_spirv_compile_shader(struct wined3d_context_vk *con
return
VK_NULL_HANDLE
;
}
device_vk
=
wined3d_device_vk
(
context_vk
->
c
.
device
);
vk_info
=
&
device_vk
->
vk_info
;
shader_create_info
.
sType
=
VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO
;
shader_create_info
.
pNext
=
NULL
;
shader_create_info
.
flags
=
0
;
...
...
dlls/wined3d/wined3d_vk.h
View file @
0ef73052
...
...
@@ -215,6 +215,7 @@ enum wined3d_vk_extension
{
WINED3D_VK_EXT_NONE
,
WINED3D_VK_EXT_SHADER_STENCIL_EXPORT
,
WINED3D_VK_EXT_TRANSFORM_FEEDBACK
,
WINED3D_VK_KHR_MAINTENANCE2
,
WINED3D_VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE
,
...
...
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