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
d1d9d549
Commit
d1d9d549
authored
Jul 16, 2018
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Jul 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevulkan: Implement vkGetDeviceQueue2.
Signed-off-by:
Józef Kucia
<
jkucia@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c92b71f6
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
38 additions
and
10 deletions
+38
-10
vulkan-1.spec
dlls/vulkan-1/vulkan-1.spec
+1
-1
make_vulkan
dlls/winevulkan/make_vulkan
+2
-1
vulkan.c
dlls/winevulkan/vulkan.c
+28
-7
vulkan_private.h
dlls/winevulkan/vulkan_private.h
+2
-0
vulkan_thunks.c
dlls/winevulkan/vulkan_thunks.c
+1
-0
vulkan_thunks.h
dlls/winevulkan/vulkan_thunks.h
+1
-0
winevulkan.spec
dlls/winevulkan/winevulkan.spec
+1
-1
vulkan.h
include/wine/vulkan.h
+2
-0
No files found.
dlls/vulkan-1/vulkan-1.spec
View file @
d1d9d549
...
...
@@ -164,7 +164,7 @@
@ stdcall vkGetDeviceMemoryCommitment(ptr int64 ptr) winevulkan.wine_vkGetDeviceMemoryCommitment
@ stdcall vkGetDeviceProcAddr(ptr str) winevulkan.wine_vkGetDeviceProcAddr
@ stdcall vkGetDeviceQueue(ptr long long ptr) winevulkan.wine_vkGetDeviceQueue
@ st
ub
vkGetDeviceQueue2
@ st
dcall vkGetDeviceQueue2(ptr ptr ptr) winevulkan.wine_
vkGetDeviceQueue2
@ stub vkGetDisplayModePropertiesKHR
@ stub vkGetDisplayPlaneCapabilitiesKHR
@ stub vkGetDisplayPlaneSupportedDisplaysKHR
...
...
dlls/winevulkan/make_vulkan
View file @
d1d9d549
...
...
@@ -161,6 +161,7 @@ FUNCTION_OVERRIDES = {
"vkFreeCommandBuffers"
:
{
"dispatch"
:
True
,
"driver"
:
False
,
"thunk"
:
False
},
"vkGetDeviceProcAddr"
:
{
"dispatch"
:
False
,
"driver"
:
True
,
"thunk"
:
False
},
"vkGetDeviceQueue"
:
{
"dispatch"
:
True
,
"driver"
:
False
,
"thunk"
:
False
},
"vkGetDeviceQueue2"
:
{
"dispatch"
:
False
,
"driver"
:
False
,
"thunk"
:
False
},
"vkQueueSubmit"
:
{
"dispatch"
:
True
,
"driver"
:
False
,
"thunk"
:
False
},
# VK_KHR_surface
...
...
@@ -402,7 +403,7 @@ class VkFunction(object):
# Required is set while parsing which APIs and types are required
# and is used by the code generation.
self
.
required
=
True
if
self
.
driver
else
False
self
.
required
=
True
if
func_info
else
False
@staticmethod
def
from_alias
(
command
,
alias
):
...
...
dlls/winevulkan/vulkan.c
View file @
d1d9d549
...
...
@@ -168,7 +168,7 @@ static void wine_vk_command_buffers_free(struct VkDevice_T *device, VkCommandPoo
/* Helper function to create queues for a given family index. */
static
struct
VkQueue_T
*
wine_vk_device_alloc_queues
(
struct
VkDevice_T
*
device
,
uint32_t
family_index
,
uint32_t
queue_count
)
uint32_t
family_index
,
uint32_t
queue_count
,
VkDeviceQueueCreateFlags
flags
)
{
struct
VkQueue_T
*
queues
;
unsigned
int
i
;
...
...
@@ -182,15 +182,15 @@ static struct VkQueue_T *wine_vk_device_alloc_queues(struct VkDevice_T *device,
for
(
i
=
0
;
i
<
queue_count
;
i
++
)
{
struct
VkQueue_T
*
queue
=
&
queues
[
i
];
queue
->
base
.
loader_magic
=
VULKAN_ICD_MAGIC_VALUE
;
queue
->
device
=
device
;
queue
->
flags
=
flags
;
/* The native device was already allocated with the required number of queues,
* so just fetch them from there.
*/
device
->
funcs
.
p_vkGetDeviceQueue
(
device
->
device
,
family_index
,
i
,
&
queue
->
queue
);
/* Set special header for ICD loader. */
queue
->
base
.
loader_magic
=
VULKAN_ICD_MAGIC_VALUE
;
}
return
queues
;
...
...
@@ -342,7 +342,7 @@ static void wine_vk_instance_convert_create_info(const VkInstanceCreateInfo *src
TRACE
(
"Application name %s, application version %#x
\n
"
,
debugstr_a
(
app_info
->
pApplicationName
),
app_info
->
applicationVersion
);
TRACE
(
"Engine name %s, engine version %#x
\n
"
,
debugstr_a
(
app_info
->
pEngineName
),
app_info
->
engineVersion
);
app_info
->
engineVersion
);
TRACE
(
"API version %#x
\n
"
,
app_info
->
apiVersion
);
}
...
...
@@ -633,12 +633,14 @@ VkResult WINAPI wine_vkCreateDevice(VkPhysicalDevice phys_dev,
for
(
i
=
0
;
i
<
create_info_host
.
queueCreateInfoCount
;
i
++
)
{
uint32_t
flags
=
create_info_host
.
pQueueCreateInfos
[
i
].
flags
;
uint32_t
family_index
=
create_info_host
.
pQueueCreateInfos
[
i
].
queueFamilyIndex
;
uint32_t
queue_count
=
create_info_host
.
pQueueCreateInfos
[
i
].
queueCount
;
TRACE
(
"queueFamilyIndex %u, queueCount %u
\n
"
,
family_index
,
queue_count
);
object
->
queues
[
family_index
]
=
wine_vk_device_alloc_queues
(
object
,
family_index
,
queue_count
);
object
->
queues
[
family_index
]
=
wine_vk_device_alloc_queues
(
object
,
family_index
,
queue_count
,
flags
);
if
(
!
object
->
queues
[
family_index
])
{
ERR
(
"Failed to allocate memory for queues
\n
"
);
...
...
@@ -928,11 +930,30 @@ PFN_vkVoidFunction WINAPI wine_vkGetDeviceProcAddr(VkDevice device, const char *
void
WINAPI
wine_vkGetDeviceQueue
(
VkDevice
device
,
uint32_t
family_index
,
uint32_t
queue_index
,
VkQueue
*
queue
)
{
TRACE
(
"%p
%u %u
%p
\n
"
,
device
,
family_index
,
queue_index
,
queue
);
TRACE
(
"%p
, %u, %u,
%p
\n
"
,
device
,
family_index
,
queue_index
,
queue
);
*
queue
=
&
device
->
queues
[
family_index
][
queue_index
];
}
void
WINAPI
wine_vkGetDeviceQueue2
(
VkDevice
device
,
const
VkDeviceQueueInfo2
*
info
,
VkQueue
*
queue
)
{
const
struct
wine_vk_structure_header
*
chain
;
struct
VkQueue_T
*
matching_queue
;
TRACE
(
"%p, %p, %p
\n
"
,
device
,
info
,
queue
);
if
((
chain
=
info
->
pNext
))
FIXME
(
"Ignoring a linked structure of type %#x.
\n
"
,
chain
->
sType
);
matching_queue
=
&
device
->
queues
[
info
->
queueFamilyIndex
][
info
->
queueIndex
];
if
(
matching_queue
->
flags
!=
info
->
flags
)
{
WARN
(
"No matching flags were specified %#x, %#x.
\n
"
,
matching_queue
->
flags
,
info
->
flags
);
matching_queue
=
VK_NULL_HANDLE
;
}
*
queue
=
matching_queue
;
}
PFN_vkVoidFunction
WINAPI
wine_vkGetInstanceProcAddr
(
VkInstance
instance
,
const
char
*
name
)
{
void
*
func
;
...
...
dlls/winevulkan/vulkan_private.h
View file @
d1d9d549
...
...
@@ -106,6 +106,8 @@ struct VkQueue_T
struct
wine_vk_base
base
;
struct
VkDevice_T
*
device
;
/* parent */
VkQueue
queue
;
/* native queue */
VkDeviceQueueCreateFlags
flags
;
};
void
*
wine_vk_get_device_proc_addr
(
const
char
*
name
)
DECLSPEC_HIDDEN
;
...
...
dlls/winevulkan/vulkan_thunks.c
View file @
d1d9d549
...
...
@@ -2966,6 +2966,7 @@ static const struct vulkan_func vk_device_dispatch_table[] =
{
"vkGetDeviceMemoryCommitment"
,
&
wine_vkGetDeviceMemoryCommitment
},
{
"vkGetDeviceProcAddr"
,
&
wine_vkGetDeviceProcAddr
},
{
"vkGetDeviceQueue"
,
&
wine_vkGetDeviceQueue
},
{
"vkGetDeviceQueue2"
,
&
wine_vkGetDeviceQueue2
},
{
"vkGetEventStatus"
,
&
wine_vkGetEventStatus
},
{
"vkGetFenceStatus"
,
&
wine_vkGetFenceStatus
},
{
"vkGetImageMemoryRequirements"
,
&
wine_vkGetImageMemoryRequirements
},
...
...
dlls/winevulkan/vulkan_thunks.h
View file @
d1d9d549
...
...
@@ -53,6 +53,7 @@ VkResult WINAPI wine_vkEnumeratePhysicalDevices(VkInstance instance, uint32_t *p
void
WINAPI
wine_vkFreeCommandBuffers
(
VkDevice
device
,
VkCommandPool
commandPool
,
uint32_t
commandBufferCount
,
const
VkCommandBuffer
*
pCommandBuffers
);
PFN_vkVoidFunction
WINAPI
wine_vkGetDeviceProcAddr
(
VkDevice
device
,
const
char
*
pName
);
void
WINAPI
wine_vkGetDeviceQueue
(
VkDevice
device
,
uint32_t
queueFamilyIndex
,
uint32_t
queueIndex
,
VkQueue
*
pQueue
);
void
WINAPI
wine_vkGetDeviceQueue2
(
VkDevice
device
,
const
VkDeviceQueueInfo2
*
pQueueInfo
,
VkQueue
*
pQueue
);
VkResult
WINAPI
wine_vkQueueSubmit
(
VkQueue
queue
,
uint32_t
submitCount
,
const
VkSubmitInfo
*
pSubmits
,
VkFence
fence
);
typedef
struct
VkAcquireNextImageInfoKHR_host
...
...
dlls/winevulkan/winevulkan.spec
View file @
d1d9d549
...
...
@@ -166,7 +166,7 @@
@ stdcall wine_vkGetDeviceMemoryCommitment(ptr int64 ptr)
@ stdcall wine_vkGetDeviceProcAddr(ptr str)
@ stdcall wine_vkGetDeviceQueue(ptr long long ptr)
@ st
ub vkGetDeviceQueue2
@ st
dcall wine_vkGetDeviceQueue2(ptr ptr ptr)
@ stub vkGetDisplayModePropertiesKHR
@ stub vkGetDisplayPlaneCapabilitiesKHR
@ stub vkGetDisplayPlaneSupportedDisplaysKHR
...
...
include/wine/vulkan.h
View file @
d1d9d549
...
...
@@ -4319,6 +4319,7 @@ typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupSurfacePresentModesKHR)(VkDevic
typedef
void
(
VKAPI_PTR
*
PFN_vkGetDeviceMemoryCommitment
)(
VkDevice
,
VkDeviceMemory
,
VkDeviceSize
*
);
typedef
PFN_vkVoidFunction
(
VKAPI_PTR
*
PFN_vkGetDeviceProcAddr
)(
VkDevice
,
const
char
*
);
typedef
void
(
VKAPI_PTR
*
PFN_vkGetDeviceQueue
)(
VkDevice
,
uint32_t
,
uint32_t
,
VkQueue
*
);
typedef
void
(
VKAPI_PTR
*
PFN_vkGetDeviceQueue2
)(
VkDevice
,
const
VkDeviceQueueInfo2
*
,
VkQueue
*
);
typedef
VkResult
(
VKAPI_PTR
*
PFN_vkGetEventStatus
)(
VkDevice
,
VkEvent
);
typedef
VkResult
(
VKAPI_PTR
*
PFN_vkGetFenceStatus
)(
VkDevice
,
VkFence
);
typedef
void
(
VKAPI_PTR
*
PFN_vkGetImageMemoryRequirements
)(
VkDevice
,
VkImage
,
VkMemoryRequirements
*
);
...
...
@@ -4537,6 +4538,7 @@ VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, VkSu
void
VKAPI_CALL
vkGetDeviceMemoryCommitment
(
VkDevice
device
,
VkDeviceMemory
memory
,
VkDeviceSize
*
pCommittedMemoryInBytes
);
PFN_vkVoidFunction
VKAPI_CALL
vkGetDeviceProcAddr
(
VkDevice
device
,
const
char
*
pName
);
void
VKAPI_CALL
vkGetDeviceQueue
(
VkDevice
device
,
uint32_t
queueFamilyIndex
,
uint32_t
queueIndex
,
VkQueue
*
pQueue
);
void
VKAPI_CALL
vkGetDeviceQueue2
(
VkDevice
device
,
const
VkDeviceQueueInfo2
*
pQueueInfo
,
VkQueue
*
pQueue
);
VkResult
VKAPI_CALL
vkGetEventStatus
(
VkDevice
device
,
VkEvent
event
);
VkResult
VKAPI_CALL
vkGetFenceStatus
(
VkDevice
device
,
VkFence
fence
);
void
VKAPI_CALL
vkGetImageMemoryRequirements
(
VkDevice
device
,
VkImage
image
,
VkMemoryRequirements
*
pMemoryRequirements
);
...
...
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