-
-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add support for TEGRA #449
Comments
tegra doesn't have full opengl driver support? |
there must be code already in there to force 16bits depth, I'm pretty sure of this. Look around in the glx folder |
thanks, manages to get it to go a bit further overriding the depth to 16, then it was crashing on the testGLSL function in glx/hardext.c to test the verion so i bypassed that as the tegra is on version 100. it's now finishing the load of the libGL and now i'm hitting this warning Line 340 in e39434a
executing glxheads
|
this is the diff so far to get to that point. mayeb i've made some changes that don't make sense index 0398a1b..dcdbd3a 100644
--- a/src/gl/init.c
+++ b/src/gl/init.c
@@ -473,7 +473,7 @@ void initialize_gl4es() {
SHUT_LOGD("Avoid 24bits textures\n");
break;
default:
- globals4es.avoid24bits = 0;
+ globals4es.avoid24bits = 2;
break;
}
}
@@ -754,3 +754,4 @@ void (*const gl4es_ctors[])() = { initialize_gl4es, dll_init_done };
void (*const gl4es_dtor)() = close_gl4es;
#pragma const_seg()
#endif
+
diff --git a/src/glx/glx.c b/src/glx/glx.c
index 06dce28..7b25f79 100644
--- a/src/glx/glx.c
+++ b/src/glx/glx.c
@@ -61,7 +61,7 @@ static EGLContext eglContext = EGL_NO_CONTEXT;
static int maxEGLConfig = 0;
static GLXFBConfig allFBConfig = NULL;
#endif
-static int glx_default_depth=0;
+static int glx_default_depth=16;
#ifdef PANDORA
static struct sockaddr_un sun;
static int sock = -2;
@@ -338,11 +338,11 @@ static int get_config_default(Display *display, int attribute, int *value) {
XVisualInfo *visuals = XGetVisualInfo(display, VisualDepthMask|VisualClassMask, &xvinfo, &n);
if (!n) {
LOGD("Warning, get_config_default: XGetVisualInfo gives 0 VisualInfo for %d depth and TrueColor class\n", glx_default_depth);
- *value = 0;
- } else {
+ // *value = 0;
+ } //else {
*value = visuals[0].visualid;
XFree(visuals);
- }
+ //}
}
break;
case GLX_FBCONFIG_ID:
@@ -416,7 +416,7 @@ static void fill1GLXFBConfig(Display *display, EGLConfig eglConfig, int DB, GLXF
egl_eglGetConfigAttrib(eglDisplay, eglConfig, EGL_NATIVE_VISUAL_ID, &fbConfig->associatedVisualId);
if(!fbConfig->associatedVisualId || globals4es.usefb || globals4es.usefbo || globals4es.usepbuffer) {
// when using some FB driver, lets take a default VisualID, as the one from the EGLConfig is probably not the correct one
- glx_default_depth = XDefaultDepth(display, 0);
+ glx_default_depth = 16;//XDefaultDepth(display, 0);
XVisualInfo xvinfo = {0};
xvinfo.depth = glx_default_depth;
xvinfo.class = TrueColor;
@@ -1135,7 +1135,7 @@ XVisualInfo *gl4es_glXChooseVisual(Display *display,
if(!ask_rgba)
return NULL; // only TrueColor profile...
}
- glx_default_depth = XDefaultDepth(display, screen);
+ glx_default_depth = 16;//XDefaultDepth(display, screen);
if (glx_default_depth != 16 && glx_default_depth != 24 && glx_default_depth != 32)
LOGD("unusual desktop color depth %d\n", glx_default_depth);
@@ -1147,7 +1147,7 @@ XVisualInfo *gl4es_glXChooseVisual(Display *display,
#endif
XVisualInfo xvinfo = {0};
- xvinfo.depth = glx_default_depth;
+ xvinfo.depth = 16;//glx_default_depth;
xvinfo.class = TrueColor;
int n;
XVisualInfo *visuals = XGetVisualInfo(display, VisualDepthMask|VisualClassMask, &xvinfo, &n);
@@ -2051,7 +2051,7 @@ XVisualInfo *gl4es_glXGetVisualFromFBConfig(Display *display, GLXFBConfig config
g_display = XOpenDisplay(NULL);
}*/
if (glx_default_depth==0)
- glx_default_depth = XDefaultDepth(display, 0);
+ glx_default_depth = 16; //XDefaultDepth(display, 0);
int depth = glx_default_depth;
/*if(config) { // seems to upset Colin McRea Rally (Unity game)
diff --git a/src/glx/hardext.c b/src/glx/hardext.c
index 46e35bb..7ddd04b 100644
--- a/src/glx/hardext.c
+++ b/src/glx/hardext.c
@@ -424,14 +424,14 @@ void GetHardwareExtensions(int notest)
hardext.vendor = VEND_ARM;
else if(strstr(vendor, "Imagination Technologies"))
hardext.vendor = VEND_IMGTEC;
- if(hardext.esversion>1) {
- if(testGLSL("#version 120", 1))
+// if(hardext.esversion>1) {
+ // if(testGLSL("#version 100", 1))
hardext.glsl120 = 1;
- if(testGLSL("#version 300 es", 0))
- hardext.glsl300es = 1;
- if(testGLSL("#version 310 es", 1))
- hardext.glsl310es = 1;
- }
+ // if(testGLSL("#version 300 es", 0))
+ // hardext.glsl300es = 1;
+ // if(testGLSL("#version 310 es", 1))
+ // hardext.glsl310es = 1;
+ // }
if(hardext.glsl120) {
SHUT_LOGD("GLSL 120 supported and used\n");
} |
trying to port this to tegra30/114 hardware. as far as i can tell the only difference is that tegra doesn't support 24 bit depth and 16 would need to be used instead. any idea how the code could be modified to suit?
The text was updated successfully, but these errors were encountered: