Menu

Unbalanced shader application

Help
Edwin
2017-07-28
2017-07-28
  • Edwin

    Edwin - 2017-07-28

    I've been doing some tests on some older Intel Graphics machines. After getting rid of a number of warnings (including bogus ones because it doesn't understand negative float constants), I'm getting an assert from TGLShader.Apply with the text "Unbalanced shader application". What does that mean? Since it is a check inside GLScene, there must be some idea behind it.

    Everything is fine on NVIDIA.

     

    Last edit: Edwin 2017-07-28
  • Jerome.D (BeanzMaster)

    Hi Edwin, "Unbalanced shader application" error is internal. It's because "GLS_MULTITHREAD" option is undefined. Some little questions :
    1. Do you use Lazarus ? or Delphi ? and what version ?
    2. Do you use the latest version of glscene from SVN ?
    3. Have you a sample, i'll can test ?

    if you use Lazarus check in GLMaterial.Pas around line 58 comment {$UNDEF GLS_MULTITHREAD} (just add point before $) and try

     

    Last edit: Jerome.D (BeanzMaster) 2017-07-29
  • Edwin

    Edwin - 2017-07-29
    1. Delphi XE2
    2. A version from late 2016. Not SVN though.
    3. Not at the moment, but I can try to isolate the problem in something small.

    Also, the is a Gen2 Intel with the latest (and probably last) Intel Graphics driver.

     
  • Edwin

    Edwin - 2017-08-11

    After a whole bunch of testing, I must conclude that Intel drivers just suck.

    Problem 1: Apparently Intel drivers won't immediately use the data array provided to Uniform2fv. Which means it crashes if you use a local variable for the array.

    Problem 2: Providing a global/member variable stops it from crashing, but it still refuses to pass on any data.

    The only thing that does seem to work is passing all array elements to Uniform2f individually. A solution I actually didn't expect to work.

     
  • Jerome.D (BeanzMaster)

    Hi Edwin just a little question what's version of GLSL shader script you use ?

     
  • Edwin

    Edwin - 2017-08-11

    Version 110, just basic OpenGL 2.0.

    Turns out, I also made a mistake that effectively caused problem 2. I hadn't noticed because the NVidia driver managed to work around it.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.