{"action":"created","issue":{"url":"https://api.github.com/repos/gonetz/GLideN64/issues/1041","repository_url":"https://api.github.com/repos/gonetz/GLideN64","labels_url":"https://api.github.com/repos/gonetz/GLideN64/issues/1041/labels{/name}","comments_url":"https://api.github.com/repos/gonetz/GLideN64/issues/1041/comments","events_url":"https://api.github.com/repos/gonetz/GLideN64/issues/1041/events","html_url":"https://github.com/gonetz/GLideN64/pull/1041","id":163210011,"number":1041,"title":"Don't load textures so much (GLES2)","user":{"login":"loganmc10","id":848146,"avatar_url":"https://avatars.githubusercontent.com/u/848146?v=3","gravatar_id":"","url":"https://api.github.com/users/loganmc10","html_url":"https://github.com/loganmc10","followers_url":"https://api.github.com/users/loganmc10/followers","following_url":"https://api.github.com/users/loganmc10/following{/other_user}","gists_url":"https://api.github.com/users/loganmc10/gists{/gist_id}","starred_url":"https://api.github.com/users/loganmc10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loganmc10/subscriptions","organizations_url":"https://api.github.com/users/loganmc10/orgs","repos_url":"https://api.github.com/users/loganmc10/repos","events_url":"https://api.github.com/users/loganmc10/events{/privacy}","received_events_url":"https://api.github.com/users/loganmc10/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-06-30T16:37:54Z","updated_at":"2016-06-30T18:27:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/gonetz/GLideN64/pulls/1041","html_url":"https://github.com/gonetz/GLideN64/pull/1041","diff_url":"https://github.com/gonetz/GLideN64/pull/1041.diff","patch_url":"https://github.com/gonetz/GLideN64/pull/1041.patch"},"body":"I've tested this and it seems to work quite well. If you put a counter inside the else{} block you'll see that this happens quite a bit (finding duplicate textures).\r\n\r\nIt's only enabled for GLES2 right now, and only for regular textures (not highres/filtered), because I only have a GLES2 device to test.\r\n\r\nBasically, glTexImage2D is a very expensive call, and it seems to be happening for duplicate textures. The CRC calculations aren't perfect, but they can happen very early so they are helpful. This happens further along the process, once we know the value of pDest. If it determines that pDest is a duplicate, it will \"back out\" of the texture loading, and just switch to using the \"original\" texture, thus saving us from having to do glTexImage2D.\r\n\r\nThey only thing left to implement is deleting the pDest_Locations value inside _checkCacheSize(), to do that I need to add a value to the CachedTexture struct, but it segfaults when I do that, I'm guessing the size of CachedTexture is being assumed somewhere?\r\n\r\nI'm hoping someone else can test this to check for any texture corruption/issues. @fzurita I'm especially curious how this does on mobile devices, just anecdotally, the performance in GoldenEye seems to be much better (I need to figure out how to measure FPS on the Raspberry Pi)."},"comment":{"url":"https://api.github.com/repos/gonetz/GLideN64/issues/comments/229747142","html_url":"https://github.com/gonetz/GLideN64/pull/1041#issuecomment-229747142","issue_url":"https://api.github.com/repos/gonetz/GLideN64/issues/1041","id":229747142,"user":{"login":"fzurita","id":11581687,"avatar_url":"https://avatars.githubusercontent.com/u/11581687?v=3","gravatar_id":"","url":"https://api.github.com/users/fzurita","html_url":"https://github.com/fzurita","followers_url":"https://api.github.com/users/fzurita/followers","following_url":"https://api.github.com/users/fzurita/following{/other_user}","gists_url":"https://api.github.com/users/fzurita/gists{/gist_id}","starred_url":"https://api.github.com/users/fzurita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fzurita/subscriptions","organizations_url":"https://api.github.com/users/fzurita/orgs","repos_url":"https://api.github.com/users/fzurita/repos","events_url":"https://api.github.com/users/fzurita/events{/privacy}","received_events_url":"https://api.github.com/users/fzurita/received_events","type":"User","site_admin":false},"created_at":"2016-06-30T18:27:33Z","updated_at":"2016-06-30T18:27:33Z","body":"Gotcha, only GLES3.1+ does mipmapping. I'll try this out tonight and let you know how it goes."}}
{"actor":{"display_login":"fzurita"}}