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
28a4ed41
Commit
28a4ed41
authored
3 years ago
by
Sebastian Gaida
Browse files
Options
Downloads
Patches
Plain Diff
[
#105
] fix bindless project
parent
c68da7d6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!88
Resolve "Indirect Draw"
Pipeline
#27226
failed
3 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/vkcv/Core.hpp
+10
-10
10 additions, 10 deletions
include/vkcv/Core.hpp
projects/bindless_textures/src/main.cpp
+12
-17
12 additions, 17 deletions
projects/bindless_textures/src/main.cpp
with
22 additions
and
27 deletions
include/vkcv/Core.hpp
+
10
−
10
View file @
28a4ed41
...
...
@@ -331,16 +331,16 @@ namespace vkcv
const
std
::
vector
<
ImageHandle
>
&
renderTargets
,
const
WindowHandle
&
windowHandle
);
void
Core
::
recordIndexedIndirectDrawcallsToCmdStream
(
const
CommandStreamHandle
cmdStreamHandle
,
const
PassHandle
renderpassHandle
,
const
GraphicsPipelineHandle
&
pipelineHandle
,
const
PushConstants
&
pushConstantData
,
const
vkcv
::
Mesh
&
compiledMesh
,
const
std
::
vector
<
ImageHandle
>
&
renderTargets
,
const
vkcv
::
Buffer
<
vk
::
DrawIndexedIndirectCommand
>
&
indirectBuffer
,
const
uint32_t
drawCount
,
const
WindowHandle
&
windowHandle
);
void
Core
::
recordIndexedIndirectDrawcallsToCmdStream
(
const
CommandStreamHandle
cmdStreamHandle
,
const
PassHandle
renderpassHandle
,
const
GraphicsPipelineHandle
&
pipelineHandle
,
const
PushConstants
&
pushConstantData
,
const
vkcv
::
Mesh
&
compiledMesh
,
const
std
::
vector
<
ImageHandle
>
&
renderTargets
,
const
vkcv
::
Buffer
<
vk
::
DrawIndexedIndirectCommand
>
&
indirectBuffer
,
const
uint32_t
drawCount
,
const
WindowHandle
&
windowHandle
);
void
recordMeshShaderDrawcalls
(
const
CommandStreamHandle
&
cmdStreamHandle
,
...
...
This diff is collapsed.
Click to expand it.
projects/bindless_textures/src/main.cpp
+
12
−
17
View file @
28a4ed41
...
...
@@ -12,13 +12,6 @@ int main(int argc, const char** argv) {
uint32_t
windowWidth
=
800
;
uint32_t
windowHeight
=
600
;
vkcv
::
Window
window
=
vkcv
::
Window
::
create
(
applicationName
,
windowWidth
,
windowHeight
,
true
);
vkcv
::
Features
features
;
features
.
requireExtension
(
VK_KHR_SWAPCHAIN_EXTENSION_NAME
);
features
.
requireExtensionFeature
<
vk
::
PhysicalDeviceDescriptorIndexingFeatures
>
(
...
...
@@ -49,13 +42,14 @@ int main(int argc, const char** argv) {
);
vkcv
::
Core
core
=
vkcv
::
Core
::
create
(
window
,
applicationName
,
VK_MAKE_VERSION
(
0
,
0
,
1
),
{
vk
::
QueueFlagBits
::
eGraphics
,
vk
::
QueueFlagBits
::
eCompute
,
vk
::
QueueFlagBits
::
eTransfer
},
features
);
vkcv
::
WindowHandle
windowHandle
=
core
.
createWindow
(
applicationName
,
windowWidth
,
windowHeight
,
false
);
vkcv
::
asset
::
Scene
mesh
;
// TEST DATA
...
...
@@ -109,7 +103,7 @@ int main(int argc, const char** argv) {
const
vkcv
::
AttachmentDescription
present_color_attachment
(
vkcv
::
AttachmentOperation
::
STORE
,
vkcv
::
AttachmentOperation
::
CLEAR
,
core
.
getSwapchain
().
getFormat
()
core
.
getSwapchain
(
windowHandle
).
getFormat
()
);
const
vkcv
::
AttachmentDescription
depth_attachment
(
...
...
@@ -162,7 +156,7 @@ int main(int argc, const char** argv) {
vkcv
::
DescriptorSetLayoutHandle
descriptorSetLayout
=
core
.
createDescriptorSetLayout
(
adjustedBindings
);
vkcv
::
DescriptorSetHandle
descriptorSet
=
core
.
createDescriptorSet
(
descriptorSetLayout
);
const
vkcv
::
PipelineConfig
firstMeshPipelineConfig
{
const
vkcv
::
Graphics
PipelineConfig
firstMeshPipelineConfig
{
firstMeshProgram
,
UINT32_MAX
,
UINT32_MAX
,
...
...
@@ -171,7 +165,7 @@ int main(int argc, const char** argv) {
{
core
.
getDescriptorSetLayout
(
descriptorSetLayout
).
vulkanHandle
},
true
};
vkcv
::
PipelineHandle
firstMeshPipeline
=
core
.
createGraphicsPipeline
(
firstMeshPipelineConfig
);
vkcv
::
Graphics
PipelineHandle
firstMeshPipeline
=
core
.
createGraphicsPipeline
(
firstMeshPipelineConfig
);
if
(
!
firstMeshPipeline
)
{
std
::
cerr
<<
"Error. Could not create graphics pipeline. Exiting."
<<
std
::
endl
;
...
...
@@ -227,7 +221,7 @@ int main(int argc, const char** argv) {
vkcv
::
DescriptorSetUsage
descriptorUsage
(
0
,
core
.
getDescriptorSet
(
descriptorSet
).
vulkanHandle
);
vkcv
::
DrawcallInfo
drawcall
(
renderMesh
,
{
descriptorUsage
},
1
);
vkcv
::
camera
::
CameraManager
cameraManager
(
window
);
vkcv
::
camera
::
CameraManager
cameraManager
(
core
.
getWindow
(
windowHandle
)
);
uint32_t
camIndex0
=
cameraManager
.
addCamera
(
vkcv
::
camera
::
ControllerType
::
PILOT
);
uint32_t
camIndex1
=
cameraManager
.
addCamera
(
vkcv
::
camera
::
ControllerType
::
TRACKBALL
);
...
...
@@ -235,14 +229,14 @@ int main(int argc, const char** argv) {
auto
start
=
std
::
chrono
::
system_clock
::
now
();
while
(
window
.
is
Window
Open
())
{
while
(
vkcv
::
Window
::
hasOpen
Window
())
{
vkcv
::
Window
::
pollEvents
();
if
(
window
.
getHeight
()
==
0
||
window
.
getWidth
()
==
0
)
if
(
core
.
getWindow
(
windowHandle
).
getHeight
()
==
0
||
core
.
getWindow
(
windowHandle
)
.
getWidth
()
==
0
)
continue
;
uint32_t
swapchainWidth
,
swapchainHeight
;
if
(
!
core
.
beginFrame
(
swapchainWidth
,
swapchainHeight
))
{
if
(
!
core
.
beginFrame
(
swapchainWidth
,
swapchainHeight
,
windowHandle
))
{
continue
;
}
...
...
@@ -272,10 +266,11 @@ int main(int argc, const char** argv) {
firstMeshPipeline
,
pushConstants
,
{
drawcall
},
renderTargets
);
renderTargets
,
windowHandle
);
core
.
prepareSwapchainImageForPresent
(
cmdStream
);
core
.
submitCommandStream
(
cmdStream
);
core
.
endFrame
();
core
.
endFrame
(
windowHandle
);
}
return
0
;
...
...
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