Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
blender
monado
Commits
9b6b5b7e
Commit
9b6b5b7e
authored
May 01, 2021
by
Jakob Bornecrantz
Committed by
Ryan Pavlik
May 11, 2021
Browse files
c/main: Do not copy vk_bundle
parent
bd6e15c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/xrt/compositor/main/comp_window_direct_nvidia.c
View file @
9b6b5b7e
...
...
@@ -176,13 +176,10 @@ comp_window_direct_nvidia_init(struct comp_target *ct)
return
false
;
}
struct
vk_bundle
comp_vk
=
ct
->
c
->
vk
;
// find our display using nvidia whitelist, enumerate its modes, and
// pick the best one get a list of attached displays
uint32_t
display_count
;
if
(
comp_vk
.
vkGetPhysicalDeviceDisplayPropertiesKHR
(
comp_vk
.
physical_device
,
&
display_count
,
NULL
)
!=
VK_SUCCESS
)
{
if
(
vk
->
vkGetPhysicalDeviceDisplayPropertiesKHR
(
vk
->
physical_device
,
&
display_count
,
NULL
)
!=
VK_SUCCESS
)
{
COMP_ERROR
(
ct
->
c
,
"Failed to get vulkan display count"
);
return
false
;
}
...
...
@@ -194,8 +191,8 @@ comp_window_direct_nvidia_init(struct comp_target *ct)
struct
VkDisplayPropertiesKHR
*
display_props
=
U_TYPED_ARRAY_CALLOC
(
VkDisplayPropertiesKHR
,
display_count
);
if
(
display_props
&&
comp_vk
.
vkGetPhysicalDeviceDisplayPropertiesKHR
(
comp_vk
.
physical_device
,
&
display_count
,
display_props
)
!=
VK_SUCCESS
)
{
if
(
display_props
&&
vk
->
vkGetPhysicalDeviceDisplayPropertiesKHR
(
vk
->
physical_device
,
&
display_count
,
display_props
)
!=
VK_SUCCESS
)
{
COMP_ERROR
(
ct
->
c
,
"Failed to get display properties"
);
free
(
display_props
);
return
false
;
...
...
src/xrt/compositor/main/comp_window_vk_display.c
View file @
9b6b5b7e
...
...
@@ -160,11 +160,8 @@ comp_window_vk_display_init(struct comp_target *ct)
return
false
;
}
struct
vk_bundle
comp_vk
=
ct
->
c
->
vk
;
uint32_t
display_count
;
if
(
comp_vk
.
vkGetPhysicalDeviceDisplayPropertiesKHR
(
comp_vk
.
physical_device
,
&
display_count
,
NULL
)
!=
VK_SUCCESS
)
{
if
(
vk
->
vkGetPhysicalDeviceDisplayPropertiesKHR
(
vk
->
physical_device
,
&
display_count
,
NULL
)
!=
VK_SUCCESS
)
{
COMP_ERROR
(
ct
->
c
,
"Failed to get vulkan display count"
);
return
false
;
}
...
...
@@ -176,8 +173,8 @@ comp_window_vk_display_init(struct comp_target *ct)
struct
VkDisplayPropertiesKHR
*
display_props
=
U_TYPED_ARRAY_CALLOC
(
VkDisplayPropertiesKHR
,
display_count
);
if
(
display_props
&&
comp_vk
.
vkGetPhysicalDeviceDisplayPropertiesKHR
(
comp_vk
.
physical_device
,
&
display_count
,
display_props
)
!=
VK_SUCCESS
)
{
if
(
display_props
&&
vk
->
vkGetPhysicalDeviceDisplayPropertiesKHR
(
vk
->
physical_device
,
&
display_count
,
display_props
)
!=
VK_SUCCESS
)
{
COMP_ERROR
(
ct
->
c
,
"Failed to get display properties"
);
free
(
display_props
);
return
false
;
...
...
Write
Preview
Supports
Markdown
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