gsdx ogl: in case of EGL_BAD_MATCH try to create the context with different option (hope to fix intel mesa)

cmake: add sdl as a dependency requirement of spu2x


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5732 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut 2013-10-05 10:37:48 +00:00
parent 00ea70d4d1
commit 4934e43287
2 changed files with 8 additions and 6 deletions

View File

@ -6,8 +6,8 @@ set(msg_dep_pcsx2 "check these libraries -> wxWidgets (>=2.8.10), gtk2 (>=
set(msg_dep_cdvdiso "check these libraries -> bzip2 (>=1.0.5), gtk2 (>=2.16)")
set(msg_dep_zerogs "check these libraries -> glew (>=1.6), opengl, X11, nvidia-cg-toolkit (>=2.1)")
set(msg_dep_gsdx "check these libraries -> opengl, egl, X11")
set(msg_dep_onepad "check these libraries -> sdl (>=1.2)")
set(msg_dep_spu2x "check these libraries -> soundtouch (>=1.5), alsa, portaudio (>=1.9), pcsx2 common libs")
set(msg_dep_onepad "check these libraries -> sdl (==1.2)")
set(msg_dep_spu2x "check these libraries -> soundtouch (>=1.5), alsa, portaudio (>=1.9), sdl (==1.2) pcsx2 common libs")
set(msg_dep_zerospu2 "check these libraries -> soundtouch (>=1.5), alsa")
if(GLSL_API)
set(msg_dep_zzogl "check these libraries -> glew (>=1.6), jpeg (>=6.2), opengl, X11, pcsx2 common libs")
@ -228,17 +228,18 @@ endif(GTK2_FOUND)
# requires: -SoundTouch
# -ALSA
# -Portaudio
# -SDL
# -common_libs
#---------------------------------------
if(ALSA_FOUND AND PORTAUDIO_FOUND AND SOUNDTOUCH_FOUND AND common_libs)
if(ALSA_FOUND AND PORTAUDIO_FOUND AND SOUNDTOUCH_FOUND AND SDL_FOUND AND common_libs)
set(spu2-x TRUE)
elseif(NOT EXISTS "${PROJECT_SOURCE_DIR}/plugins/spu2-x")
set(spu2-x FALSE)
else(ALSA_FOUND AND PORTAUDIO_FOUND AND SOUNDTOUCH_FOUND AND common_libs)
else()
set(spu2-x FALSE)
message(STATUS "Skip build of spu2-x: miss some dependencies")
message(STATUS "${msg_dep_spu2x}")
endif(ALSA_FOUND AND PORTAUDIO_FOUND AND SOUNDTOUCH_FOUND AND common_libs)
endif()
#---------------------------------------
#---------------------------------------

View File

@ -79,8 +79,9 @@ void GSWndEGL::CreateContext(int major, int minor)
m_eglContext = eglCreateContext(m_eglDisplay, eglConfig, EGL_NO_CONTEXT, contextAttribs);
EGLint status = eglGetError();
if (status == EGL_BAD_ATTRIBUTE) {
if (status == EGL_BAD_ATTRIBUTE || status == EGL_BAD_MATCH) {
// Radeon/Gallium don't support advance attribute. Fallback to random value
// Note: Intel gives an EGL_BAD_MATCH. I don't know why but let's by stubborn and retry.
fprintf(stderr, "EGL: warning your driver doesn't suport advance openGL context attributes\n");
m_eglContext = eglCreateContext(m_eglDisplay, eglConfig, EGL_NO_CONTEXT, NullContextAttribs);
status = eglGetError();