<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" id="owaParaStyle" style="display: none;">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body dir="ltr" fpstyle="1" aria-label="Message body" tabindex="0">
<div name="divtagdefaultwrapper" id="divtagdefaultwrapper" style="font-family: Calibri,Arial,Helvetica,sans-serif; font-size: 12pt; color: #000000; margin: 0">
> It looks like you're missing minor_ver checking here? For instance, 2.99 isn't a valid GLES version.
<div><br>
</div>
<div>I think these things are already validated on GLX/eGL, but I confess I'm not 100% sure.</div>
<div><br>
</div>
<div>Jose</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div style="color: rgb(40, 40, 40);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Daniel Stone <daniel@fooishbar.org><br>
<b>Sent:</b> 12 November 2014 18:16<br>
<b>To:</b> Jose Fonseca<br>
<b>Cc:</b> mesa-dev@lists.freedesktop.org<br>
<b>Subject:</b> Re: [Mesa-dev] [PATCH 3/3] glx: Allow to create any OpenGL ES version.</font>
<div> </div>
</div>
<div>
<div dir="ltr">Hi,
<div class="gmail_extra"><br>
<div class="gmail_quote">On 12 November 2014 12:37, <span dir="ltr"><<a href="mailto:jfonseca@vmware.com" target="_blank" title="mailto:jfonseca@vmware.com
Ctrl+Click to follow link">jfonseca@vmware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
@@ -544,9 +544,22 @@ dri2_convert_glx_attribs(unsigned num_attribs, const uint32_t *attribs,<br>
case GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB:<br>
*api = __DRI_API_OPENGL;<br>
break;<br>
- case GLX_CONTEXT_ES2_PROFILE_BIT_EXT:<br>
- *api = __DRI_API_GLES2;<br>
- break;<br>
+ case GLX_CONTEXT_ES_PROFILE_BIT_EXT:<br>
+ switch (*major_ver) {<br>
+ case 3:<br>
+ *api = __DRI_API_GLES3;<br>
+ break;<br>
+ case 2:<br>
+ *api = __DRI_API_GLES2;<br>
+ break;<br>
+ case 1:<br>
+ *api = __DRI_API_GLES;<br>
+ break;<br>
+ default:<br>
+ *error = __DRI_CTX_ERROR_BAD_API;<br>
+ return false;<br>
+ }<br>
+ break;<br>
default:<br>
*error = __DRI_CTX_ERROR_BAD_API;<br>
return false;<br>
@@ -577,19 +590,6 @@ dri2_convert_glx_attribs(unsigned num_attribs, const uint32_t *attribs,<br>
return false;<br>
}<br>
<br>
- /* The GLX_EXT_create_context_es2_profile spec says:<br>
- *<br>
- * "... If the version requested is 2.0, and the<br>
- * GLX_CONTEXT_ES2_PROFILE_BIT_EXT bit is set in the<br>
- * GLX_CONTEXT_PROFILE_MASK_ARB attribute (see below), then the context<br>
- * returned will implement OpenGL ES 2.0. This is the only way in which<br>
- * an implementation may request an OpenGL ES 2.0 context."<br>
- */<br>
- if (*api == __DRI_API_GLES2 && (*major_ver != 2 || *minor_ver != 0)) {<br>
</blockquote>
<div><br>
</div>
<div>It looks like you're missing minor_ver checking here? For instance, 2.99 isn't a valid GLES version.</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Daniel </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>