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

opengl: infer fbo format name in gl_fb_query #267

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ruihe774
Copy link
Contributor

This PR add format name inference in gl_fb_query() so that end users can easily distinguish formats for e.g. swapchain frames. The format names are consistent with GLSL layout qualifiers.

src/opengl/gpu_tex.c Outdated Show resolved Hide resolved
@haasn
Copy link
Owner

haasn commented May 27, 2024

I'm not sure I understand the use case of this - why do you want access to the GLSL layout qualifier in particular?

Note that pl_fmt_glsl_format exists. Maybe it's better to just call that function instead, and set it to pl_fmt.glsl_format.

src/opengl/gpu_tex.c Outdated Show resolved Hide resolved
src/opengl/gpu_tex.c Outdated Show resolved Hide resolved
@ruihe774 ruihe774 requested a review from haasn May 27, 2024 13:49
@ruihe774
Copy link
Contributor Author

ruihe774 commented May 27, 2024

Note that pl_fmt_glsl_format exists. Maybe it's better to just call that function instead, and set it to pl_fmt.glsl_format.

Reworked. Some formats are not allowed in GLSL, so I add another field.

@kasper93
Copy link
Contributor

The core issue is already fixed by https://code.videolan.org/videolan/libplacebo/-/merge_requests/656 two months ago.

@ruihe774
Copy link
Contributor Author

The core issue is already fixed by https://code.videolan.org/videolan/libplacebo/-/merge_requests/656 two months ago.

I didn't find that earlier. Sorry.

I've just had a quick look at your implementation and am wondering how it handle formats like rgb10_a2. I suppose it will name it as rgba8 incorrectly. I think the only correct and sound way to implement this is to lookup the names in a list, as what I do in this PR.

@NBruderman
Copy link

The core issue is already fixed by https://code.videolan.org/videolan/libplacebo/-/merge_requests/656 two months ago.

I see that in the end, this one wasn't merged

@ruihe774
Copy link
Contributor Author

ruihe774 commented Jul 9, 2024

Any updates?

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.

4 participants