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
dbe01421
Commit
dbe01421
authored
May 14, 2020
by
Stefan Dösinger
Committed by
Alexandre Julliard
May 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Implement Vulkan NULL 3D image shader resource view descriptors.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
afa07536
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
0 deletions
+29
-0
context_vk.c
dlls/wined3d/context_vk.c
+4
-0
device.c
dlls/wined3d/device.c
+23
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-0
No files found.
dlls/wined3d/context_vk.c
View file @
dbe01421
...
...
@@ -1348,6 +1348,10 @@ static bool wined3d_shader_resource_bindings_add_null_srv_binding(struct wined3d
return
wined3d_shader_descriptor_writes_vk_add_write
(
writes
,
vk_descriptor_set
,
binding_idx
,
VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE
,
NULL
,
&
v
->
vk_info_2dms
,
NULL
);
case
WINED3D_SHADER_RESOURCE_TEXTURE_3D
:
return
wined3d_shader_descriptor_writes_vk_add_write
(
writes
,
vk_descriptor_set
,
binding_idx
,
VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE
,
NULL
,
&
v
->
vk_info_3d
,
NULL
);
case
WINED3D_SHADER_RESOURCE_TEXTURE_2DARRAY
:
return
wined3d_shader_descriptor_writes_vk_add_write
(
writes
,
vk_descriptor_set
,
binding_idx
,
VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE
,
NULL
,
&
v
->
vk_info_2d_array
,
NULL
);
...
...
dlls/wined3d/device.c
View file @
dbe01421
...
...
@@ -811,10 +811,18 @@ bool wined3d_device_vk_create_null_resources(struct wined3d_device_vk *device_vk
goto
fail
;
}
if
(
!
wined3d_null_image_vk_init
(
&
r
->
image_3d
,
context_vk
,
vk_command_buffer
,
VK_IMAGE_TYPE_3D
,
1
))
{
ERR
(
"Failed to create 3D image.
\n
"
);
goto
fail
;
}
return
true
;
fail:
id
=
context_vk
->
current_command_buffer
.
id
;
if
(
r
->
image_2dms
.
vk_image
)
wined3d_null_image_vk_cleanup
(
&
r
->
image_2dms
,
context_vk
,
id
);
if
(
r
->
image_2d
.
vk_image
)
wined3d_null_image_vk_cleanup
(
&
r
->
image_2d
,
context_vk
,
id
);
if
(
r
->
image_1d
.
vk_image
)
...
...
@@ -832,6 +840,7 @@ void wined3d_device_vk_destroy_null_resources(struct wined3d_device_vk *device_v
/* We don't track command buffer references to NULL resources. We easily
* could, but it doesn't seem worth it. */
wined3d_null_image_vk_cleanup
(
&
r
->
image_3d
,
context_vk
,
id
);
wined3d_null_image_vk_cleanup
(
&
r
->
image_2dms
,
context_vk
,
id
);
wined3d_null_image_vk_cleanup
(
&
r
->
image_2d
,
context_vk
,
id
);
wined3d_null_image_vk_cleanup
(
&
r
->
image_1d
,
context_vk
,
id
);
...
...
@@ -921,6 +930,17 @@ bool wined3d_device_vk_create_null_views(struct wined3d_device_vk *device_vk, st
v
->
vk_info_2dms
.
imageLayout
=
VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
;
TRACE
(
"Created 2D MSAA image view 0x%s.
\n
"
,
wine_dbgstr_longlong
(
v
->
vk_info_2dms
.
imageView
));
view_desc
.
image
=
r
->
image_3d
.
vk_image
;
view_desc
.
viewType
=
VK_IMAGE_VIEW_TYPE_3D
;
if
((
vr
=
VK_CALL
(
vkCreateImageView
(
device_vk
->
vk_device
,
&
view_desc
,
NULL
,
&
v
->
vk_info_3d
.
imageView
)))
<
0
)
{
ERR
(
"Failed to create 3D image view, vr %s.
\n
"
,
wined3d_debug_vkresult
(
vr
));
goto
fail
;
}
v
->
vk_info_3d
.
sampler
=
VK_NULL_HANDLE
;
v
->
vk_info_3d
.
imageLayout
=
VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
;
TRACE
(
"Created 3D image view 0x%s.
\n
"
,
wine_dbgstr_longlong
(
v
->
vk_info_3d
.
imageView
));
view_desc
.
image
=
r
->
image_2d
.
vk_image
;
view_desc
.
viewType
=
VK_IMAGE_VIEW_TYPE_2D_ARRAY
;
if
((
vr
=
VK_CALL
(
vkCreateImageView
(
device_vk
->
vk_device
,
&
view_desc
,
NULL
,
&
v
->
vk_info_2d_array
.
imageView
)))
<
0
)
...
...
@@ -948,6 +968,8 @@ bool wined3d_device_vk_create_null_views(struct wined3d_device_vk *device_vk, st
fail:
if
(
v
->
vk_info_2d_array
.
imageView
)
VK_CALL
(
vkDestroyImageView
(
device_vk
->
vk_device
,
v
->
vk_info_2d_array
.
imageView
,
NULL
));
if
(
v
->
vk_info_3d
.
imageView
)
VK_CALL
(
vkDestroyImageView
(
device_vk
->
vk_device
,
v
->
vk_info_3d
.
imageView
,
NULL
));
if
(
v
->
vk_info_2dms
.
imageView
)
VK_CALL
(
vkDestroyImageView
(
device_vk
->
vk_device
,
v
->
vk_info_2dms
.
imageView
,
NULL
));
if
(
v
->
vk_info_2d
.
imageView
)
...
...
@@ -967,6 +989,7 @@ void wined3d_device_vk_destroy_null_views(struct wined3d_device_vk *device_vk, s
wined3d_context_vk_destroy_image_view
(
context_vk
,
v
->
vk_info_2dms_array
.
imageView
,
id
);
wined3d_context_vk_destroy_image_view
(
context_vk
,
v
->
vk_info_2d_array
.
imageView
,
id
);
wined3d_context_vk_destroy_image_view
(
context_vk
,
v
->
vk_info_3d
.
imageView
,
id
);
wined3d_context_vk_destroy_image_view
(
context_vk
,
v
->
vk_info_2dms
.
imageView
,
id
);
wined3d_context_vk_destroy_image_view
(
context_vk
,
v
->
vk_info_2d
.
imageView
,
id
);
wined3d_context_vk_destroy_image_view
(
context_vk
,
v
->
vk_info_1d
.
imageView
,
id
);
...
...
dlls/wined3d/wined3d_private.h
View file @
dbe01421
...
...
@@ -3620,6 +3620,7 @@ struct wined3d_null_resources_vk
struct
wined3d_null_image_vk
image_1d
;
struct
wined3d_null_image_vk
image_2d
;
struct
wined3d_null_image_vk
image_2dms
;
struct
wined3d_null_image_vk
image_3d
;
};
struct
wined3d_null_views_vk
...
...
@@ -3630,6 +3631,7 @@ struct wined3d_null_views_vk
VkDescriptorImageInfo
vk_info_1d
;
VkDescriptorImageInfo
vk_info_2d
;
VkDescriptorImageInfo
vk_info_2dms
;
VkDescriptorImageInfo
vk_info_3d
;
VkDescriptorImageInfo
vk_info_2d_array
;
VkDescriptorImageInfo
vk_info_2dms_array
;
};
...
...
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