mirror of
https://github.com/Takiiiiiiii/strato.git
synced 2025-07-17 08:46:39 +00:00
Ensure correct flushing for batched constant buffer updates
Cbufs could be read by non-maxwell3D engines so force a flush when switching to them or before Execute.
This commit is contained in:
@ -164,6 +164,10 @@ namespace skyline::gpu::interconnect {
|
||||
}
|
||||
}
|
||||
|
||||
void CommandExecutor::AddFlushCallback(std::function<void()> &&callback) {
|
||||
flushCallbacks.emplace_back(std::forward<decltype(callback)>(callback));
|
||||
}
|
||||
|
||||
void CommandExecutor::Execute() {
|
||||
if (!nodes.empty()) {
|
||||
TRACE_EVENT("gpu", "CommandExecutor::Execute");
|
||||
|
@ -29,6 +29,8 @@ namespace skyline::gpu::interconnect {
|
||||
span<TextureView *> lastSubpassColorAttachments; //!< The set of color attachments used in the last subpass
|
||||
TextureView *lastSubpassDepthStencilAttachment{}; //!< The depth stencil attachment used in the last subpass
|
||||
|
||||
std::vector<std::function<void()>> flushCallbacks; //!< Set of persistent callbacks that will be called at the start of Execute in order to flush data required for recording
|
||||
|
||||
/**
|
||||
* @brief Create a new render pass and subpass with the specified attachments, if one doesn't already exist or the current one isn't compatible
|
||||
* @note This also checks for subpass coalescing and will merge the new subpass with the previous one when possible
|
||||
@ -91,6 +93,11 @@ namespace skyline::gpu::interconnect {
|
||||
*/
|
||||
void AddOutsideRpCommand(std::function<void(vk::raii::CommandBuffer &, const std::shared_ptr<FenceCycle> &, GPU &)> &&function);
|
||||
|
||||
/**
|
||||
* @brief Adds a persistent callback that will be called at the start of Execute in order to flush data required for recording
|
||||
*/
|
||||
void AddFlushCallback(std::function<void()> &&callback);
|
||||
|
||||
/**
|
||||
* @brief Execute all the nodes and submit the resulting command buffer to the GPU
|
||||
*/
|
||||
|
Reference in New Issue
Block a user