Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emuelec 4.6 build error on Flycast libretro latest commit #859

Closed
MSHectorCM opened this issue Jan 10, 2023 · 9 comments
Closed

Emuelec 4.6 build error on Flycast libretro latest commit #859

MSHectorCM opened this issue Jan 10, 2023 · 9 comments
Labels
bug Something isn't working regression

Comments

@MSHectorCM
Copy link

Please Note: This form is the minimum required information for submitting bugs.
Removing this form may lead to your issue being closed until it is completed.

Platform / OS / Hardware:

Emuelec 4.6/ ubuntu 20.04 / odroid n2+

Github hash:

6119465

Hardware:

Odroid n2+ with Emuelec 4.6 SDL 2.6.1 Retroarch 7213aada8d5fef72a93379a0d700bb1b678e4a70

When building Libretro Version of Flycast getting error

/home/kelv/EmuELEC/build.EmuELEC-Amlogic-ng.aarch64-4/build/flycast-611946559c12a569af507019694cb369b3587af6/core/rend/gles/gldraw.cpp: In function 'void writeFramebufferToVRAM()':
/home/kelv/EmuELEC/build.EmuELEC-Amlogic-ng.aarch64-4/build/flycast-611946559c12a569af507019694cb369b3587af6/core/rend/gles/gldraw.cpp:701:43: error: 'GL_READ_FRAMEBUFFER' was not declared in this scope; did you mean 'GL_READ_FRAMEBUFFER_NV'?
701 | gl.ofbo.framebuffer->bind(GL_READ_FRAMEBUFFER);
| ^~~~~~~~~~~~~~~~~~~
| GL_READ_FRAMEBUFFER_NV
/home/kelv/EmuELEC/build.EmuELEC-Amlogic-ng.aarch64-4/build/flycast-611946559c12a569af507019694cb369b3587af6/core/rend/gles/gldraw.cpp:702:48: error: 'GL_DRAW_FRAMEBUFFER' was not declared in this scope; did you mean 'GL_DRAW_FRAMEBUFFER_NV'?
702 | gl.fbscaling.framebuffer->bind(GL_DRAW_FRAMEBUFFER);

Standalone version compiles fine with no issues

Debugging Steps Tested

  • Starting commit 7fec511 and onwards the issue is present. Only the libretro version fails.

Logs Gathered

[buildflyfail.txt](https://github.com/flyinghead/flycast/files/10382356/buildflyfail.txt)


Please paste the contents of the log / logs here
You may leave this field blank if you have none.

``` flycast-611946559c12a569af507019694cb369b3587af6/core/rend/gles/gldraw.cpp:701:43: error: 'GL_READ_FRAMEBUFFER' was not declared in this scope; did you mean 'GL_READ_FRAMEBUFFER_NV'?

**_Screenshots_**

(Replace this line with any issue screenshots)
@MSHectorCM MSHectorCM added the bug Something isn't working label Jan 10, 2023
@flyinghead
Copy link
Owner

Right: glBlitFramebuffer doesn't exist in GLES 2.0. Same for GL_READ_FRAMEBUFFER and GL_DRAW_FRAMEBUFFER.
Need to use a different method for GLES 2.0.

Note that standalone may compile fine but will certainly crash if this code is run.

flyinghead added a commit that referenced this issue Jan 11, 2023
Fix libretro compile errors with GLES2
Fix black screen at runtime with gles 2.0

Issue #859
@flyinghead
Copy link
Owner

Fixed on master. As expected there were additional issues at runtime but I tested it successfully on a GLES 2.0 device.

@MSHectorCM
Copy link
Author

@flyinghead thx for the fast answer. It compiles but I noticed that for example Project justice/Moero! Justice Gakuen on libretro is not rendering the polygons correctly however in standalone version it works perfectly. Pls can you recheck it on your end? thx

@flyinghead
Copy link
Owner

Is it a black screen or some other issue?

@MSHectorCM
Copy link
Author

@flyinghead no, when getting into the battle the fighters polygons and textures do not appear. The rest of the environment is there. You can see it in the pictures attached.

Project Justice no fighters 1
Project Justice no fighters 2

Commit 1dd006d that was latest working fine hadn't any issue.

Thx for your support and help :)

@flyinghead
Copy link
Owner

Can you post a debug RA log?

I thought you were compiling with GLES2 and HAVE_OPENGLES2 on (which means no support for GLES 3.x) but the odroid n2+ has a GLES 3.2 GPU. What may be happening is Flycast is using GLES 3 features but with some 3.x APIs missing.

@MSHectorCM
Copy link
Author

Hello

Retroarch logs not working version from Jan 11th commit

2b70c73

retroarch_notworking_flycast_2b70c73f8029c680fec1ee32fc88f09974c18381.log

Attaching retroarch logs from working version from dec 16th commit 1dd006d

retroarch_working_flycast_dec16_1dd006d846350e96a46949f1e07a900206ae7194.log

thx!!

@flyinghead
Copy link
Owner

I have confirmation that Flycast uses GLES 3.0 features:

[libretro INFO] core/rend/gles/gles.cpp:560 N[RENDERER]: OpenGL ES version 3.2

However, based on your initial compilation errors, I assume that you compiled with GLES 2.0 headers and libraries only. And that means that some GLES 3.0 APIs aren't available.

You need to compile with GLES 3 support: cmake -DUSE_GLES=ON -DUSE_GLES2=OFF ...

@MSHectorCM
Copy link
Author

@flyinghead you did it :). Thx so much for your help and support. it is fixed now.

Kelvfimer pushed a commit to Kelvfimer/EmuELEC that referenced this issue Jan 31, 2023
shantigilbert pushed a commit to EmuELEC/EmuELEC that referenced this issue Jan 31, 2023
* Updating version to 02a002d55b1117775b9b6cabec12010c06277a58
* Fixing compiling issue due to change on flycast code flyinghead/flycast#859

---------

Co-authored-by: kelvfimer <calvarro@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression
Projects
None yet
Development

No branches or pull requests

2 participants