Comments (10)
Sounds ok. Not sure about the auto-detection. It's not hard to export WLC_BUFFER_API=EGL in env. But if you think it is worth it, go for it.
from wlc.
👍 for auto-detection or we're gonna get a truckload of annoying support requests
from wlc.
@Cloudef Great. In that case I'll try to prepare a PR tomorrow if I'll have time.
@SirCmpwn If you're okay with it I'll mostly just copy-paste and adapt your detect_proprietary function. But isn't there a C
function somewhere in the standard library which does what read_line does so I don't have to copy that too? (I'm asking because I don't know C
and that function seems generic enough that it might be in the standard library).
from wlc.
No, there's not.
from wlc.
If you are going to do auto-detection you should do it the right way.
Checking the module does not help at all on systems were multiple cards are present and may break systems, that currently work just fine, where the card actually used by wlc is supporting the GBM
buffers.
I do not know, whats the best way to get the loaded module of a device in code (probably via udev), but you can find it out quite easily with some shell commands, so I should not be too difficult.
Assuming the device used is /dev/dri/card0
(which is default, if I am not mistaken, unless WLC_DRM_DEVICE
is set):
$ udevadm info --query=all -n /dev/dri/card0 | grep DEVPATH
E: DEVPATH=/devices/pci0000:00/0000:00:02.0/drm/card0
$ readlink /sys/devices/pci0000:00/0000:00:02.0/drm/card0/device/driver
../../../bus/pci/drivers/i915
The crud detect_proprietary
function was fine for a warning because it was not affecting functionality, but please don't break this for some existing users. Not everybody just has a single graphics card.
EDIT: I know I can always just set WLC_BUFFER_API
, but seeing @SirCmpwn is already concerned about support requests, so...
from wlc.
Should dig into udev and see how it does that, rather than depend on udev specifics.
from wlc.
Right, that was just a quick example.
from wlc.
I took a stab at it in #248 using the drmGetVersion
function which seems to return the driver used by the DRM device.
@Drakulix @SirCmpwn Should that be robust enough? Do you know of any scenarios for which that doesn't work reliably?
from wlc.
If there is any, this only should be relevant for devices using nvidia-drm
, so at least my original point cannot be relevant anymore and I cannot think of any more scenarios.
Thanks for figuring out how to do this! Highly appreciated.
from wlc.
Fixed in a7a3db8
from wlc.
Related Issues (20)
- build fails except `wayland-protocols` is installed system-wide
- Screen tearing
- Allow keys to be remapped based on press duration
- If callback to view_set_geometry is not specified, view is doing what it wants
- X backend is broken as of EGLStreams support HOT 3
- Querying `wlc_pointer_get_position` returns 0, 0
- Weird behavior when switching to/from VT when using scaled output HOT 2
- Build has too many warnings HOT 2
- glfw window not showing when not creating OpenGL context
- When switching vts, wlc_output_created_cb is called without corresponding wlc_output_destroyed_cb
- wlc is going to be abandoned? HOT 10
- Touch event reports view by mouse position HOT 5
- XWayland application scaling HOT 1
- 10bit depth colors are not properly rendered
- Make SDL work on wlc (wl_registry@2: error 0: invalid version for global wl_data_device_manager (4): have 2, wanted 3) HOT 10
- [FreeBSD] Lose all input when tty switch back to sway HOT 7
- Problem with new views
- Support for color space HOT 2
- wlc deprecation process HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wlc.