Skip to content

Conversation

@xinitrcn1
Copy link

Works flawlessly except that FBSD has some issues with older NVIDIA cards because NVIDIA drivers suck.

But lavapipe and all the fun family of vulkan stuff is working as expected :)

image image

@xinitrcn1 xinitrcn1 changed the title FreeBSD port fixes for QRenderDoc FreeBSD port fixes for RenderDoc Nov 22, 2025
Copy link
Owner

@baldurk baldurk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please look through the contributing documentation in particular how to prepare a branch and commits to comply with the clang-formatting and history expectations for a PR.

~Semaphore();

private:
#if !defined(__APPLE__) && !defined(_WIN32) && !defined(__linux__)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not add new declarations and preprocessor conditionals like this into os_specific.h

#if !defined(__APPLE__) && !defined(_WIN32) && !defined(__linux__)
std::mutex m_semaphore_mutex{};
std::condition_variable m_condition_variable{};
uint32_t m_count{};
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use normal initialisers like uint32_t m_count = 0; instead of this kind of syntax.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for non trivial initializers should i = {};

return 1;
}

return static_cast<uint32_t>(core_count);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use normal casts not C++ casts.

}

Threading::Semaphore::Semaphore() = default;
Threading::Semaphore::~Semaphore() = default;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not use this syntax, if declaring a default constructor do so in the class declaration.

return;
}

std::unique_lock<std::mutex> lock(m_semaphore_mutex);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not add new STL usage. The point of this class is to implement the semaphore primitive using OS details such as pthreads, not add an STL dependency.

Copy link
Author

@xinitrcn1 xinitrcn1 Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pthreads is an extra dependency on FBSD, whereas STL comes by default.
FBSD also doesn't have "proper" semaphores with pthreads (14x had an issue with high contention and whatnot).
I'll use pthreads anyways through.

@xinitrcn1
Copy link
Author

This should do now, no STL, just sem_* (available since fbsd 5 so it's fine), only difference is pthread_setname_np

Copy link
Owner

@baldurk baldurk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks fine now but the branch is still not ready for merging, please ensure it complies with the guidelines in CONTRIBUTING.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants