Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRun the es3 code path on travis / CI. #741
Closed
Comments
|
It looks OSMesa doesn't support ES so this might be a bit more tricky. However, it may not be that hard to add support for this to OSMesa. |
|
This might be sufficient to make it work: diff --git a/include/GL/osmesa.h b/include/GL/osmesa.h
index 39cd54e..2acfe57 100644
--- a/include/GL/osmesa.h
+++ b/include/GL/osmesa.h
@@ -101,16 +101,17 @@ extern "C" {
#define OSMESA_DEPTH_BITS 0x30
#define OSMESA_STENCIL_BITS 0x31
#define OSMESA_ACCUM_BITS 0x32
#define OSMESA_PROFILE 0x33
#define OSMESA_CORE_PROFILE 0x34
#define OSMESA_COMPAT_PROFILE 0x35
#define OSMESA_CONTEXT_MAJOR_VERSION 0x36
#define OSMESA_CONTEXT_MINOR_VERSION 0x37
+#define OSMESA_ES2_PROFILE 0x38
typedef struct osmesa_context *OSMesaContext;
/*
* Create an Off-Screen Mesa rendering context. The only attribute needed is
* an RGBA vs Color-Index mode flag.
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index 356ba71..4487bda 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -713,16 +713,18 @@ OSMesaCreateContextAttribs(const int *attribList, OSMesaContext sharelist)
return NULL;
break;
case OSMESA_PROFILE:
profile = attribList[i+1];
if (profile == OSMESA_COMPAT_PROFILE)
api_profile = API_OPENGL_COMPAT;
else if (profile == OSMESA_CORE_PROFILE)
api_profile = API_OPENGL_CORE;
+ else if (profile == OSMESA_ES2_PROFILE)
+ api_profile = API_OPENGLES2;
else
return NULL;
break;
case OSMESA_CONTEXT_MAJOR_VERSION:
version_major = attribList[i+1];
if (version_major < 1)
return NULL;
break; |
|
Here's a patch that actually works: diff --git a/include/GL/osmesa.h b/include/GL/osmesa.h
index 39cd54e..2acfe57 100644
--- a/include/GL/osmesa.h
+++ b/include/GL/osmesa.h
@@ -106,6 +106,7 @@ extern "C" {
#define OSMESA_COMPAT_PROFILE 0x35
#define OSMESA_CONTEXT_MAJOR_VERSION 0x36
#define OSMESA_CONTEXT_MINOR_VERSION 0x37
+#define OSMESA_ES2_PROFILE 0x38
typedef struct osmesa_context *OSMesaContext;
diff --git a/src/gallium/state_trackers/osmesa/osmesa.c b/src/gallium/state_trackers/osmesa/osmesa.c
index 18f1b88..7422de8 100644
--- a/src/gallium/state_trackers/osmesa/osmesa.c
+++ b/src/gallium/state_trackers/osmesa/osmesa.c
@@ -621,7 +621,8 @@ OSMesaCreateContextAttribs(const int *attribList, OSMesaContext sharelist)
case OSMESA_PROFILE:
profile = attribList[i+1];
if (profile != OSMESA_CORE_PROFILE &&
- profile != OSMESA_COMPAT_PROFILE)
+ profile != OSMESA_COMPAT_PROFILE &&
+ profile != OSMESA_ES2_PROFILE)
return NULL;
break;
case OSMESA_CONTEXT_MAJOR_VERSION:
@@ -668,8 +669,13 @@ OSMesaCreateContextAttribs(const int *attribList, OSMesaContext sharelist)
* Create the rendering context
*/
memset(&attribs, 0, sizeof(attribs));
- attribs.profile = (profile == OSMESA_CORE_PROFILE)
- ? ST_PROFILE_OPENGL_CORE : ST_PROFILE_DEFAULT;
+ if (profile == OSMESA_CORE_PROFILE) {
+ attribs.profile = ST_PROFILE_OPENGL_CORE;
+ } else if (profile == OSMESA_ES2_PROFILE) {
+ attribs.profile = ST_PROFILE_OPENGL_ES2;
+ } else {
+ attribs.profile = ST_PROFILE_DEFAULT;
+ }
attribs.major = version_major;
attribs.minor = version_minor;
attribs.flags = 0; /* ST_CONTEXT_FLAG_x */
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index 356ba71..4487bda 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -718,6 +718,8 @@ OSMesaCreateContextAttribs(const int *attribList, OSMesaContext sharelist)
api_profile = API_OPENGL_COMPAT;
else if (profile == OSMESA_CORE_PROFILE)
api_profile = API_OPENGL_CORE;
+ else if (profile == OSMESA_ES2_PROFILE)
+ api_profile = API_OPENGLES2;
else
return NULL;
break;
|
|
We now run the Windows reftests on CI, via ANGLE, which exercises the ES3 code path. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.