<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - EGL sets error to EGL_SUCCESS when DRI driver fails to create context"
href="https://bugs.freedesktop.org/show_bug.cgi?id=56706">56706</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>EGL sets error to EGL_SUCCESS when DRI driver fails to create context
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Reporter</th>
<td>chad.versace@linux.intel.com
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>git
</td>
</tr>
<tr>
<th>Component</th>
<td>GLX
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr></table>
<p>
<div>
<pre>Observed on mesa-84b4372 with i965.
There is no bugzilla category for EGL, so I'm placing this bug in the GLX
category.
How to reproduce
-----------------
On i965, call eglCreateContext() with
EGL_CONTEXT_MAJOR_VERSION_KHR/EGL_CONTEXT_MINOR_VERSION_KHR set to 3.2. Context
creation will fail because i965 does not yet support GL 3.2. Afterwards,
eglGetError() returns EGL_SUCCESS.
For a standalone testcase that reproduces the problem, run the example program
"gl_basic" found in waffle-7d76755. Run it as `gl_basic x11_egl gl 3.2.
Expected behavior
-----------------
eglGetError() should return EGL_BAD_MATCH. From the EGL_KHR_create_context
spec:
* If an OpenGL context is requested and the values for attributes
EGL_CONTEXT_MAJOR_VERSION_KHR and EGL_CONTEXT_MINOR_VERSION_KHR,
when considered together with the value for attribute
EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR, specify an OpenGL
version and feature set that are not defined, than an
EGL_BAD_MATCH error is generated.
Diagnosis
---------
In eglCreateContext, no error code is set when drv->API.CreateContext fails.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>