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

core: drop xcb-glx #1085

Closed

Conversation

absolutelynothelix
Copy link
Collaborator

@absolutelynothelix absolutelynothelix commented Jun 27, 2023

it's only used for querying the x glx extension and it's error definitions. other than this, it has little to no use for us. see https://stackoverflow.com/q/41069032 for details.

@absolutelynothelix absolutelynothelix force-pushed the begone-xcb-glx branch 3 times, most recently from d4f4f26 to 00f3cd7 Compare June 28, 2023 12:22
@codecov
Copy link

codecov bot commented Jun 28, 2023

Codecov Report

Merging #1085 (b26d147) into next (d08b609) will decrease coverage by 0.20%.
The diff coverage is 11.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #1085      +/-   ##
==========================================
- Coverage   37.68%   37.48%   -0.20%     
==========================================
  Files          49       49              
  Lines       11167    11163       -4     
==========================================
- Hits         4208     4185      -23     
- Misses       6959     6978      +19     
Impacted Files Coverage Δ
src/opengl.c 0.00% <0.00%> (ø)
src/picom.c 61.38% <ø> (-0.72%) ⬇️
src/x.c 44.55% <0.00%> (-0.50%) ⬇️
src/backend/gl/glx.c 38.94% <100.00%> (+0.20%) ⬆️

... and 1 file with indirect coverage changes

it's only used for querying the x glx extension and it's error
definitions. other than this, it has little to no use for us. see
https://stackoverflow.com/q/41069032 for details.
@absolutelynothelix absolutelynothelix marked this pull request as ready for review June 28, 2023 13:18
@yshui
Copy link
Owner

yshui commented Jul 1, 2023

i don't like that part of the X error handling depends on the backend. i also don't like you are using the backend to initialize part of session_t.

but i do like the removal of dependencies. do we really need to handle glx errors in x.c? are we not already doing it in the glx backend?

@absolutelynothelix
Copy link
Collaborator Author

i also don't like you are using the backend to initialize part of session_t.

initially i wanted to replace the old xcb-style x glx extension querying in the session_init function with

#ifdef CONFIG_OPENGL
	ps->glx_exists = glXQueryExtension(ps->dpy, &ps->glx_error, &ps->glx_event);
#endif

but ended up reverting to what we previously had (2372127). does my initial approach sound better?

i don't like that part of the X error handling depends on the backend.

there is no "dependency". glx is an x extension just like the sync one which errors are handled below so i think it's fair to handle it's errors there.

do we really need to handle glx errors in x.c? are we not already doing it in the glx backend?

i think that you're confusing glx errors with gl errors. gl errors are indeed handled in the gl_common.c. for glx errors, see my answer above. afaiu, unfortunately, there is no way to explicitly handle glx errors (e.g. in the xcb checked functions style).

@yshui
Copy link
Owner

yshui commented Jul 2, 2023

i think that you're confusing glx errors with gl errors.

you are right. in that case i don't really see the point of removing xcb-glx.

@absolutelynothelix
Copy link
Collaborator Author

i don't really see the point of removing xcb-glx

the point is that we're requiring it only to do things that could be done without it and it's very unlikely that we can make any other use of it.

@yshui
Copy link
Owner

yshui commented Jul 2, 2023

we have it so we can have a healthy separation between the backend and the rest of picom. i don't like the increase in coupling caused by removing it. it's not that big of a dependency anyway.

@absolutelynothelix
Copy link
Collaborator Author

absolutelynothelix commented Jul 2, 2023

well, if my initial approach shown above doesn’t improve the situation feel free to close this pull request.

@yshui yshui closed this Jul 3, 2023
@absolutelynothelix absolutelynothelix deleted the begone-xcb-glx branch July 3, 2023 14:53
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