From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 103575] eglQueryDevicesEXT returns 0 devices
Date: Sun, 05 Nov 2017 01:48:32 +0000 [thread overview]
Message-ID: <bug-103575-502@http.bugs.freedesktop.org/> (raw)
[-- 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
next reply other threads:[~2017-11-05 1:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-05 1:48 bugzilla-daemon [this message]
2017-11-29 20:34 ` [Bug 103575] eglQueryDevicesEXT returns 0 devices 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-103575-502@http.bugs.freedesktop.org/ \
--to=bugzilla-daemon@freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox