mirror of
https://github.com/PancakeTAS/lsfg-vk.git
synced 2025-10-30 07:01:10 +00:00
const correctness
This commit is contained in:
parent
20fcab9a88
commit
93ecfbd79e
4 changed files with 4 additions and 4 deletions
|
|
@ -43,7 +43,7 @@ namespace Vulkan::Core {
|
||||||
/// @throws std::logic_error if the fence is not valid.
|
/// @throws std::logic_error if the fence is not valid.
|
||||||
/// @throws ls::vulkan_error if waiting fails.
|
/// @throws ls::vulkan_error if waiting fails.
|
||||||
///
|
///
|
||||||
bool wait(uint64_t timeout = UINT64_MAX);
|
[[nodiscard]] bool wait(uint64_t timeout = UINT64_MAX) const;
|
||||||
|
|
||||||
/// Get the Vulkan handle.
|
/// Get the Vulkan handle.
|
||||||
[[nodiscard]] auto handle() const { return *this->fence; }
|
[[nodiscard]] auto handle() const { return *this->fence; }
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ namespace Vulkan::Core {
|
||||||
/// @throws std::logic_error if the semaphore is not a timeline semaphore.
|
/// @throws std::logic_error if the semaphore is not a timeline semaphore.
|
||||||
/// @throws ls::vulkan_error if waiting fails.
|
/// @throws ls::vulkan_error if waiting fails.
|
||||||
///
|
///
|
||||||
bool wait(uint64_t value, uint64_t timeout = UINT64_MAX);
|
[[nodiscard]] bool wait(uint64_t value, uint64_t timeout = UINT64_MAX) const;
|
||||||
|
|
||||||
/// Get the Vulkan handle.
|
/// Get the Vulkan handle.
|
||||||
[[nodiscard]] auto handle() const { return *this->semaphore; }
|
[[nodiscard]] auto handle() const { return *this->semaphore; }
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ void Fence::reset() const {
|
||||||
throw ls::vulkan_error(res, "Unable to reset fence");
|
throw ls::vulkan_error(res, "Unable to reset fence");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Fence::wait(uint64_t timeout) {
|
bool Fence::wait(uint64_t timeout) const {
|
||||||
if (!this->isValid())
|
if (!this->isValid())
|
||||||
throw std::logic_error("Invalid fence");
|
throw std::logic_error("Invalid fence");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ void Semaphore::signal(uint64_t value) const {
|
||||||
throw ls::vulkan_error(res, "Unable to signal semaphore");
|
throw ls::vulkan_error(res, "Unable to signal semaphore");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Semaphore::wait(uint64_t value, uint64_t timeout) {
|
bool Semaphore::wait(uint64_t value, uint64_t timeout) const {
|
||||||
if (!this->isValid() || !this->isTimeline)
|
if (!this->isValid() || !this->isTimeline)
|
||||||
throw std::logic_error("Invalid timeline semaphore");
|
throw std::logic_error("Invalid timeline semaphore");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue