When using cycles in the viewport there it uses render threads and workers to update the viewport. All threads can record commands to the queue and needs to be synchronized. This didn't happen leading to incorrect renders. Detected when researching #128608 Pull Request: https://projects.blender.org/blender/blender/pulls/128975
31 lines
463 B
C++
31 lines
463 B
C++
/* SPDX-FileCopyrightText: 2022 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup gpu
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "gpu_state_private.hh"
|
|
|
|
#include "vk_common.hh"
|
|
|
|
namespace blender::gpu {
|
|
|
|
class VKFence : public Fence {
|
|
private:
|
|
VkFence vk_fence_ = VK_NULL_HANDLE;
|
|
bool signalled_ = false;
|
|
|
|
protected:
|
|
virtual ~VKFence();
|
|
|
|
public:
|
|
void signal() override;
|
|
void wait() override;
|
|
};
|
|
|
|
} // namespace blender::gpu
|