Code::Blocks with C/C++ Compiler

Discussion in 'C /C ++' started by ptitSeb, Sep 3, 2012.

  1. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    8,148
    Location:
    France, near Lyon
    Qt 5.11.0 is built for more than a week (without WebEngine, that doesn't want to build because libc is too old).
    I was struggling with QtWebKit... The build doesn't want to finish and got killed (with 4GB swap) on Document.cpp (and yes, I have disabled the monolitic built). I have a last try running, not sure what I will try if it still fail (probably try to cut the file, but that complicate).

    Not sure I want to build a new Qt for a minor bump in the version, unless there is something uber important in the ChangeLog.
     
  2. canseco

    canseco Very Active Member

    Joined:
    Jun 1, 2004
    Messages:
    883
    Location:
    Spain
    I think QtWebKit is not worth it anymore, as i only see 3 programs still using it on my Manjaro Linux desktop repos (KdenLive, K3B and Marble).

    Shame about glic being old because of this fixes:

    - Fix build with GCC 8.1

    [QTBUG-68752] Fix compilation with opengl es2

    https://code.qt.io/cgit/qt/qtwebengine.git/tree/dist/changes-5.11.1/?h=v5.11.1
     
  3. Magic Sam

    Magic Sam Forever Homebrew

    Joined:
    Aug 10, 2007
    Messages:
    2,086
    Location:
    Innsmouth, MA
    Hi all :)

    @ptitSeb : I'm trying to build some OCR program (tesseract) on the Pandora with your latest Code::Blocks release (GCC 8.1), but it fails with the following error:

    Do you understand what I'm doing wrong ?

    Cheers, Magic Sam
     
  4. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    8,148
    Location:
    France, near Lyon
    Yep, you are using -fsingle-precision-constant (it's by default in CFLAGS and CXXFLAGS because it's faster on Pandora), and this mess up the template resolution... Either force the template, or remove the flags from you CFLAGS (or add -fno-single-precision-constant to the CFLAGS). Because it's OCRa nd may need the full double precision I suggest the second option.
     
    levi and Magic Sam like this.
  5. elvissteinjr

    elvissteinjr Very Active Member

    Joined:
    Aug 23, 2013
    Messages:
    359
    Location:
    Germany
    hey, just a quick question so I'll put it in here:

    The gigahertz Pandora's GPU clocks about twice as fast, but what is the frame rate difference in practice on average? I only have a good old CC Pandora myself and I was finally gonna release something for it. The CC one doesn't quite cut it, with 40 - 45ish fps in the most demanding scene of the game, so I would default to frameskipping on. If a gigahertz one manages just fine I'd like to autodetect the model and default to full framerates for a better experience, though.
    I'd also like to avoid auto-frameskip in order to maintain a consistent framerate during the game, so there's that.

    I could of course build a PND with just that scene and upload it for someone to test, but if there's past experience that points towards a good enough improvement I could skip this step.

    Thanks!
     
  6. levi

    levi Still fresh, damnit!

    Joined:
    Oct 6, 2008
    Messages:
    9,837
    Location:
    Somewhere off the coast of the EU
    Maybe ptitseb could hazard a guess, but it's a very difficult question to nail down positively. Firstly, where's your code spending most of its time in a profiler? If it's missing 60fps mostly because of the render step or game logic (especially any of the fiddly bit inside that) it varies. There's also the RAM speed to consider on the different units, because of the way the graphics unit writes the framebuffer back to RAM on ARM systems.
     
  7. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    8,148
    Location:
    France, near Lyon
    Well, the Gigahertz is faster, but not 2* faster all-in-all (but like 50% is some cases, compared to my CC @800Mhz).

    But as @levi mentionned, it will depend where is your bottleneck. Using and ssh window, try to have a look at "sudo perf top", and see if it's caping at 100% CPU (then it's probably cpu limited) or if cpu idle a bit (then it's probably GPU limited). CPU on Gigahertz is also faster the CC (more cache), but you wont double the speed...
     
  8. elvissteinjr

    elvissteinjr Very Active Member

    Joined:
    Aug 23, 2013
    Messages:
    359
    Location:
    Germany
    I'm already pretty sure I'm bottlenecked by the GPU, but I re-checked everything.

    According to the engine's internal performance counters it's spending about 50µs in the game logic code, and around 20000µs per frame in the rendering code. With frameskip on it's taking just ~3000µs - ~4000µs there, possibly since it's not running behind anywhere.

    The scene in question uses multiple somewhat large textures with alpha transparency. I'm aware how taxing this is on that thing, but resizing or using compressed ones isn't an option for me here.

    Didn't copy it off (had some issues getting the cli tools run over ssh, eh), but perf top looked like this:
    Code:
    25.50% libmikmod.so
    7.86% libGLES_CM.so
    5.40% kernel
    2.00% ProjectTWC
    Last thing is the game's executable.
    I'll think about replacing the tracker module audio with streamed ones for this since I did that for another platform already anyways.
    Overall just running top the total cpu usage of the process maxed out around 37% us. My Pandora runs at 969 MHz.

    So yeah, I think this is on the GPU.
    Guess I'll prepare something if someone here is willing to run it real quick. Not today though.
     
  9. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    8,148
    Location:
    France, near Lyon
    If you have a lot of alpha transparency, try to use GL_BLEND instead of GL_ALPHA_TEST if possible.
     
  10. levi

    levi Still fresh, damnit!

    Joined:
    Oct 6, 2008
    Messages:
    9,837
    Location:
    Somewhere off the coast of the EU
    Wasn't there a slowness issue with tracker music in some of your ports? I may be misremembering, and I can't remember what you did to fix those cases anyway to be honest.
     

Share This Page

Loading...