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
c84b48b7
Commit
c84b48b7
authored
Sep 20, 2019
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Retrieve the supported sample counts for Vulkan formats.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
59ef8975
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
utils.c
dlls/wined3d/utils.c
+19
-0
No files found.
dlls/wined3d/utils.c
View file @
c84b48b7
...
@@ -4160,10 +4160,13 @@ static void init_vulkan_format_info(struct wined3d_format_vk *format,
...
@@ -4160,10 +4160,13 @@ static void init_vulkan_format_info(struct wined3d_format_vk *format,
{
WINED3DFMT_BC7_UNORM_SRGB
,
VK_FORMAT_BC7_SRGB_BLOCK
,
},
{
WINED3DFMT_BC7_UNORM_SRGB
,
VK_FORMAT_BC7_SRGB_BLOCK
,
},
};
};
VkFormat
vk_format
=
VK_FORMAT_UNDEFINED
;
VkFormat
vk_format
=
VK_FORMAT_UNDEFINED
;
VkImageFormatProperties
image_properties
;
VkFormatFeatureFlags
texture_flags
;
VkFormatFeatureFlags
texture_flags
;
VkFormatProperties
properties
;
VkFormatProperties
properties
;
VkImageUsageFlags
vk_usage
;
unsigned
int
flags
;
unsigned
int
flags
;
unsigned
int
i
;
unsigned
int
i
;
VkResult
vr
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
vulkan_formats
);
++
i
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
vulkan_formats
);
++
i
)
{
{
...
@@ -4211,6 +4214,22 @@ static void init_vulkan_format_info(struct wined3d_format_vk *format,
...
@@ -4211,6 +4214,22 @@ static void init_vulkan_format_info(struct wined3d_format_vk *format,
format
->
f
.
flags
[
WINED3D_GL_RES_TYPE_TEX_2D
]
|=
flags
;
format
->
f
.
flags
[
WINED3D_GL_RES_TYPE_TEX_2D
]
|=
flags
;
format
->
f
.
flags
[
WINED3D_GL_RES_TYPE_TEX_3D
]
|=
flags
;
format
->
f
.
flags
[
WINED3D_GL_RES_TYPE_TEX_3D
]
|=
flags
;
format
->
f
.
flags
[
WINED3D_GL_RES_TYPE_TEX_CUBE
]
|=
flags
;
format
->
f
.
flags
[
WINED3D_GL_RES_TYPE_TEX_CUBE
]
|=
flags
;
vk_usage
=
0
;
if
(
texture_flags
&
VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT
)
vk_usage
=
VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
;
else
if
(
texture_flags
&
VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
)
vk_usage
=
VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
;
if
(
vk_usage
)
{
if
((
vr
=
VK_CALL
(
vkGetPhysicalDeviceImageFormatProperties
(
vk_physical_device
,
vk_format
,
VK_IMAGE_TYPE_2D
,
VK_IMAGE_TILING_OPTIMAL
,
vk_usage
,
0
,
&
image_properties
)))
<
0
)
{
ERR
(
"Failed to get image format properties, vr %s.
\n
"
,
wined3d_debug_vkresult
(
vr
));
return
;
}
format
->
f
.
multisample_types
=
image_properties
.
sampleCounts
;
}
}
}
BOOL
wined3d_adapter_vk_init_format_info
(
struct
wined3d_adapter_vk
*
adapter_vk
,
BOOL
wined3d_adapter_vk_init_format_info
(
struct
wined3d_adapter_vk
*
adapter_vk
,
...
...
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