* [Bug 103575] eglQueryDevicesEXT returns 0 devices
@ 2017-11-05 1:48 bugzilla-daemon
2017-11-29 20:34 ` bugzilla-daemon
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: bugzilla-daemon @ 2017-11-05 1:48 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 2303 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=103575
Bug ID: 103575
Summary: eglQueryDevicesEXT returns 0 devices
Product: Mesa
Version: 17.2
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/r600
Assignee: dri-devel@lists.freedesktop.org
Reporter: Hi-Angel@yandex.ru
QA Contact: dri-devel@lists.freedesktop.org
I'm following this guide
https://devblogs.nvidia.com/parallelforall/egl-eye-opengl-visualization-without-x-server/
to choose a GPU through native means of EGL.
Using eglQueryDevicesEXT() in both modes, i.e. with "devices" array to get
descriptions, as well as by passing 0 as "devices", results in 0 as a number of
supported devices. Specification says that I should've get at least 1 (and I
actually have two, r600g-managed, cards):
https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_device_enumeration.txt
> EGL devices can be enumerated before EGL is initialized. Use:
>
> EGLBoolean eglQueryDevicesEXT(EGLint max_devices,
> EGLDeviceEXT *devices,
> EGLint *num_devices);
[SNIP]
> If <devices> is NULL, then <max_devices> will be ignored, no devices will be
> returned in <devices>, and <num_devices> will be set to the number of
> supported devices in the system. All implementations must support at least
> one device.
>
> On failure, EGL_FALSE is returned.
Below is the modified code I'm using:
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
EGLint numDevices;
PFNEGLQUERYDEVICESEXTPROC eglQueryDevicesEXT =
(PFNEGLQUERYDEVICESEXTPROC)
eglGetProcAddress("eglQueryDevicesEXT");
if (eglQueryDevicesEXT(2, 0, &numDevices) == EGL_FALSE) {
puts("error in eglQueryDevicesEXT");
return 1;
}
printf("Detected %d devices\n", numDevices);
}
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 4050 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 103575] eglQueryDevicesEXT returns 0 devices
2017-11-05 1:48 [Bug 103575] eglQueryDevicesEXT returns 0 devices bugzilla-daemon
@ 2017-11-29 20:34 ` bugzilla-daemon
2017-11-29 20:40 ` bugzilla-daemon
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2017-11-29 20:34 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 573 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=103575
Adam Jackson <ajax@nwnk.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |NOTABUG
Status|NEW |RESOLVED
--- Comment #1 from Adam Jackson <ajax@nwnk.net> ---
Mesa doesn't implement EGL_EXT_device_enumeration yet, so this isn't entirely
surprising.
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 2028 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 103575] eglQueryDevicesEXT returns 0 devices
2017-11-05 1:48 [Bug 103575] eglQueryDevicesEXT returns 0 devices bugzilla-daemon
2017-11-29 20:34 ` bugzilla-daemon
@ 2017-11-29 20:40 ` bugzilla-daemon
2017-11-30 15:04 ` bugzilla-daemon
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2017-11-29 20:40 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 394 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=103575
--- Comment #2 from Hi-Angel <Hi-Angel@yandex.ru> ---
(In reply to Adam Jackson from comment #1)
> Mesa doesn't implement EGL_EXT_device_enumeration yet, so this isn't
> entirely surprising.
Then, shouldn't I be getting either linking or calling errors?
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1276 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 103575] eglQueryDevicesEXT returns 0 devices
2017-11-05 1:48 [Bug 103575] eglQueryDevicesEXT returns 0 devices bugzilla-daemon
2017-11-29 20:34 ` bugzilla-daemon
2017-11-29 20:40 ` bugzilla-daemon
@ 2017-11-30 15:04 ` bugzilla-daemon
2017-11-30 15:30 ` bugzilla-daemon
2017-11-30 16:16 ` bugzilla-daemon
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2017-11-30 15:04 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 1059 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=103575
--- Comment #3 from Adam Jackson <ajax@nwnk.net> ---
(In reply to Hi-Angel from comment #2)
> (In reply to Adam Jackson from comment #1)
> > Mesa doesn't implement EGL_EXT_device_enumeration yet, so this isn't
> > entirely surprising.
>
> Then, shouldn't I be getting either linking or calling errors?
If your libEGL is from libglvnd then no. glvnd has explicit support for
QueryDevicesEXT because it has to aggregate the results from all installed
vendor libraries. Which means eglGetProcAddress will return the glvnd frontend
function, even if no vendors support the extension.
That's arguably a bug in glvnd. It should at minimum return an error if it
enumerates zero devices, I think. But I think your code is already in error in
calling eglQueryDevicesEXT without checking that EGL_EXT_device_enumeration is
in the client extension string (it certainly isn't on my machine, which does
use libglvnd).
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1995 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 103575] eglQueryDevicesEXT returns 0 devices
2017-11-05 1:48 [Bug 103575] eglQueryDevicesEXT returns 0 devices bugzilla-daemon
` (2 preceding siblings ...)
2017-11-30 15:04 ` bugzilla-daemon
@ 2017-11-30 15:30 ` bugzilla-daemon
2017-11-30 16:16 ` bugzilla-daemon
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2017-11-30 15:30 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 886 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=103575
--- Comment #4 from Emil Velikov <emil.l.velikov@gmail.com> ---
(In reply to Hi-Angel from comment #2)
> (In reply to Adam Jackson from comment #1)
> > Mesa doesn't implement EGL_EXT_device_enumeration yet, so this isn't
> > entirely surprising.
>
> Then, shouldn't I be getting either linking or calling errors?
Linking - yes things should fail fail at linking. The spec clearly says that
one should use eglGetProcAddress to get the function pointers.
Runtime - nope. The extension defines the means, a device is not guaranteed.
Also ... I really hope that Nvidia fixes that blog - it contains a number of
fairly fundamental issues.
I reached out to the author ~1year ago listing all the bad stuff but never
heard back :-\ Oh well
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 103575] eglQueryDevicesEXT returns 0 devices
2017-11-05 1:48 [Bug 103575] eglQueryDevicesEXT returns 0 devices bugzilla-daemon
` (3 preceding siblings ...)
2017-11-30 15:30 ` bugzilla-daemon
@ 2017-11-30 16:16 ` bugzilla-daemon
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2017-11-30 16:16 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 657 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=103575
--- Comment #5 from Hi-Angel <Hi-Angel@yandex.ru> ---
(In reply to Emil Velikov from comment #4)
> Also ... I really hope that Nvidia fixes that blog - it contains a number of
> fairly fundamental issues.
> I reached out to the author ~1year ago listing all the bad stuff but never
> heard back :-\ Oh well
You may copy-paste the content of that mail into blog comments, I think readers
would appreciate. Comments were the first thing I started reading after looking
through the post to see any possible caveats.
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1545 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-11-30 16:16 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-05 1:48 [Bug 103575] eglQueryDevicesEXT returns 0 devices bugzilla-daemon
2017-11-29 20:34 ` bugzilla-daemon
2017-11-29 20:40 ` bugzilla-daemon
2017-11-30 15:04 ` bugzilla-daemon
2017-11-30 15:30 ` bugzilla-daemon
2017-11-30 16:16 ` bugzilla-daemon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.