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
965ab444
Commit
965ab444
authored
May 02, 2019
by
Henri Verbeet
Committed by
Alexandre Julliard
May 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Introduce a debug helper for Vulkan return values.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0ee017f2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
6 deletions
+46
-6
adapter_vk.c
dlls/wined3d/adapter_vk.c
+6
-6
utils.c
dlls/wined3d/utils.c
+39
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/adapter_vk.c
View file @
965ab444
...
...
@@ -240,7 +240,7 @@ static HRESULT adapter_vk_create_device(struct wined3d *wined3d, const struct wi
if
((
vr
=
VK_CALL
(
vkCreateDevice
(
physical_device
,
&
device_info
,
NULL
,
&
vk_device
)))
<
0
)
{
WARN
(
"Failed to create Vulkan device, vr %
d.
\n
"
,
vr
);
WARN
(
"Failed to create Vulkan device, vr %
s.
\n
"
,
wined3d_debug_vkresult
(
vr
)
);
vk_device
=
VK_NULL_HANDLE
;
hr
=
hresult_from_vk_result
(
vr
);
goto
fail
;
...
...
@@ -455,7 +455,7 @@ static BOOL enable_vulkan_instance_extensions(uint32_t *extension_count,
if
((
vr
=
pfn_vkEnumerateInstanceExtensionProperties
(
NULL
,
&
count
,
NULL
))
<
0
)
{
WARN
(
"Failed to count instance extensions, vr %
d.
\n
"
,
vr
);
WARN
(
"Failed to count instance extensions, vr %
s.
\n
"
,
wined3d_debug_vkresult
(
vr
)
);
goto
done
;
}
if
(
!
(
extensions
=
heap_calloc
(
count
,
sizeof
(
*
extensions
))))
...
...
@@ -465,7 +465,7 @@ static BOOL enable_vulkan_instance_extensions(uint32_t *extension_count,
}
if
((
vr
=
pfn_vkEnumerateInstanceExtensionProperties
(
NULL
,
&
count
,
extensions
))
<
0
)
{
WARN
(
"Failed to enumerate extensions, vr %
d.
\n
"
,
vr
);
WARN
(
"Failed to enumerate extensions, vr %
s.
\n
"
,
wined3d_debug_vkresult
(
vr
)
);
goto
done
;
}
...
...
@@ -548,7 +548,7 @@ static BOOL wined3d_init_vulkan(struct wined3d_vk_info *vk_info)
if
((
vr
=
VK_CALL
(
vkCreateInstance
(
&
instance_info
,
NULL
,
&
instance
)))
<
0
)
{
WARN
(
"Failed to create Vulkan instance, vr %
d.
\n
"
,
vr
);
WARN
(
"Failed to create Vulkan instance, vr %
s.
\n
"
,
wined3d_debug_vkresult
(
vr
)
);
goto
fail
;
}
...
...
@@ -596,7 +596,7 @@ static VkPhysicalDevice get_vulkan_physical_device(struct wined3d_vk_info *vk_in
if
((
vr
=
VK_CALL
(
vkEnumeratePhysicalDevices
(
vk_info
->
instance
,
&
count
,
NULL
)))
<
0
)
{
WARN
(
"Failed to enumerate physical devices, vr %
d.
\n
"
,
vr
);
WARN
(
"Failed to enumerate physical devices, vr %
s.
\n
"
,
wined3d_debug_vkresult
(
vr
)
);
return
VK_NULL_HANDLE
;
}
if
(
!
count
)
...
...
@@ -613,7 +613,7 @@ static VkPhysicalDevice get_vulkan_physical_device(struct wined3d_vk_info *vk_in
if
((
vr
=
VK_CALL
(
vkEnumeratePhysicalDevices
(
vk_info
->
instance
,
&
count
,
physical_devices
)))
<
0
)
{
WARN
(
"Failed to get physical devices, vr %
d.
\n
"
,
vr
);
WARN
(
"Failed to get physical devices, vr %
s.
\n
"
,
wined3d_debug_vkresult
(
vr
)
);
return
VK_NULL_HANDLE
;
}
...
...
dlls/wined3d/utils.c
View file @
965ab444
...
...
@@ -5261,6 +5261,45 @@ const char *debug_glerror(GLenum error) {
}
}
const
char
*
wined3d_debug_vkresult
(
VkResult
vr
)
{
switch
(
vr
)
{
#define WINED3D_TO_STR(x) case x: return #x
WINED3D_TO_STR
(
VK_ERROR_INVALID_DEVICE_ADDRESS_EXT
);
WINED3D_TO_STR
(
VK_ERROR_NOT_PERMITTED_EXT
);
WINED3D_TO_STR
(
VK_ERROR_FRAGMENTATION_EXT
);
WINED3D_TO_STR
(
VK_ERROR_INVALID_EXTERNAL_HANDLE
);
WINED3D_TO_STR
(
VK_ERROR_OUT_OF_POOL_MEMORY
);
WINED3D_TO_STR
(
VK_ERROR_INVALID_SHADER_NV
);
WINED3D_TO_STR
(
VK_ERROR_OUT_OF_DATE_KHR
);
WINED3D_TO_STR
(
VK_ERROR_NATIVE_WINDOW_IN_USE_KHR
);
WINED3D_TO_STR
(
VK_ERROR_SURFACE_LOST_KHR
);
WINED3D_TO_STR
(
VK_ERROR_FRAGMENTED_POOL
);
WINED3D_TO_STR
(
VK_ERROR_FORMAT_NOT_SUPPORTED
);
WINED3D_TO_STR
(
VK_ERROR_TOO_MANY_OBJECTS
);
WINED3D_TO_STR
(
VK_ERROR_INCOMPATIBLE_DRIVER
);
WINED3D_TO_STR
(
VK_ERROR_FEATURE_NOT_PRESENT
);
WINED3D_TO_STR
(
VK_ERROR_EXTENSION_NOT_PRESENT
);
WINED3D_TO_STR
(
VK_ERROR_LAYER_NOT_PRESENT
);
WINED3D_TO_STR
(
VK_ERROR_MEMORY_MAP_FAILED
);
WINED3D_TO_STR
(
VK_ERROR_DEVICE_LOST
);
WINED3D_TO_STR
(
VK_ERROR_INITIALIZATION_FAILED
);
WINED3D_TO_STR
(
VK_ERROR_OUT_OF_DEVICE_MEMORY
);
WINED3D_TO_STR
(
VK_ERROR_OUT_OF_HOST_MEMORY
);
WINED3D_TO_STR
(
VK_SUCCESS
);
WINED3D_TO_STR
(
VK_NOT_READY
);
WINED3D_TO_STR
(
VK_TIMEOUT
);
WINED3D_TO_STR
(
VK_EVENT_SET
);
WINED3D_TO_STR
(
VK_EVENT_RESET
);
WINED3D_TO_STR
(
VK_INCOMPLETE
);
WINED3D_TO_STR
(
VK_SUBOPTIMAL_KHR
);
#undef WINED3D_TO_STR
default:
return
wine_dbg_sprintf
(
"unrecognised(%d)"
,
vr
);
}
}
static
const
char
*
debug_fixup_channel_source
(
enum
fixup_channel_source
source
)
{
switch
(
source
)
...
...
dlls/wined3d/wined3d_private.h
View file @
965ab444
...
...
@@ -3222,6 +3222,7 @@ const char *wined3d_debug_resource_access(DWORD access) DECLSPEC_HIDDEN;
const
char
*
wined3d_debug_bind_flags
(
DWORD
bind_flags
)
DECLSPEC_HIDDEN
;
const
char
*
wined3d_debug_view_desc
(
const
struct
wined3d_view_desc
*
d
,
const
struct
wined3d_resource
*
resource
)
DECLSPEC_HIDDEN
;
const
char
*
wined3d_debug_vkresult
(
VkResult
vr
)
DECLSPEC_HIDDEN
;
static
inline
BOOL
wined3d_resource_access_is_managed
(
unsigned
int
access
)
{
...
...
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