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

Cap texture multisampling SampleCount #1670

Merged
merged 5 commits into from
May 19, 2024

Conversation

FireNX70
Copy link
Contributor

@FireNX70 FireNX70 commented May 11, 2024

Problem description

https://gitlab.freedesktop.org/mesa/mesa/-/issues/11135
It turns out LLVMpipe only supports 4x multisampling. Checking GL_MAX_SAMPLES seems like the right thing to do.

Implementation description

Right now, I only check GL_MAX_SAMPLES. Depending on the format, we might need to check GL_MAX_INTEGER_SAMPLES. I don't know how likely it is that you might want to use a different format in the future, glGetInternalformativ might be a safer option to retrieve the max number of samples we can use.

Ended up implementing it with glGetInternalformativ.

Additional things

I guess I could merge the ifs at lines 95, 99 and 103 in imgui_imhex_extensions.cpp while we're at it.

@FireNX70
Copy link
Contributor Author

Also, I guess it might be cleaner if I part out the GL_MAX_SAMPLES stuff into its own function and we just call that to initialize SampleCount.

@FireNX70 FireNX70 marked this pull request as ready for review May 11, 2024 21:58
@FireNX70 FireNX70 changed the title WIP: Cap texture multisampling SampleCount Cap texture multisampling SampleCount May 11, 2024
@WerWolv
Copy link
Owner

WerWolv commented May 19, 2024

Didn't think of that, thanks a lot!

@WerWolv WerWolv merged commit 9b9b1aa into WerWolv:master May 19, 2024
13 of 15 checks passed
@FireNX70 FireNX70 deleted the test-max-samples branch May 22, 2024 10:46
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.

None yet

2 participants