{"action":"created","comment":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments/35230400","id":35230400,"diff_hunk":"@@ -29,52 +29,68 @@ void cInterfaceEGL::DetectMode()\n \tEGLint num_configs;\n \tEGLConfig *config = nullptr;\n \tbool supportsGL = false, supportsGLES2 = false, supportsGLES3 = false;\n+\tstd::array<int, 4> renderable_types = {\n+\t\tEGL_OPENGL_BIT,\n+\t\t(1 << 6), /* EGL_OPENGL_ES3_BIT_KHR */\n+\t\tEGL_OPENGL_ES2_BIT,\n+\t};\n \n-\t// attributes for a visual in RGBA format with at least\n-\t// 8 bits per color\n-\tint attribs[] = {\n-\t\tEGL_RED_SIZE, 8,\n-\t\tEGL_GREEN_SIZE, 8,\n-\t\tEGL_BLUE_SIZE, 8,\n-\t\tEGL_NONE };\n-\n-\t// Get how many configs there are\n-\tif (!eglChooseConfig( egl_dpy, attribs, nullptr, 0, &num_configs))\n+\tfor (auto renderable_type : renderable_types)\n \t{\n-\t\tINFO_LOG(VIDEO, \"Error: couldn't get an EGL visual config\\n\");\n-\t\tgoto err_exit;\n-\t}\n+\t\t// attributes for a visual in RGBA format with at least\n+\t\t// 8 bits per color\n+\t\tint attribs[] = {\n+\t\t\tEGL_RED_SIZE, 8,\n+\t\t\tEGL_GREEN_SIZE, 8,\n+\t\t\tEGL_BLUE_SIZE, 8,\n+\t\t\tEGL_RENDERABLE_TYPE, renderable_type,","path":"Source/Core/VideoBackends/OGL/GLInterface/EGL.cpp","position":31,"original_position":31,"commit_id":"91a3c24005d2c4a11e7ca1042cfe2397a8d86bb9","original_commit_id":"91a3c24005d2c4a11e7ca1042cfe2397a8d86bb9","user":{"login":"degasus","id":2787141,"avatar_url":"https://avatars.githubusercontent.com/u/2787141?v=3","gravatar_id":"","url":"https://api.github.com/users/degasus","html_url":"https://github.com/degasus","followers_url":"https://api.github.com/users/degasus/followers","following_url":"https://api.github.com/users/degasus/following{/other_user}","gists_url":"https://api.github.com/users/degasus/gists{/gist_id}","starred_url":"https://api.github.com/users/degasus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/degasus/subscriptions","organizations_url":"https://api.github.com/users/degasus/orgs","repos_url":"https://api.github.com/users/degasus/repos","events_url":"https://api.github.com/users/degasus/events{/privacy}","received_events_url":"https://api.github.com/users/degasus/received_events","type":"User","site_admin":false},"body":"I've thought you just need \r\n```\r\nEGL_RENDERABLE_TYPE, EGL_OPENGL_BIT | EGL_OPENGL_ES2_BIT | (1 << 6), /* EGL_OPENGL_ES3_BIT_KHR */,\r\n```","created_at":"2015-07-22T16:07:28Z","updated_at":"2015-07-22T16:07:28Z","html_url":"https://github.com/dolphin-emu/dolphin/pull/2764#discussion_r35230400","pull_request_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/2764","_links":{"self":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments/35230400"},"html":{"href":"https://github.com/dolphin-emu/dolphin/pull/2764#discussion_r35230400"},"pull_request":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/2764"}}},"pull_request":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/2764","id":40477630,"html_url":"https://github.com/dolphin-emu/dolphin/pull/2764","diff_url":"https://github.com/dolphin-emu/dolphin/pull/2764.diff","patch_url":"https://github.com/dolphin-emu/dolphin/pull/2764.patch","issue_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/2764","number":2764,"state":"open","locked":false,"title":"Work around devices that choose to only return the default EGL_RENDERABLE_TYPE","user":{"login":"Sonicadvance1","id":1018829,"avatar_url":"https://avatars.githubusercontent.com/u/1018829?v=3","gravatar_id":"","url":"https://api.github.com/users/Sonicadvance1","html_url":"https://github.com/Sonicadvance1","followers_url":"https://api.github.com/users/Sonicadvance1/followers","following_url":"https://api.github.com/users/Sonicadvance1/following{/other_user}","gists_url":"https://api.github.com/users/Sonicadvance1/gists{/gist_id}","starred_url":"https://api.github.com/users/Sonicadvance1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sonicadvance1/subscriptions","organizations_url":"https://api.github.com/users/Sonicadvance1/orgs","repos_url":"https://api.github.com/users/Sonicadvance1/repos","events_url":"https://api.github.com/users/Sonicadvance1/events{/privacy}","received_events_url":"https://api.github.com/users/Sonicadvance1/received_events","type":"User","site_admin":false},"body":"The default EGL_RENDERABLE_TYPE is GLES1, so vendors have the ability to choose between returning only the bits requested, or all of the bits\r\nsupported in addition to the one requested.\r\nPowerVR chose to take the route where they only return the bits requested, everyone else returns all of the bits supported.\r\nInstead of letting the vendor have control of this, let's incrementally go through each renderable type and make sure it supports everything we want.\r\nThis will cover all devices for now, and for the future.","created_at":"2015-07-21T16:34:50Z","updated_at":"2015-07-22T16:07:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1df4b9adcbc86f8a645caaa68dd168c8b50d0289","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/2764/commits","review_comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/2764/comments","review_comment_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/2764/comments","statuses_url":"https://api.github.com/repos/dolphin-emu/dolphin/statuses/91a3c24005d2c4a11e7ca1042cfe2397a8d86bb9","head":{"label":"Sonicadvance1:pvr_workaround3","ref":"pvr_workaround3","sha":"91a3c24005d2c4a11e7ca1042cfe2397a8d86bb9","user":{"login":"Sonicadvance1","id":1018829,"avatar_url":"https://avatars.githubusercontent.com/u/1018829?v=3","gravatar_id":"","url":"https://api.github.com/users/Sonicadvance1","html_url":"https://github.com/Sonicadvance1","followers_url":"https://api.github.com/users/Sonicadvance1/followers","following_url":"https://api.github.com/users/Sonicadvance1/following{/other_user}","gists_url":"https://api.github.com/users/Sonicadvance1/gists{/gist_id}","starred_url":"https://api.github.com/users/Sonicadvance1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sonicadvance1/subscriptions","organizations_url":"https://api.github.com/users/Sonicadvance1/orgs","repos_url":"https://api.github.com/users/Sonicadvance1/repos","events_url":"https://api.github.com/users/Sonicadvance1/events{/privacy}","received_events_url":"https://api.github.com/users/Sonicadvance1/received_events","type":"User","site_admin":false},"repo":{"id":16360220,"name":"dolphin","full_name":"Sonicadvance1/dolphin","owner":{"login":"Sonicadvance1","id":1018829,"avatar_url":"https://avatars.githubusercontent.com/u/1018829?v=3","gravatar_id":"","url":"https://api.github.com/users/Sonicadvance1","html_url":"https://github.com/Sonicadvance1","followers_url":"https://api.github.com/users/Sonicadvance1/followers","following_url":"https://api.github.com/users/Sonicadvance1/following{/other_user}","gists_url":"https://api.github.com/users/Sonicadvance1/gists{/gist_id}","starred_url":"https://api.github.com/users/Sonicadvance1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sonicadvance1/subscriptions","organizations_url":"https://api.github.com/users/Sonicadvance1/orgs","repos_url":"https://api.github.com/users/Sonicadvance1/repos","events_url":"https://api.github.com/users/Sonicadvance1/events{/privacy}","received_events_url":"https://api.github.com/users/Sonicadvance1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Sonicadvance1/dolphin","description":"Dolphin is a GameCube/Wii emulator, allowing you to play games for these two platforms on PC, with improvements.","fork":true,"url":"https://api.github.com/repos/Sonicadvance1/dolphin","forks_url":"https://api.github.com/repos/Sonicadvance1/dolphin/forks","keys_url":"https://api.github.com/repos/Sonicadvance1/dolphin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sonicadvance1/dolphin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sonicadvance1/dolphin/teams","hooks_url":"https://api.github.com/repos/Sonicadvance1/dolphin/hooks","issue_events_url":"https://api.github.com/repos/Sonicadvance1/dolphin/issues/events{/number}","events_url":"https://api.github.com/repos/Sonicadvance1/dolphin/events","assignees_url":"https://api.github.com/repos/Sonicadvance1/dolphin/assignees{/user}","branches_url":"https://api.github.com/repos/Sonicadvance1/dolphin/branches{/branch}","tags_url":"https://api.github.com/repos/Sonicadvance1/dolphin/tags","blobs_url":"https://api.github.com/repos/Sonicadvance1/dolphin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sonicadvance1/dolphin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sonicadvance1/dolphin/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sonicadvance1/dolphin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sonicadvance1/dolphin/statuses/{sha}","languages_url":"https://api.github.com/repos/Sonicadvance1/dolphin/languages","stargazers_url":"https://api.github.com/repos/Sonicadvance1/dolphin/stargazers","contributors_url":"https://api.github.com/repos/Sonicadvance1/dolphin/contributors","subscribers_url":"https://api.github.com/repos/Sonicadvance1/dolphin/subscribers","subscription_url":"https://api.github.com/repos/Sonicadvance1/dolphin/subscription","commits_url":"https://api.github.com/repos/Sonicadvance1/dolphin/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sonicadvance1/dolphin/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sonicadvance1/dolphin/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sonicadvance1/dolphin/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sonicadvance1/dolphin/contents/{+path}","compare_url":"https://api.github.com/repos/Sonicadvance1/dolphin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sonicadvance1/dolphin/merges","archive_url":"https://api.github.com/repos/Sonicadvance1/dolphin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sonicadvance1/dolphin/downloads","issues_url":"https://api.github.com/repos/Sonicadvance1/dolphin/issues{/number}","pulls_url":"https://api.github.com/repos/Sonicadvance1/dolphin/pulls{/number}","milestones_url":"https://api.github.com/repos/Sonicadvance1/dolphin/milestones{/number}","notifications_url":"https://api.github.com/repos/Sonicadvance1/dolphin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sonicadvance1/dolphin/labels{/name}","releases_url":"https://api.github.com/repos/Sonicadvance1/dolphin/releases{/id}","created_at":"2014-01-29T21:48:46Z","updated_at":"2015-04-16T04:30:55Z","pushed_at":"2015-07-22T16:03:37Z","git_url":"git://github.com/Sonicadvance1/dolphin.git","ssh_url":"git@github.com:Sonicadvance1/dolphin.git","clone_url":"https://github.com/Sonicadvance1/dolphin.git","svn_url":"https://github.com/Sonicadvance1/dolphin","homepage":null,"size":230623,"stargazers_count":2,"watchers_count":2,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"dolphin-emu:master","ref":"master","sha":"deef164c7b99bac1b9b3c574fe6a886ab2b13a1c","user":{"login":"dolphin-emu","id":5050316,"avatar_url":"https://avatars.githubusercontent.com/u/5050316?v=3","gravatar_id":"","url":"https://api.github.com/users/dolphin-emu","html_url":"https://github.com/dolphin-emu","followers_url":"https://api.github.com/users/dolphin-emu/followers","following_url":"https://api.github.com/users/dolphin-emu/following{/other_user}","gists_url":"https://api.github.com/users/dolphin-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/dolphin-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dolphin-emu/subscriptions","organizations_url":"https://api.github.com/users/dolphin-emu/orgs","repos_url":"https://api.github.com/users/dolphin-emu/repos","events_url":"https://api.github.com/users/dolphin-emu/events{/privacy}","received_events_url":"https://api.github.com/users/dolphin-emu/received_events","type":"Organization","site_admin":false},"repo":{"id":11577304,"name":"dolphin","full_name":"dolphin-emu/dolphin","owner":{"login":"dolphin-emu","id":5050316,"avatar_url":"https://avatars.githubusercontent.com/u/5050316?v=3","gravatar_id":"","url":"https://api.github.com/users/dolphin-emu","html_url":"https://github.com/dolphin-emu","followers_url":"https://api.github.com/users/dolphin-emu/followers","following_url":"https://api.github.com/users/dolphin-emu/following{/other_user}","gists_url":"https://api.github.com/users/dolphin-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/dolphin-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dolphin-emu/subscriptions","organizations_url":"https://api.github.com/users/dolphin-emu/orgs","repos_url":"https://api.github.com/users/dolphin-emu/repos","events_url":"https://api.github.com/users/dolphin-emu/events{/privacy}","received_events_url":"https://api.github.com/users/dolphin-emu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dolphin-emu/dolphin","description":"Dolphin is a GameCube / Wii emulator, allowing you to play games for these two platforms on PC with improvements.","fork":false,"url":"https://api.github.com/repos/dolphin-emu/dolphin","forks_url":"https://api.github.com/repos/dolphin-emu/dolphin/forks","keys_url":"https://api.github.com/repos/dolphin-emu/dolphin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dolphin-emu/dolphin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dolphin-emu/dolphin/teams","hooks_url":"https://api.github.com/repos/dolphin-emu/dolphin/hooks","issue_events_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/events{/number}","events_url":"https://api.github.com/repos/dolphin-emu/dolphin/events","assignees_url":"https://api.github.com/repos/dolphin-emu/dolphin/assignees{/user}","branches_url":"https://api.github.com/repos/dolphin-emu/dolphin/branches{/branch}","tags_url":"https://api.github.com/repos/dolphin-emu/dolphin/tags","blobs_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/refs{/sha}","trees_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dolphin-emu/dolphin/statuses/{sha}","languages_url":"https://api.github.com/repos/dolphin-emu/dolphin/languages","stargazers_url":"https://api.github.com/repos/dolphin-emu/dolphin/stargazers","contributors_url":"https://api.github.com/repos/dolphin-emu/dolphin/contributors","subscribers_url":"https://api.github.com/repos/dolphin-emu/dolphin/subscribers","subscription_url":"https://api.github.com/repos/dolphin-emu/dolphin/subscription","commits_url":"https://api.github.com/repos/dolphin-emu/dolphin/commits{/sha}","git_commits_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/commits{/sha}","comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/comments{/number}","issue_comment_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/comments{/number}","contents_url":"https://api.github.com/repos/dolphin-emu/dolphin/contents/{+path}","compare_url":"https://api.github.com/repos/dolphin-emu/dolphin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dolphin-emu/dolphin/merges","archive_url":"https://api.github.com/repos/dolphin-emu/dolphin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dolphin-emu/dolphin/downloads","issues_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues{/number}","pulls_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls{/number}","milestones_url":"https://api.github.com/repos/dolphin-emu/dolphin/milestones{/number}","notifications_url":"https://api.github.com/repos/dolphin-emu/dolphin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dolphin-emu/dolphin/labels{/name}","releases_url":"https://api.github.com/repos/dolphin-emu/dolphin/releases{/id}","created_at":"2013-07-22T09:07:57Z","updated_at":"2015-07-19T16:45:44Z","pushed_at":"2015-07-22T16:03:38Z","git_url":"git://github.com/dolphin-emu/dolphin.git","ssh_url":"git@github.com:dolphin-emu/dolphin.git","clone_url":"https://github.com/dolphin-emu/dolphin.git","svn_url":"https://github.com/dolphin-emu/dolphin","homepage":"https://dolphin-emu.org/","size":302014,"stargazers_count":1510,"watchers_count":1510,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":464,"mirror_url":null,"open_issues_count":78,"forks":464,"open_issues":78,"watchers":1510,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/2764"},"html":{"href":"https://github.com/dolphin-emu/dolphin/pull/2764"},"issue":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/issues/2764"},"comments":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/issues/2764/comments"},"review_comments":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/2764/comments"},"review_comment":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/2764/commits"},"statuses":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/statuses/91a3c24005d2c4a11e7ca1042cfe2397a8d86bb9"}}}}