-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a47e478
commit c0c27ac
Showing
13 changed files
with
93 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
include/inexor/vulkan-renderer/render-graph/push_constant_range.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#pragma once | ||
|
||
#include <volk.h> | ||
|
||
#include <functional> | ||
|
||
namespace inexor::vulkan_renderer::render_graph { | ||
|
||
// Forward declaration | ||
class RenderGraph; | ||
|
||
/// A wrapper class for push constant ranges in the rendergraph | ||
class PushConstantRange { | ||
friend RenderGraph; | ||
|
||
private: | ||
VkPushConstantRange m_push_constant; | ||
std::function<void()> m_on_update{[]() {}}; | ||
const void *m_push_constant_data{nullptr}; | ||
|
||
/// Default constructor | ||
/// @param push_constant The push constant | ||
/// @param push_constant_data The data of the push constant | ||
/// @param on_update The update function of the push constant | ||
PushConstantRange(VkPushConstantRange push_constant, const void *push_constant_data, | ||
std::function<void()> on_update); | ||
|
||
public: | ||
PushConstantRange(const PushConstantRange &) = delete; | ||
PushConstantRange(PushConstantRange &&other) noexcept; | ||
~PushConstantRange() = default; | ||
|
||
PushConstantRange &operator=(const PushConstantRange &) = delete; | ||
PushConstantRange &operator=(PushConstantRange &&) = delete; | ||
}; | ||
|
||
} // namespace inexor::vulkan_renderer::render_graph |
37 changes: 0 additions & 37 deletions
37
include/inexor/vulkan-renderer/render-graph/push_constant_range_resource.hpp
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...er-graph/push_constant_range_resource.cpp → ...erer/render-graph/push_constant_range.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters