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

Add graphics+present queue type #97

Open
AnonN10 opened this issue Nov 17, 2021 · 1 comment
Open

Add graphics+present queue type #97

AnonN10 opened this issue Nov 17, 2021 · 1 comment

Comments

@AnonN10
Copy link

AnonN10 commented Nov 17, 2021

Since it is not guaranteed by the standard for a graphics queue to support presentation and vkb::QueueType::graphics is used in tutorials for combined purposes of both rendering and presentation, for convenience reasons I'm suggesting to add a vkb::QueueType::graphics_and_present type that would perform an additional check under the hood and ensure its support.

@AnonN10 AnonN10 changed the title Support graphics+present queue type Add graphics+present queue type Nov 17, 2021
@spnda
Copy link
Contributor

spnda commented Nov 24, 2021

I have a feeling it is pretty weird if every combination had it's own enum, apart from complicated naming and possible confusion.
I'd say defining operators on vkb::QueueType to OR the values together should be the better solution here. It would be much nicer from a readability perspective and would require the same under the hood changes anyway. If you agree, I'd be happy to open a PR.

enum class QueueType : uin32_t {}; // You know what goes here.

inline vkb::QueueType operator|(vkb::QueueType a, vkb::QueueType b) {
        return static_cast<vkb::QueueType>(
                static_cast<uint32_t>(a) | static_cast<uint32_t>(b));
}

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

No branches or pull requests

2 participants