Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
VkCV Framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vulkan2021
VkCV Framework
Commits
84781a4a
Commit
84781a4a
authored
3 years ago
by
Sebastian Gaida
Browse files
Options
Downloads
Patches
Plain Diff
[
#16
] remove debug code
parent
c818872a
No related branches found
No related tags found
1 merge request
!12
Resolve "Swapchain Class"
Pipeline
#24851
passed
3 years ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/vkcv/SwapChain.hpp
+0
-1
0 additions, 1 deletion
include/vkcv/SwapChain.hpp
src/vkcv/Context.cpp
+0
-1
0 additions, 1 deletion
src/vkcv/Context.cpp
src/vkcv/Core.cpp
+0
-32
0 additions, 32 deletions
src/vkcv/Core.cpp
with
0 additions
and
34 deletions
include/vkcv/SwapChain.hpp
+
0
−
1
View file @
84781a4a
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
#include
"vulkan/vulkan.hpp"
#include
"vulkan/vulkan.hpp"
#include
"Context.hpp"
#include
"Context.hpp"
#include
"vkcv/Window.hpp"
#include
"vkcv/Window.hpp"
#include
<iostream>
namespace
vkcv
{
namespace
vkcv
{
class
SwapChain
final
{
class
SwapChain
final
{
...
...
This diff is collapsed.
Click to expand it.
src/vkcv/Context.cpp
+
0
−
1
View file @
84781a4a
#include
<iostream>
#include
"vkcv/Context.hpp"
#include
"vkcv/Context.hpp"
namespace
vkcv
namespace
vkcv
...
...
This diff is collapsed.
Click to expand it.
src/vkcv/Core.cpp
+
0
−
32
View file @
84781a4a
...
@@ -109,12 +109,6 @@ namespace vkcv
...
@@ -109,12 +109,6 @@ namespace vkcv
queuePairsTransfer
=
{};
queuePairsTransfer
=
{};
std
::
vector
<
vk
::
QueueFamilyProperties
>
qFamilyProperties
=
physicalDevice
.
getQueueFamilyProperties
();
std
::
vector
<
vk
::
QueueFamilyProperties
>
qFamilyProperties
=
physicalDevice
.
getQueueFamilyProperties
();
// DEBUG
std
::
cout
<<
"Input queue flags:"
<<
std
::
endl
;
for
(
auto
qFlag
:
queueFlags
)
{
std
::
cout
<<
"
\t
"
<<
to_string
(
qFlag
)
<<
std
::
endl
;
}
//check priorities of flags -> the lower prioCount the higher the priority
//check priorities of flags -> the lower prioCount the higher the priority
std
::
vector
<
int
>
prios
;
std
::
vector
<
int
>
prios
;
for
(
auto
flag
:
queueFlags
){
for
(
auto
flag
:
queueFlags
){
...
@@ -123,23 +117,16 @@ namespace vkcv
...
@@ -123,23 +117,16 @@ namespace vkcv
prioCount
+=
(
static_cast
<
uint32_t
>
(
flag
&
qFamilyProperties
[
i
].
queueFlags
)
!=
0
)
*
qFamilyProperties
[
i
].
queueCount
;
prioCount
+=
(
static_cast
<
uint32_t
>
(
flag
&
qFamilyProperties
[
i
].
queueFlags
)
!=
0
)
*
qFamilyProperties
[
i
].
queueCount
;
}
}
prios
.
push_back
(
prioCount
);
prios
.
push_back
(
prioCount
);
std
::
cout
<<
"prio Count: "
<<
prioCount
<<
std
::
endl
;
}
}
//resort flags with heighest priority before allocating the queues
//resort flags with heighest priority before allocating the queues
std
::
vector
<
vk
::
QueueFlagBits
>
newFlags
;
std
::
vector
<
vk
::
QueueFlagBits
>
newFlags
;
for
(
int
i
=
0
;
i
<
prios
.
size
();
i
++
){
for
(
int
i
=
0
;
i
<
prios
.
size
();
i
++
){
auto
minElem
=
std
::
min_element
(
prios
.
begin
(),
prios
.
end
());
auto
minElem
=
std
::
min_element
(
prios
.
begin
(),
prios
.
end
());
int
index
=
minElem
-
prios
.
begin
();
int
index
=
minElem
-
prios
.
begin
();
std
::
cout
<<
"index: "
<<
index
<<
std
::
endl
;
newFlags
.
push_back
(
queueFlags
[
index
]);
newFlags
.
push_back
(
queueFlags
[
index
]);
prios
[
index
]
=
std
::
numeric_limits
<
int
>::
max
();
prios
[
index
]
=
std
::
numeric_limits
<
int
>::
max
();
}
}
std
::
cout
<<
"Sorted queue flags:"
<<
std
::
endl
;
for
(
auto
qFlag
:
newFlags
)
{
std
::
cout
<<
"
\t
"
<<
to_string
(
qFlag
)
<<
std
::
endl
;
}
// create requested queues and check if more requested queues are supported
// create requested queues and check if more requested queues are supported
// herefore: create vector that updates available queues in each queue family
// herefore: create vector that updates available queues in each queue family
// structure: [qFamily_0, ..., qFamily_n] where
// structure: [qFamily_0, ..., qFamily_n] where
...
@@ -154,7 +141,6 @@ namespace vkcv
...
@@ -154,7 +141,6 @@ namespace vkcv
}
}
initialQueueFamilyStatus
=
queueFamilyStatus
;
initialQueueFamilyStatus
=
queueFamilyStatus
;
// check if every queue with the specified queue flag can be created
// check if every queue with the specified queue flag can be created
// this automatically checks for queue flag support!
// this automatically checks for queue flag support!
for
(
auto
qFlag
:
newFlags
)
{
for
(
auto
qFlag
:
newFlags
)
{
...
@@ -168,7 +154,6 @@ namespace vkcv
...
@@ -168,7 +154,6 @@ namespace vkcv
queueFamilyStatus
[
i
][
0
]
--
;
queueFamilyStatus
[
i
][
0
]
--
;
queueFamilyStatus
[
i
][
1
]
--
;
queueFamilyStatus
[
i
][
1
]
--
;
queueFamilyStatus
[
i
][
2
]
--
;
queueFamilyStatus
[
i
][
2
]
--
;
std
::
cout
<<
"Graphics queue available at queue family #"
<<
i
<<
std
::
endl
;
found
=
true
;
found
=
true
;
}
}
}
}
...
@@ -184,7 +169,6 @@ namespace vkcv
...
@@ -184,7 +169,6 @@ namespace vkcv
queueFamilyStatus
[
i
][
0
]
--
;
queueFamilyStatus
[
i
][
0
]
--
;
queueFamilyStatus
[
i
][
1
]
--
;
queueFamilyStatus
[
i
][
1
]
--
;
queueFamilyStatus
[
i
][
2
]
--
;
queueFamilyStatus
[
i
][
2
]
--
;
std
::
cout
<<
"Compute queue available at queue family #"
<<
i
<<
std
::
endl
;
found
=
true
;
found
=
true
;
}
}
}
}
...
@@ -200,7 +184,6 @@ namespace vkcv
...
@@ -200,7 +184,6 @@ namespace vkcv
queueFamilyStatus
[
i
][
0
]
--
;
queueFamilyStatus
[
i
][
0
]
--
;
queueFamilyStatus
[
i
][
1
]
--
;
queueFamilyStatus
[
i
][
1
]
--
;
queueFamilyStatus
[
i
][
2
]
--
;
queueFamilyStatus
[
i
][
2
]
--
;
std
::
cout
<<
"Transfer queue available at queue family #"
<<
i
<<
std
::
endl
;
found
=
true
;
found
=
true
;
}
}
}
}
...
@@ -213,24 +196,9 @@ namespace vkcv
...
@@ -213,24 +196,9 @@ namespace vkcv
}
}
}
}
std
::
cout
<<
"Initial queue status:"
<<
std
::
endl
;
int
x
=
0
;
for
(
std
::
vector
<
int
>
e
:
initialQueueFamilyStatus
)
{
std
::
cout
<<
"#"
<<
x
<<
":
\t
["
<<
e
[
0
]
<<
", "
<<
e
[
1
]
<<
", "
<<
e
[
2
]
<<
"]"
<<
std
::
endl
;
x
++
;
}
std
::
cout
<<
"Actual queue status:"
<<
std
::
endl
;
x
=
0
;
for
(
std
::
vector
<
int
>
e
:
queueFamilyStatus
)
{
std
::
cout
<<
"#"
<<
x
<<
":
\t
["
<<
e
[
0
]
<<
", "
<<
e
[
1
]
<<
", "
<<
e
[
2
]
<<
"]"
<<
std
::
endl
;
x
++
;
}
// create all requested queues
// create all requested queues
for
(
int
i
=
0
;
i
<
qFamilyProperties
.
size
();
i
++
)
{
for
(
int
i
=
0
;
i
<
qFamilyProperties
.
size
();
i
++
)
{
uint32_t
create
=
std
::
abs
(
initialQueueFamilyStatus
[
i
][
0
]
-
queueFamilyStatus
[
i
][
0
]);
uint32_t
create
=
std
::
abs
(
initialQueueFamilyStatus
[
i
][
0
]
-
queueFamilyStatus
[
i
][
0
]);
std
::
cout
<<
"For Queue Family #"
<<
i
<<
" create "
<<
create
<<
" queues"
<<
std
::
endl
;
if
(
create
>
0
)
{
if
(
create
>
0
)
{
vk
::
DeviceQueueCreateInfo
qCreateInfo
(
vk
::
DeviceQueueCreateInfo
qCreateInfo
(
vk
::
DeviceQueueCreateFlags
(),
vk
::
DeviceQueueCreateFlags
(),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment