Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for running on mesa #42

Closed
wants to merge 1 commit into from

Conversation

kkartaltepe
Copy link

Fixes from #41 for correctness issues.

You can also see the other changes required to run on mesa in https://github.com/kkartaltepe/vk_video_samples/tree/minimal-runnable that cover the other issues mentioned. But note minimal branch does not render correctly, as the dpb workaround is not correct.

Signed-off-by: Kurt Kartaltepe <[email protected]>
@zlatinski
Copy link
Contributor

Thank you, Kurt - we'll look at your proposed change very soon.

@@ -304,9 +304,9 @@ void Shell::AcquireBackBuffer(bool trainFrame) {
// acquire just once when not presenting
if (m_settings.noPresent && GetCurrentBackBuffer().GetAcquireSemaphore() != VK_NULL_HANDLE) return;

AcquireBuffer* acquireBuf = m_ctx.acquireBuffers.front();
assert(!m_ctx.acquireBuffers.empty());
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand why do we need this change?

The rest of the changes make sense and I'll push alternative changes for those.

Copy link
Author

@kkartaltepe kkartaltepe May 20, 2023

Choose a reason for hiding this comment

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

assert(acquireBuf != nullptr); depends on front() returning a nullptr when empty, but this is undefined behavior and in practice it does not return a nullptr with libstdc++.

This replaces that assert with an assert that acquireBuffers is !empty()

The diff maybe looks a bit odd since the assert is moved before the front() call.

@zlatinski
Copy link
Contributor

I have already applied these changes in a different form.

@zlatinski zlatinski closed this May 23, 2023
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