Merge pull request #8 from psyke83/rpi-kms
Raspberry Pi: Fix ES1/PVR & implement VC4 autodetect
This commit is contained in:
commit
636d811581
3 changed files with 13 additions and 10 deletions
2
debian/rules
vendored
2
debian/rules
vendored
|
@ -9,7 +9,7 @@ confflags = --disable-rpath --disable-video-directfb \
|
||||||
--disable-x11-shared --disable-video-opengl --enable-video-opengles \
|
--disable-x11-shared --disable-video-opengl --enable-video-opengles \
|
||||||
--disable-esd --disable-pulseaudio \
|
--disable-esd --disable-pulseaudio \
|
||||||
--disable-input-tslib \
|
--disable-input-tslib \
|
||||||
--enable-video-rpi
|
--enable-video-rpi --enable-video-kmsdrm
|
||||||
|
|
||||||
%:
|
%:
|
||||||
dh $@ --parallel
|
dh $@ --parallel
|
||||||
|
|
|
@ -44,12 +44,12 @@
|
||||||
|
|
||||||
#if SDL_VIDEO_DRIVER_RPI
|
#if SDL_VIDEO_DRIVER_RPI
|
||||||
/* Raspbian places the OpenGL ES/EGL binaries in a non standard path */
|
/* Raspbian places the OpenGL ES/EGL binaries in a non standard path */
|
||||||
#define DEFAULT_EGL "/opt/vc/lib/libbrcmEGL.so"
|
#define DEFAULT_EGL ( vc4 ? "libEGL.so" : "/opt/vc/lib/libbrcmEGL.so" )
|
||||||
#define DEFAULT_OGL_ES2 "/opt/vc/lib/libbrcmGLESv2.so"
|
#define DEFAULT_OGL_ES2 ( vc4 ? "libGLESv2.so.2" : "/opt/vc/lib/libbrcmGLESv2.so" )
|
||||||
#define ALT_EGL "/opt/vc/lib/libEGL.so"
|
#define ALT_EGL ( vc4 ? "libEGL.so" : "/opt/vc/lib/libEGL.so" )
|
||||||
#define ALT_OGL_ES2 "/opt/vc/lib/libGLESv2.so"
|
#define ALT_OGL_ES2 ( vc4 ? "libGLESv2.so.2" : "/opt/vc/lib/libGLESv2.so" )
|
||||||
#define DEFAULT_OGL_ES_PVR "/opt/vc/lib/libGLES_CM.so"
|
#define DEFAULT_OGL_ES_PVR ( vc4 ? "libGLES_CM.so.1" : "/opt/vc/lib/libbrcmGLESv2.so" )
|
||||||
#define DEFAULT_OGL_ES "/opt/vc/lib/libGLESv1_CM.so"
|
#define DEFAULT_OGL_ES ( vc4 ? "libGLESv1_CM.so.1" : "/opt/vc/lib/libbrcmGLESv2.so" )
|
||||||
|
|
||||||
#elif SDL_VIDEO_DRIVER_ANDROID || SDL_VIDEO_DRIVER_VIVANTE
|
#elif SDL_VIDEO_DRIVER_ANDROID || SDL_VIDEO_DRIVER_VIVANTE
|
||||||
/* Android */
|
/* Android */
|
||||||
|
@ -256,6 +256,9 @@ SDL_EGL_LoadLibrary(_THIS, const char *egl_path, NativeDisplayType native_displa
|
||||||
#if SDL_VIDEO_DRIVER_WINDOWS || SDL_VIDEO_DRIVER_WINRT
|
#if SDL_VIDEO_DRIVER_WINDOWS || SDL_VIDEO_DRIVER_WINRT
|
||||||
const char *d3dcompiler;
|
const char *d3dcompiler;
|
||||||
#endif
|
#endif
|
||||||
|
#if SDL_VIDEO_DRIVER_RPI
|
||||||
|
SDL_bool vc4 = (0 == access("/sys/module/vc4/", F_OK));
|
||||||
|
#endif
|
||||||
|
|
||||||
if (_this->egl_data) {
|
if (_this->egl_data) {
|
||||||
return SDL_SetError("OpenGL ES context already created");
|
return SDL_SetError("OpenGL ES context already created");
|
||||||
|
|
|
@ -97,12 +97,12 @@ static VideoBootStrap *bootstrap[] = {
|
||||||
#if SDL_VIDEO_DRIVER_PSP
|
#if SDL_VIDEO_DRIVER_PSP
|
||||||
&PSP_bootstrap,
|
&PSP_bootstrap,
|
||||||
#endif
|
#endif
|
||||||
#if SDL_VIDEO_DRIVER_RPI
|
|
||||||
&RPI_bootstrap,
|
|
||||||
#endif
|
|
||||||
#if SDL_VIDEO_DRIVER_KMSDRM
|
#if SDL_VIDEO_DRIVER_KMSDRM
|
||||||
&KMSDRM_bootstrap,
|
&KMSDRM_bootstrap,
|
||||||
#endif
|
#endif
|
||||||
|
#if SDL_VIDEO_DRIVER_RPI
|
||||||
|
&RPI_bootstrap,
|
||||||
|
#endif
|
||||||
#if SDL_VIDEO_DRIVER_NACL
|
#if SDL_VIDEO_DRIVER_NACL
|
||||||
&NACL_bootstrap,
|
&NACL_bootstrap,
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue