Author Topic: Rice to OpenGL2.1 and OpenGL ES 2  (Read 7852 times)

Offline Narann

  • byte
  • *
  • Posts: 18
  • mupen64plus Rice dev
    • View Profile
    • My Blog
Re: Rice to OpenGL2.1 and OpenGL ES 2
« Reply #15 on: December 03, 2014, 09:14:27 AM »
I just tested your branch on my Note3, it doesn't looks faster but it's definitely not slower than before.
https://github.com/Gillou68310/mupen64plus-ae/tree/Narann_rice
Great! This mean I've not did bad design choices. That's cool! :)

Thanks a lot for such tests, it make me confident I've done the good choice. My code is ten time simpler than the old one. I will continue the move to have a perfect OGL2.1 OGLES2 compliant code.

Just in case you don't already have this, I wrote this piece of code a while back in order to initialize an EGL context inside an SDL windows. (check HAVE_EGL in vidext.c)
http://pastebin.com/Sn8xAKUD
http://pastebin.com/UxiWcN6E
http://pastebin.com/BjRMdbJ1
Thanks! I will try to figure out how I could generate a local OGLES only branch with this.

Just to be sure: As SDL2 deal with EGL, is this still relevant? We should use SDL2 for such right? I'm just curious. :)

Side note for you Gillou: I see you are working on dynarec. This seems very cool! Do you think this could be done in the official repo then moved to AE after? I have the impression that, since AE is the most active dev scene for mupen64plus the upstream is sometime put behind and I think it's sad.

Offline Gillou68310

  • Developer
  • long
  • *****
  • Posts: 112
    • View Profile
Re: Rice to OpenGL2.1 and OpenGL ES 2
« Reply #16 on: December 03, 2014, 09:27:14 AM »
Just to be sure: As SDL2 deal with EGL, is this still relevant? We should use SDL2 for such right? I'm just curious. :)

I'm still using SD1.2 ;D I haven't checked SDL2 but if it deals with EGL this is indead not relevant.

Side note for you Gillou: I see you are working on dynarec. This seems very cool! Do you think this could be done in the official repo then moved to AE after? I have the impression that, since AE is the most active dev scene for mupen64plus the upstream is sometime put behind and I think it's sad.

Work in progress 8)
https://github.com/Gillou68310/mupen64plus-ae/issues/1

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3491
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Rice to OpenGL2.1 and OpenGL ES 2
« Reply #17 on: December 03, 2014, 09:28:44 AM »
Side note for you Gillou: I see you are working on dynarec. This seems very cool! Do you think this could be done in the official repo then moved to AE after? I have the impression that, since AE is the most active dev scene for mupen64plus the upstream is sometime put behind and I think it's sad.

Gilles has been doing a good job of making sure the changes are solid and discussing with Ari64 before pushing them upstream.
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline Narann

  • byte
  • *
  • Posts: 18
  • mupen64plus Rice dev
    • View Profile
    • My Blog
Re: Rice to OpenGL2.1 and OpenGL ES 2
« Reply #18 on: December 03, 2014, 09:38:28 AM »
I'm still using SD1.2 ;D I haven't checked SDL2 but if it deals with EGL this is indead not relevant.
Ok!
Work in progress 8)
https://github.com/Gillou68310/mupen64plus-ae/issues/1

mupen64plus will definitely gain a step forward with this good mindset! Good job!

Offline retroben

  • float
  • ****
  • Posts: 432
    • View Profile
Re: Rice to OpenGL2.1 and OpenGL ES 2
« Reply #19 on: December 03, 2014, 12:41:21 PM »
Is that show awesome? ;D
Edit:And if so,you mean "Great job!"

Do you know why Rice is slower for SM64 than Glide64?
I have "read every frame (slow)" disabled in Glide64 for speed,and it is now faster than Rice in that game.
Try the "SM64 Shining Stars" or any other large leveled hack to see some lag compared to Glide64's smooth speed.
Even the hub world lags on Rice while Glide64 runs smoothly.
And NO,I did not have HQ4X on in the comparison.

