From 4934e43287c51f5ced674735286338b5c0ce4824 Mon Sep 17 00:00:00 2001 From: "gregory.hainaut" Date: Sat, 5 Oct 2013 10:37:48 +0000 Subject: [PATCH] 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 --- cmake/SelectPcsx2Plugins.cmake | 11 ++++++----- plugins/GSdx/GSWndEGL.cpp | 3 ++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/cmake/SelectPcsx2Plugins.cmake b/cmake/SelectPcsx2Plugins.cmake index 2a3934513f..8c8dfe12cc 100644 --- a/cmake/SelectPcsx2Plugins.cmake +++ b/cmake/SelectPcsx2Plugins.cmake @@ -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() #--------------------------------------- #--------------------------------------- diff --git a/plugins/GSdx/GSWndEGL.cpp b/plugins/GSdx/GSWndEGL.cpp index cf06ac49bc..7c98518cbb 100644 --- a/plugins/GSdx/GSWndEGL.cpp +++ b/plugins/GSdx/GSWndEGL.cpp @@ -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();