Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
d8583b2c
Commit
d8583b2c
authored
Dec 12, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dnn: fix vulkan backend builds with Clang
parent
82227b5a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
7 deletions
+14
-7
op_pool.hpp
modules/dnn/src/vkcom/include/op_pool.hpp
+1
-1
context.cpp
modules/dnn/src/vkcom/src/context.cpp
+7
-3
context.hpp
modules/dnn/src/vkcom/src/context.hpp
+2
-1
op_base.cpp
modules/dnn/src/vkcom/src/op_base.cpp
+4
-2
No files found.
modules/dnn/src/vkcom/include/op_pool.hpp
View file @
d8583b2c
...
...
@@ -59,7 +59,7 @@ private:
int
avg_pool_padded_area_
;
int
need_mask_
;
PaddingMode
padding_mode_
;
int
activation_
;
//
int activation_;
PoolShaderConfig
config_
;
};
...
...
modules/dnn/src/vkcom/src/context.cpp
View file @
d8583b2c
...
...
@@ -281,10 +281,14 @@ Context::~Context()
if
(
enableValidationLayers
)
{
auto
func
=
(
PFN_vkDestroyDebugReportCallbackEXT
)
vkGetInstanceProcAddr
(
kInstance
,
"vkDestroyDebugReportCallbackEXT"
);
if
(
func
==
nullptr
)
{
throw
std
::
runtime_error
(
"Could not load vkDestroyDebugReportCallbackEXT"
);
if
(
func
==
nullptr
)
{
CV_LOG_FATAL
(
NULL
,
"Could not load vkDestroyDebugReportCallbackEXT"
);
}
else
{
func
(
kInstance
,
kDebugReportCallback
,
NULL
);
}
func
(
kInstance
,
kDebugReportCallback
,
NULL
);
}
kShaders
.
clear
();
vkDestroyInstance
(
kInstance
,
NULL
);
...
...
modules/dnn/src/vkcom/src/context.hpp
View file @
d8583b2c
...
...
@@ -12,8 +12,9 @@ namespace cv { namespace dnn { namespace vkcom {
#ifdef HAVE_VULKAN
struct
Context
class
Context
{
public
:
Context
();
~
Context
();
};
...
...
modules/dnn/src/vkcom/src/op_base.cpp
View file @
d8583b2c
...
...
@@ -45,7 +45,9 @@ void OpBase::initVulkanThing(int buffer_num)
void
OpBase
::
createDescriptorSetLayout
(
int
buffer_num
)
{
VkDescriptorSetLayoutBinding
bindings
[
buffer_num
]
=
{};
if
(
buffer_num
<=
0
)
return
;
std
::
vector
<
VkDescriptorSetLayoutBinding
>
bindings
(
buffer_num
);
for
(
int
i
=
0
;
i
<
buffer_num
;
i
++
)
{
bindings
[
i
].
binding
=
i
;
...
...
@@ -56,7 +58,7 @@ void OpBase::createDescriptorSetLayout(int buffer_num)
VkDescriptorSetLayoutCreateInfo
info
=
{};
info
.
sType
=
VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
;
info
.
bindingCount
=
buffer_num
;
info
.
pBindings
=
bindings
;
info
.
pBindings
=
&
bindings
[
0
]
;
VK_CHECK_RESULT
(
vkCreateDescriptorSetLayout
(
device_
,
&
info
,
NULL
,
&
descriptor_set_layout_
));
}
...
...
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