Rice is actually faster on Banjo-Tooie than all other plugins.
Too bad Super Smash Bros. is quite slow with Rice. (excluding N64oid's fast speed)
And there is that "yellow plaid" screen or "yellow bricks" issue on my FireTV when using Rice on some games.
The yellow screen does not happen in N64oid,which is why Smash runs so well on it.
I hope this helps out with performance tweaks for Rice.

Rice is my favorite low usage/speedy plugin on PJ64,and mudlord's 6.1.4 version is the fastest one for me.
« Last Edit: December 03, 2014, 01:00:23 PM by retroben »

Offline Narann

  • byte
  • *
  • Posts: 18
  • mupen64plus Rice dev
    • View Profile
    • My Blog
Re: Rice to OpenGL2.1 and OpenGL ES 2
« Reply #20 on: December 03, 2014, 01:12:38 PM »
Thanks retroben. I will take a note about the mod you are talking about to see how it run. To be honest I'm more focused on how "my" Rice code run on various games. From my perspective, Rice code is quite fast except for Textures reading, allocation and transfer (something I need to investigate one day...). If you could compile my code and run it on various games that would be awesome. I'm not looking for tiny bugs now, mainly crash or big troubles. :)

Offline retroben

  • float
  • ****
  • Posts: 432
    • View Profile
Re: Rice to OpenGL2.1 and OpenGL ES 2
« Reply #21 on: December 03, 2014, 02:24:26 PM »
I have no idea how to compile things,and if I did,it would probably end up with improper results like many others who "know" how to compile things.

I have seen numerous people having issues with compiling,and also,I would have to get a specific version of a certain thing in order to do it.

If you can make a build for me and others to test,that'd be great.
Make sure to please use a different name space so I don't have to get rid of Gillou's build just to install it.

Offline Narann

  • byte
  • *
  • Posts: 18
  • mupen64plus Rice dev
    • View Profile
    • My Blog
Re: Rice to OpenGL2.1 and OpenGL ES 2
« Reply #22 on: December 03, 2014, 11:14:50 PM »
@Gillou, one of the core contributor seems to break some of your dynarec work with it's memory module refactor: https://github.com/mupen64plus/mupen64plus-core/pull/47

Another reason to work on the main core first? :D

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: Rice to OpenGL2.1 and OpenGL ES 2
« Reply #23 on: December 03, 2014, 11:25:53 PM »
@narann
Gilles is indeed working with the upstream core developers, and he is modifying only a few lines of code.  bsmiles' memory refactoring is a huge undertaking (much like your Rice refactoring) so technically the responsibility for not breaking stuff lies with bsmiles.
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline Gillou68310

  • Developer
  • long
  • *****
  • Posts: 112
    • View Profile
Re: Rice to OpenGL2.1 and OpenGL ES 2
« Reply #24 on: December 04, 2014, 04:30:11 AM »
About the color (notice it's texture color), IIRC the code transfering textures to GPU was dealing with BGR textures (dunno why) and the GLSL fragment shader was doing the conversion. I've changed this but I guess the OGLES code path still send textures in BGR, I need to check. But I'm sure it's trivial to change.

Ok I fixed the wrong texture color issue (OGLES only), and merged back the polygon offset hack.
« Last Edit: December 08, 2014, 12:38:36 PM by Gillou68310 »

Offline bsmiles32

  • byte
  • *
  • Posts: 15
    • View Profile
Re: Rice to OpenGL2.1 and OpenGL ES 2
« Reply #25 on: December 04, 2014, 04:36:27 AM »
Yeah, the memory refactoring is huge, but I feel it is badly needed.
And yes, the responsibility for not breaking stuff is mine.
That's why we agreed not to merge the pull request until we are confident that we don't have regressions.

Offline Narann

  • byte
  • *
  • Posts: 18
  • mupen64plus Rice dev
    • View Profile
    • My Blog
Re: Rice to OpenGL2.1 and OpenGL ES 2
« Reply #26 on: December 06, 2014, 07:19:44 AM »
I've pushed new commits that should solve the problems Gillou encounter out of the box.

Please test and report. :)

Offline Narann

  • byte
  • *
  • Posts: 18
  • mupen64plus Rice dev
    • View Profile
    • My Blog
Re: Rice to OpenGL2.1 and OpenGL ES 2
« Reply #27 on: December 15, 2014, 04:12:25 PM »
After some (too?) time trying to make my PowerVR SDK env working I realize something: PowerVR debugger need the .so to be dynamically lined to libEGL. But it seems that SDL2 obfuscate EGL so I can't connect the debugger to it directly. I will maybe need your your windows_egl. I will dig more to see if I can "ask" SDL to use libEGL. :)